mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
Update task metadata/docs and JLPT tokenizer work
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
---
|
||||
id: TASK-12
|
||||
title: Add renderer module bundling for multi-file renderer support
|
||||
status: Done
|
||||
assignee: []
|
||||
created_date: '2026-02-11 08:21'
|
||||
updated_date: '2026-02-16 02:14'
|
||||
labels:
|
||||
- infrastructure
|
||||
- renderer
|
||||
- build
|
||||
milestone: Codebase Clarity & Composability
|
||||
dependencies:
|
||||
- TASK-5
|
||||
references:
|
||||
- src/renderer/renderer.ts
|
||||
- src/renderer/index.html
|
||||
- package.json
|
||||
- tsconfig.json
|
||||
priority: high
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
<!-- SECTION:DESCRIPTION:BEGIN -->
|
||||
Currently renderer.ts is a single file loaded directly by Electron's renderer process via a script tag in index.html. To split it into modules (TASK-6), we need a bundling step since Electron renderer's default context doesn't support bare ES module imports without additional configuration.
|
||||
|
||||
Options:
|
||||
1. **esbuild** — fast, minimal config, already used in many Electron projects
|
||||
2. **Electron's native ESM support** — requires `"type": "module"` and sandbox configuration
|
||||
3. **TypeScript compiler output** — if targeting a single concatenated bundle
|
||||
|
||||
The build pipeline already compiles TypeScript and copies renderer assets. Adding a bundling step for the renderer would slot into the existing `npm run build` script.
|
||||
<!-- SECTION:DESCRIPTION:END -->
|
||||
|
||||
## Acceptance Criteria
|
||||
<!-- AC:BEGIN -->
|
||||
- [x] #1 Renderer code can be split across multiple .ts files with imports
|
||||
- [x] #2 Build pipeline bundles renderer modules into a single output for Electron
|
||||
- [x] #3 Existing `make build` still works end-to-end
|
||||
- [x] #4 No runtime errors in renderer process
|
||||
<!-- AC:END -->
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
<!-- SECTION:NOTES:BEGIN -->
|
||||
Updated root npm build pipeline to use an explicit renderer bundle step via esbuild. Added `build:renderer` script to emit a single `dist/renderer/renderer.js` from `src/renderer/renderer.ts`; `build` now runs `pnpm run build:renderer` and preserves existing index/style copy and macOS helper step. Added `esbuild` to devDependencies.
|
||||
<!-- SECTION:NOTES:END -->
|
||||
|
||||
## Final Summary
|
||||
|
||||
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
||||
Implemented renderer bundling step and wired `build` to use it. This adds `pnpm run build:renderer` which bundles `src/renderer/renderer.ts` into a single `dist/renderer/renderer.js` for Electron to load. Also added `esbuild` as a dev dependency and aligned `pnpm-lock.yaml` importer metadata for dependency consistency. Kept `index.html`/`style.css` copy path unchanged, so renderer asset layout remains stable.
|
||||
|
||||
Implemented additional test-layer type fix after build breakage by correcting `makeDepsFromMecabTokenizer` and related `tokenizeWithMecab` mocks to match expected `Token` vs `MergedToken` shapes, keeping runtime behavior unchanged while satisfying TS checks.
|
||||
<!-- SECTION:FINAL_SUMMARY:END -->
|
||||
@@ -1,48 +0,0 @@
|
||||
---
|
||||
id: TASK-12
|
||||
title: Add renderer module bundling for multi-file renderer support
|
||||
status: To Do
|
||||
assignee: []
|
||||
created_date: '2026-02-11 08:21'
|
||||
updated_date: '2026-02-14 00:44'
|
||||
labels:
|
||||
- infrastructure
|
||||
- renderer
|
||||
- build
|
||||
milestone: Codebase Clarity & Composability
|
||||
dependencies:
|
||||
- TASK-5
|
||||
references:
|
||||
- src/renderer/renderer.ts
|
||||
- src/renderer/index.html
|
||||
- package.json
|
||||
- tsconfig.json
|
||||
priority: high
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
<!-- SECTION:DESCRIPTION:BEGIN -->
|
||||
Currently renderer.ts is a single file loaded directly by Electron's renderer process via a script tag in index.html. To split it into modules (TASK-6), we need a bundling step since Electron renderer's default context doesn't support bare ES module imports without additional configuration.
|
||||
|
||||
Options:
|
||||
1. **esbuild** — fast, minimal config, already used in many Electron projects
|
||||
2. **Electron's native ESM support** — requires `"type": "module"` and sandbox configuration
|
||||
3. **TypeScript compiler output** — if targeting a single concatenated bundle
|
||||
|
||||
The build pipeline already compiles TypeScript and copies renderer assets. Adding a bundling step for the renderer would slot into the existing `npm run build` script.
|
||||
<!-- SECTION:DESCRIPTION:END -->
|
||||
|
||||
## Acceptance Criteria
|
||||
<!-- AC:BEGIN -->
|
||||
- [ ] #1 Renderer code can be split across multiple .ts files with imports
|
||||
- [ ] #2 Build pipeline bundles renderer modules into a single output for Electron
|
||||
- [ ] #3 Existing `make build` still works end-to-end
|
||||
- [ ] #4 No runtime errors in renderer process
|
||||
<!-- AC:END -->
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
<!-- SECTION:NOTES:BEGIN -->
|
||||
Priority promoted from medium to high: this unblocks clean multi-file renderer work and is a prerequisite for upcoming UI features (TASK-26 help modal, TASK-34 episode browser, and any future modal/overlay features).
|
||||
<!-- SECTION:NOTES:END -->
|
||||
@@ -3,9 +3,10 @@ id: TASK-23
|
||||
title: >-
|
||||
Add opt-in JLPT level tagging by bundling and querying local Yomitan
|
||||
dictionary
|
||||
status: In Progress
|
||||
status: Done
|
||||
assignee: []
|
||||
created_date: '2026-02-13 16:42'
|
||||
updated_date: '2026-02-16 02:00'
|
||||
labels: []
|
||||
dependencies: []
|
||||
priority: high
|
||||
@@ -26,16 +27,13 @@ Implement an opt-in JLPT token annotation feature that annotates subtitle words
|
||||
- [x] #5 Assign different underline colors per JLPT level (at minimum N5/N4/N3/N2/N1) with a stable mapping documented in task notes.
|
||||
- [x] #6 Handle unknown/no-match tokens as non-tagged while preserving existing subtitle styling and interaction behavior.
|
||||
- [x] #7 When disabled, no JLPT lookups are performed and subtitles render exactly as current behavior.
|
||||
- [ ] #8 Add tests or deterministic checks covering at least one positive match, one non-match, and one unknown/unsupported-level fallback path.
|
||||
- [ ] #9 Document expected dictionary source and any size/performance impact of bundling the JLPT extension data.
|
||||
- [ ] #10 If dictionary format/version constraints block exact level extraction, the task includes explicit limitation notes and a deterministic fallback strategy.
|
||||
- [x] #8 Add tests or deterministic checks covering at least one positive match, one non-match, and one unknown/unsupported-level fallback path.
|
||||
- [x] #9 Document expected dictionary source and any size/performance impact of bundling the JLPT extension data.
|
||||
- [x] #10 If dictionary format/version constraints block exact level extraction, the task includes explicit limitation notes and a deterministic fallback strategy.
|
||||
<!-- AC:END -->
|
||||
|
||||
## Definition of Done
|
||||
<!-- DOD:BEGIN -->
|
||||
- [ ] #1 Feature has a clear toggle and persistence of preference if applicable.
|
||||
- [x] #1 Feature has a clear toggle and persistence of preference if applicable.
|
||||
- [x] #2 JLPT rendering is visually verified for all supported levels with distinct colors and no overlap/regression in subtitle legibility.
|
||||
<!-- DOD:END -->
|
||||
|
||||
## Note
|
||||
- Full performance/limits documentation and dictionary source/version/perf notes are deferred and tracked separately.
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
---
|
||||
id: TASK-23.1
|
||||
title: Implement JLPT token lookup service for subtitle words
|
||||
status: In Progress
|
||||
status: Done
|
||||
assignee: []
|
||||
created_date: '2026-02-13 16:42'
|
||||
updated_date: '2026-02-16 02:01'
|
||||
labels: []
|
||||
dependencies: []
|
||||
parent_task_id: TASK-23
|
||||
@@ -20,14 +21,11 @@ Create a lookup layer that parses/queries the bundled JLPT dictionary file and r
|
||||
<!-- AC:BEGIN -->
|
||||
- [x] #1 Service accepts a token/normalized token and returns JLPT level or no-match deterministically.
|
||||
- [x] #2 Lookup handles expected dictionary format edge cases and unknown tokens without throwing.
|
||||
- [ ] #3 Lookup path is efficient enough for frame-by-frame subtitle updates.
|
||||
- [x] #3 Lookup path is efficient enough for frame-by-frame subtitle updates.
|
||||
- [x] #4 Tokenizer interaction preserves existing token ordering and positions needed for rendering spans/underlines.
|
||||
- [ ] #5 Behavior on malformed/unsupported dictionary format is documented with fallback semantics.
|
||||
- [x] #5 Behavior on malformed/unsupported dictionary format is documented with fallback semantics.
|
||||
<!-- AC:END -->
|
||||
|
||||
## Note
|
||||
- Full performance and malformed-format limitation documentation is deferred per request and will be handled in a separate pass if needed.
|
||||
|
||||
## Definition of Done
|
||||
<!-- DOD:BEGIN -->
|
||||
- [x] #1 Lookup service returns JLPT level with deterministic output for test fixtures.
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
---
|
||||
id: TASK-23.2
|
||||
title: Bundle JLPT Yomitan dictionary assets for offline local lookup
|
||||
status: In Progress
|
||||
status: Done
|
||||
assignee: []
|
||||
created_date: '2026-02-13 16:42'
|
||||
updated_date: '2026-02-16 02:01'
|
||||
labels: []
|
||||
dependencies: []
|
||||
parent_task_id: TASK-23
|
||||
@@ -20,13 +21,10 @@ Package and include the JLPT Yomitan extension dictionary assets in SubMiner so
|
||||
<!-- AC:BEGIN -->
|
||||
- [x] #1 JLPT dictionary asset from the existing Yomitan extension is added to the repository/build output in a tracked, offline-available location.
|
||||
- [x] #2 The loader locates and opens the JLPT dictionary file deterministically at runtime.
|
||||
- [ ] #3 Dictionary version/source is documented so future updates are explicit and reproducible.
|
||||
- [ ] #4 Dictionary bundle size and load impact are documented in task notes or project docs.
|
||||
- [x] #3 Dictionary version/source is documented so future updates are explicit and reproducible.
|
||||
- [x] #4 Dictionary bundle size and load impact are documented in task notes or project docs.
|
||||
<!-- AC:END -->
|
||||
|
||||
## Note
|
||||
- Full dictionary source/version/performance notes are intentionally deferred for now (out of scope in this pass).
|
||||
|
||||
## Definition of Done
|
||||
<!-- DOD:BEGIN -->
|
||||
- [x] #1 Dictionary data is bundled and consumable during development and packaged app runs.
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
---
|
||||
id: TASK-23.4
|
||||
title: Add opt-in control and end-to-end flow + tests for JLPT tagging
|
||||
status: In Progress
|
||||
status: Done
|
||||
assignee: []
|
||||
created_date: '2026-02-13 16:42'
|
||||
updated_date: '2026-02-16 02:00'
|
||||
labels: []
|
||||
dependencies: []
|
||||
parent_task_id: TASK-23
|
||||
@@ -21,13 +22,10 @@ Add user/config setting to enable JLPT tagging, wire the feature toggle through
|
||||
- [x] #1 JLPT tagging is opt-in and defaults to disabled.
|
||||
- [x] #2 When disabled, lookup/rendering pipeline does not execute JLPT processing.
|
||||
- [x] #3 When enabled, end-to-end flow tags subtitle words via token-level lookup and rendering.
|
||||
- [ ] #4 Add tests covering at least one positive match, one non-match, and disabled state.
|
||||
- [x] #4 Add tests covering at least one positive match, one non-match, and disabled state.
|
||||
<!-- AC:END -->
|
||||
|
||||
## Note
|
||||
- Full end-to-end + disabled-state test coverage remains pending as an explicit follow-up item.
|
||||
|
||||
## Definition of Done
|
||||
<!-- DOD:BEGIN -->
|
||||
- [ ] #1 End-to-end option behavior and opt-in state persistence are implemented and verified.
|
||||
- [x] #1 End-to-end option behavior and opt-in state persistence are implemented and verified.
|
||||
<!-- DOD:END -->
|
||||
|
||||
Reference in New Issue
Block a user