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,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