mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
chore(workflow): sync backlog state and subagent coordination
Capture backlog task lifecycle updates, archive TASK-34, and add planning artifacts for recent config work. Update docs sweep scripts and AGENTS guidance to use sharded docs/subagents coordination metadata.
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
---
|
||||
id: TASK-34
|
||||
title: >-
|
||||
Add in-app episode browser (Ctrl+E) for local files and Jellyfin-ready
|
||||
metadata
|
||||
status: To Do
|
||||
assignee: []
|
||||
created_date: '2026-02-13 22:12'
|
||||
updated_date: '2026-02-13 22:13'
|
||||
labels: []
|
||||
dependencies: []
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
<!-- SECTION:DESCRIPTION:BEGIN -->
|
||||
|
||||
Implement an in-app episode browser invoked by Ctrl+E when mpv is open and connected to the Electron UI. The viewer should use the currently supplied directory (if app was launched with one) or fallback to the parent directory of the currently playing video. It should enumerate all available video files in target directory and sort them deterministically, then display them in a polished list/gallery with thumbnails in the Electron UI. Thumbnail behavior should prioritize existing matching images in the directory; otherwise generate thumbnails asynchronously in the background and update the modal as they become available. The same menu infrastructure should be shared with the planned Jellyfin integration and designed so it can display additional Jellyfin-sourced metadata without UI rewrites. It should also support launching/using an alternate picker mode compatible with external launcher UX patterns (e.g., via fzf/rofi), showing the same episode list/metadata in those contexts.
|
||||
|
||||
<!-- SECTION:DESCRIPTION:END -->
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
<!-- AC:BEGIN -->
|
||||
|
||||
- [ ] #1 Pressing Ctrl+E in connected mode opens an episode viewer modal and closes/overlays correctly in the Electron app.
|
||||
- [ ] #2 Episode browser source directory is resolved from CLI-provided path when present, else from currently playing video's parent directory.
|
||||
- [ ] #3 Browser enumerates all supported video files in target directory and sorts them deterministically (e.g., natural/season-episode aware when possible).
|
||||
- [ ] #4 Episode list/gallery renders a consistent, usable layout with title, position/index, and thumbnail placeholders.
|
||||
- [ ] #5 If a thumbnail image file with matching name exists in the directory, it is used without background generation.
|
||||
- [ ] #6 For files without matching thumbnails, background thumbnail generation runs and updates entries as images become available in the modal.
|
||||
- [ ] #7 Thumbnail generation is cancellable/abortable and does not block UI interaction.
|
||||
- [ ] #8 The same episode viewer component/path can be reused by Jellyfin integration and can accept extended metadata payloads (e.g., show title, season/episode, runtime, description).
|
||||
- [ ] #9 `fzf`/`rofi`-compatible episode picker mode is available so the same episode set can be browsed outside the Electron modal using either backend output format.
|
||||
- [ ] #10 Episode item ordering, labels, and metadata shown in fzf/rofi mode match the in-app sorting and identity scheme.
|
||||
- [ ] #11 Both picker modes (Electron modal and fzf/rofi) resolve source directory using the same CLI/parent-of-current-video precedence rules.
|
||||
- [ ] #12 When invoked through fzf/rofi, the selected episode can be played and returns focus/flow safely to the Electron-mpv workflow.
|
||||
<!-- AC:END -->
|
||||
|
||||
## Definition of Done
|
||||
|
||||
<!-- DOD:BEGIN -->
|
||||
|
||||
- [ ] #1 Feature supports Ctrl+E invocation from connected mpv session.
|
||||
- [ ] #2 Directory fallback behavior is implemented and validated with both passed-in and default paths.
|
||||
- [ ] #3 Video listing excludes unsupported formats and is correctly sorted.
|
||||
- [ ] #4 Existing local thumbnail matching works for common image/video naming patterns.
|
||||
- [ ] #5 Background thumbnail generation works asynchronously and updates UI in-place.
|
||||
- [ ] #6 UI is ready for Jellyfin metadata fields and does not require structural rewrite for server-provided data.
|
||||
- [ ] #7 No regressions in existing mpv-Electron controls for standard playback.
|
||||
<!-- DOD:END -->
|
||||
@@ -1,9 +1,11 @@
|
||||
---
|
||||
id: TASK-38
|
||||
title: Add user-friendly config validation errors on startup
|
||||
status: To Do
|
||||
assignee: []
|
||||
status: Done
|
||||
assignee:
|
||||
- codex-main
|
||||
created_date: '2026-02-14 02:02'
|
||||
updated_date: '2026-02-19 08:21'
|
||||
labels:
|
||||
- config
|
||||
- developer-experience
|
||||
@@ -15,7 +17,6 @@ priority: medium
|
||||
## Description
|
||||
|
||||
<!-- SECTION:DESCRIPTION:BEGIN -->
|
||||
|
||||
Improve config validation to surface clear, actionable error messages at startup when the user's config file has invalid values, missing required fields, or type mismatches.
|
||||
|
||||
## Motivation
|
||||
@@ -39,14 +40,43 @@ The project has a config schema with validation, but invalid configs (wrong type
|
||||
<!-- SECTION:DESCRIPTION:END -->
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
<!-- AC:BEGIN -->
|
||||
|
||||
- [ ] #1 All config fields are validated against the schema before service initialization.
|
||||
- [ ] #2 Validation errors show field path, expected type, and actual value.
|
||||
- [ ] #3 Multiple errors are collected and shown together, not one at a time.
|
||||
- [ ] #4 Deprecated or renamed fields produce a helpful migration suggestion.
|
||||
- [ ] #5 Non-critical validation issues allow startup with defaults and a visible warning.
|
||||
- [ ] #6 Critical validation failures prevent startup with a clear dialog or console message.
|
||||
- [ ] #7 Config file path is shown in error output.
|
||||
- [x] #1 All config fields are validated against the schema before service initialization.
|
||||
- [x] #2 Validation errors show field path, expected type, and actual value.
|
||||
- [x] #3 Multiple errors are collected and shown together, not one at a time.
|
||||
- [x] #4 Deprecated or renamed fields produce a helpful migration suggestion.
|
||||
- [x] #5 Non-critical validation issues allow startup with defaults and a visible warning.
|
||||
- [x] #6 Critical validation failures prevent startup with a clear dialog or console message.
|
||||
- [x] #7 Config file path is shown in error output.
|
||||
<!-- AC:END -->
|
||||
|
||||
## Implementation Plan
|
||||
|
||||
<!-- SECTION:PLAN:BEGIN -->
|
||||
1) Extend config warning coverage in `src/config/service.ts` (+ tests in `src/config/config.test.ts`) to include unknown top-level keys and deprecated `ankiConnect.openRouter` migration suggestions.
|
||||
2) Add startup critical validation in `src/core/services/startup.ts` (+ tests in `src/core/services/app-ready.test.ts`) so invalid Anki field mappings are treated as startup-blocking and aggregated.
|
||||
3) Wire end-to-end startup UX in `src/main.ts`: strict startup reload, fatal parse/config dialogs with config path, aggregated warning summary for non-critical issues, and visible warning notification.
|
||||
4) Verify with targeted test commands and update TASK-38 notes/acceptance criteria in Backlog.
|
||||
<!-- SECTION:PLAN:END -->
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
<!-- SECTION:NOTES:BEGIN -->
|
||||
Implemented startup config UX hardening across config resolver + app-ready lifecycle + Electron wiring.
|
||||
|
||||
Added non-fatal validation warnings for unknown top-level keys and deprecated `ankiConnect.openRouter` with migration suggestion to `ankiConnect.ai`.
|
||||
|
||||
Added startup critical validation for Anki field mappings when `ankiConnect.enabled === true`; app-ready now aborts before service initialization and reports aggregated critical errors.
|
||||
|
||||
Startup config reload now uses `reloadConfigStrict()`; parse failures show a clear `dialog.showErrorBox`, include config path, set non-zero exit code, and quit.
|
||||
|
||||
Added aggregated startup warning summary (path + expected/message + actual + fallback) with visible desktop notification while continuing startup with defaults.
|
||||
|
||||
Verification: `bun run build && node --test dist/config/config.test.js dist/core/services/app-ready.test.js` (pass: 39/39).
|
||||
<!-- SECTION:NOTES:END -->
|
||||
|
||||
## Final Summary
|
||||
|
||||
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
||||
Implemented startup config validation UX end-to-end: strict startup parse validation, aggregated warning/error reporting, migration guidance for deprecated config keys, and startup-blocking critical checks for invalid Anki field mappings. Added targeted test coverage for config warnings and app-ready critical validation flow; verification passed with `bun run build && node --test dist/config/config.test.js dist/core/services/app-ready.test.js`.
|
||||
<!-- SECTION:FINAL_SUMMARY:END -->
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
---
|
||||
id: TASK-69
|
||||
title: Harden legacy config migration validation and deprecation handling
|
||||
status: To Do
|
||||
assignee: []
|
||||
status: Done
|
||||
assignee:
|
||||
- codex-main
|
||||
created_date: '2026-02-18 11:35'
|
||||
updated_date: '2026-02-18 11:35'
|
||||
updated_date: '2026-02-19 08:27'
|
||||
labels:
|
||||
- config
|
||||
- validation
|
||||
@@ -32,15 +33,40 @@ priority: high
|
||||
|
||||
## Acceptance Criteria
|
||||
<!-- AC:BEGIN -->
|
||||
- [ ] #1 No legacy key path writes directly to resolved config without type validation
|
||||
- [ ] #2 Invalid legacy values produce warnings and safe fallback behavior
|
||||
- [ ] #3 Valid legacy configs still map to equivalent resolved config
|
||||
- [ ] #4 Config test suite includes legacy-invalid regression coverage
|
||||
- [x] #1 No legacy key path writes directly to resolved config without type validation
|
||||
- [x] #2 Invalid legacy values produce warnings and safe fallback behavior
|
||||
- [x] #3 Valid legacy configs still map to equivalent resolved config
|
||||
- [x] #4 Config test suite includes legacy-invalid regression coverage
|
||||
<!-- AC:END -->
|
||||
|
||||
## Implementation Plan
|
||||
|
||||
<!-- SECTION:PLAN:BEGIN -->
|
||||
Implementation plan saved at `docs/plans/2026-02-19-task-69-legacy-config-migration-hardening.md`.
|
||||
|
||||
Execution breakdown:
|
||||
1. Add failing regression tests for invalid legacy `ankiConnect` migration values and valid-legacy compatibility behavior.
|
||||
2. Replace unchecked `mapLegacy` casts in `src/config/service.ts` with typed validators using `asString`/`asBoolean`/`asNumber` plus enum/range checks; warn on invalid legacy input and keep deprecation warnings.
|
||||
3. Preserve modern key precedence and existing `ankiConnect.openRouter` deprecation behavior.
|
||||
4. Run `bun run build && bun run test:config:dist` to verify.
|
||||
5. Update `docs/configuration.md` only if migration/deprecation behavior clarification is needed.
|
||||
6. Append notes and acceptance progress back into TASK-69.
|
||||
<!-- SECTION:PLAN:END -->
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
<!-- SECTION:NOTES:BEGIN -->
|
||||
Implemented legacy migration hardening in `src/config/service.ts` by filtering top-level legacy keys out of broad `ankiConnect` merge and replacing unchecked `mapLegacy` casts with parser-backed legacy mapping (`asString`/`asBoolean`/range+enum validators). Invalid legacy values now emit warnings and keep safe fallback values; valid legacy values still map when modern key is absent.
|
||||
|
||||
Added regression tests in `src/config/config.test.ts`: `falls back and warns when legacy ankiConnect migration values are invalid` and `maps valid legacy ankiConnect values to equivalent modern config`.
|
||||
|
||||
Updated docs in `docs/configuration.md` to clarify that legacy top-level `ankiConnect` migration keys are compatibility-only, validated, and ignored with warnings when invalid.
|
||||
|
||||
Verification: `bun run build && bun run test:config:dist` passed (32/32).
|
||||
<!-- SECTION:NOTES:END -->
|
||||
|
||||
## Definition of Done
|
||||
<!-- DOD:BEGIN -->
|
||||
- [ ] #1 `bun run test:config:dist` passes
|
||||
- [ ] #2 Any doc changes for migration/deprecation are committed
|
||||
- [x] #1 `bun run test:config:dist` passes
|
||||
- [x] #2 Any doc changes for migration/deprecation are committed
|
||||
<!-- DOD:END -->
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
---
|
||||
id: TASK-84
|
||||
title: Gate feature-dependent keybindings behind config flags
|
||||
status: To Do
|
||||
assignee: []
|
||||
created_date: '2026-02-19 08:41'
|
||||
labels: []
|
||||
dependencies: []
|
||||
priority: medium
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
<!-- SECTION:DESCRIPTION:BEGIN -->
|
||||
Ensure feature-specific keybindings only work when their related feature is enabled in configuration, so users do not trigger unavailable behavior and the app avoids loading integrations that are disabled (for example Jellyfin).
|
||||
<!-- SECTION:DESCRIPTION:END -->
|
||||
|
||||
## Acceptance Criteria
|
||||
<!-- AC:BEGIN -->
|
||||
- [ ] #1 Feature-dependent keybindings are effectively disabled when their corresponding feature flag/config is off, with no user-facing error dialogs.
|
||||
- [ ] #2 When a feature is disabled in config, its related integration code is not loaded or initialized during startup (including Jellyfin as a concrete case).
|
||||
- [ ] #3 When a feature is enabled, existing keybinding behavior continues to work as expected.
|
||||
- [ ] #4 Automated tests cover enabled and disabled paths for keybinding gating and disabled-integration loading behavior.
|
||||
- [ ] #5 User-facing docs/config guidance explain that feature keybindings require the corresponding feature to be enabled.
|
||||
<!-- AC:END -->
|
||||
Reference in New Issue
Block a user