Tick completed workstream 4 plan steps
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0684122f45
commit
a569b4003c
1 file changed
+10
-10
@@ -64,21 +64,21 @@ Test `tests/models.test.ts`, new `tests/transcriptionOptions.test.tsx`.
|
||||
`taskForModel(modelId: string, task: WhisperTask): WhisperTask`;
|
||||
`TranscriptionOptions` prop `canTranslate: boolean`.
|
||||
|
||||
- [ ] Failing tests: `canTranslate` false for turbo and every `.en`, true for the other multilingual
|
||||
- [x] Failing tests: `canTranslate` false for turbo and every `.en`, true for the other multilingual
|
||||
ids; `taskForModel("onnx-community/whisper-large-v3-turbo", "translate") === "transcribe"`,
|
||||
unchanged for `whisper-small`; unknown id → `"transcribe"`. `renderToStaticMarkup` of
|
||||
`TranscriptionOptions` with `canTranslate={false}` contains no "Translate to English" and no Task
|
||||
select; with `true` contains it.
|
||||
- [ ] Implement; App: `setTask(t => taskForModel(next, t))` in `handleModelSelect` and the server
|
||||
- [x] Implement; App: `setTask(t => taskForModel(next, t))` in `handleModelSelect` and the server
|
||||
auto-switch effect; runs pass `task: taskForModel(modelId, task)`.
|
||||
- [ ] Typecheck, fast suite; D-WS4a entry; commit.
|
||||
- [x] Typecheck, fast suite; D-WS4a entry; commit.
|
||||
|
||||
### Task 2: error stage for translation
|
||||
|
||||
**Files:** `src/lib/errors.ts`, `tests/errors.test.ts`.
|
||||
- [ ] Failing test: `classifyError("Out of memory", { stage: "translate" })` → suggestion mentions a
|
||||
- [x] Failing test: `classifyError("Out of memory", { stage: "translate" })` → suggestion mentions a
|
||||
shorter transcript / closing tabs, not "smaller model"; network on `stage: "translate"` retryable.
|
||||
- [ ] Add `"translate"` to `ErrorStage`; commit with Task 3.
|
||||
- [x] Add `"translate"` to `ErrorStage`; commit with Task 3.
|
||||
|
||||
### Task 3: pure translation planning (`src/lib/translation.ts`)
|
||||
|
||||
@@ -94,7 +94,7 @@ Test `tests/models.test.ts`, new `tests/transcriptionOptions.test.tsx`.
|
||||
- `assembleTranslation(units, translated: string[]): { text; chunks }`.
|
||||
- Tests (`tests/translation.test.ts`): unit merging & timestamps, null end, no-chunk fallback, sentence
|
||||
splitting, Review Focus 1–3, assemble length mismatch throws, `guessSourceLanguage`.
|
||||
- [ ] Red → green → commit.
|
||||
- [x] Red → green → commit.
|
||||
|
||||
### Task 4: translate worker + protocol + measurement
|
||||
|
||||
@@ -111,8 +111,8 @@ unreachable and the model is not cached; run under the lock), `scripts/bench-tra
|
||||
`splitForTranslation` with the real tokenizer count; batches of `BATCH_SIZE` (measured).
|
||||
- Bundle + serve: `src/index.ts` dev route `/translate.worker.js`, `scripts/build.ts` emits and
|
||||
precaches it.
|
||||
- [ ] Measure en_alien.txt → da and da_festuge → en on onnxruntime-node (batch 1 vs 4 vs 8); record.
|
||||
- [ ] Commit.
|
||||
- [x] Measure en_alien.txt → da and da_festuge → en on onnxruntime-node (batch 1 vs 4 vs 8); record.
|
||||
- [x] Commit.
|
||||
|
||||
### Task 5: UI — `TranslatePanel`
|
||||
|
||||
@@ -129,9 +129,9 @@ unreachable and the model is not cached; run under the lock), `scripts/bench-tra
|
||||
- State resets whenever `result` changes; Cancel terminates the translate worker.
|
||||
- [ ] impeccable polish pass; screenshots light/dark × desktop/mobile; real headless-Chrome run of a
|
||||
translation (WASM) if feasible.
|
||||
- [ ] Commit.
|
||||
- [x] Commit.
|
||||
|
||||
### Task 6: docs + wrap-up
|
||||
- [ ] D-WS4b entry (models, licences, numbers); Architecture.md (translate worker), AGENTS.md rule
|
||||
- [x] D-WS4b entry (models, licences, numbers); Architecture.md (translate worker), AGENTS.md rule
|
||||
wording (two workers), WorkBreakdown, README if needed, `tests/offline.md` step.
|
||||
- [ ] typecheck, fast suite, build; `git rm` this plan; commit.
|
||||
Reference in new issue
Block a user