mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-01 06:12:07 -07:00
chore: add backlog tasks for axios migration, remote backend, and PR-38
- TASK-264: replace axios with native fetch across the project - TASK-265: add remote Postgres backend for immersion tracking and stats - TASK-268: address CodeRabbit review action items for PR #38 (done)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
---
|
||||
id: TASK-264
|
||||
title: Replace axios with native fetch across the project
|
||||
status: To Do
|
||||
assignee: []
|
||||
created_date: '2026-04-01 00:44'
|
||||
labels: []
|
||||
dependencies: []
|
||||
priority: medium
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
<!-- SECTION:DESCRIPTION:BEGIN -->
|
||||
Remove axios from the codebase and migrate all project HTTP requests to the platform fetch API, preserving existing request behavior and error handling where applicable.
|
||||
<!-- SECTION:DESCRIPTION:END -->
|
||||
|
||||
## Acceptance Criteria
|
||||
<!-- AC:BEGIN -->
|
||||
- [ ] #1 No production code paths import or depend on axios.
|
||||
- [ ] #2 All existing HTTP requests use fetch or a project-local abstraction built on fetch.
|
||||
- [ ] #3 Request behavior remains functionally equivalent for headers, query params, bodies, status handling, and abort/error cases that are currently supported.
|
||||
- [ ] #4 Tests are updated or added to cover the migrated request flows.
|
||||
- [ ] #5 Documentation is updated if any request semantics or setup steps change.
|
||||
- [ ] #6 axios is removed from project dependencies if it is no longer needed.
|
||||
<!-- AC:END -->
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
id: TASK-265
|
||||
title: Add remote backend for immersion tracking and stats (prefer Postgres)
|
||||
status: To Do
|
||||
assignee: []
|
||||
created_date: '2026-04-01 00:47'
|
||||
labels: []
|
||||
dependencies: []
|
||||
references:
|
||||
- >-
|
||||
/home/sudacode/projects/japanese/SubMiner/src/core/services/immersion-tracker-service.ts
|
||||
- >-
|
||||
/home/sudacode/projects/japanese/SubMiner/src/core/services/immersion-tracker/storage.ts
|
||||
- >-
|
||||
/home/sudacode/projects/japanese/SubMiner/src/core/services/immersion-tracker/sqlite.ts
|
||||
- /home/sudacode/projects/japanese/SubMiner/src/stats-daemon-runner.ts
|
||||
- /home/sudacode/projects/japanese/SubMiner/src/core/services/stats-server.ts
|
||||
- /home/sudacode/projects/japanese/SubMiner/src/main/boot/services.ts
|
||||
- /home/sudacode/projects/japanese/SubMiner/package.json
|
||||
documentation:
|
||||
- /home/sudacode/projects/japanese/SubMiner/docs/architecture/README.md
|
||||
- >-
|
||||
/home/sudacode/projects/japanese/SubMiner/docs/architecture/stats-trends-data-flow.md
|
||||
- /home/sudacode/projects/japanese/SubMiner/README.md
|
||||
- /home/sudacode/projects/japanese/SubMiner/config.example.jsonc
|
||||
priority: high
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
<!-- SECTION:DESCRIPTION:BEGIN -->
|
||||
Enable immersion tracking/stats to use a remote authoritative backend so multiple devices can share the same history.
|
||||
|
||||
Current state: `ImmersionTrackerService` opens a local `immersion.sqlite` file from the app data/config path, `stats-daemon-runner` points at that same local file, and `config.example.jsonc` only exposes `immersionTracking.dbPath` for a local path override. The stats API/dashboard reads from the same tracker service and assumes the local database is the source of truth.
|
||||
|
||||
Goal: add a remote backend option that avoids shared filesystem/database-file syncing between devices. Do not use SSH/rsync/shared network filesystem as the primary sync strategy for live multi-device use.
|
||||
|
||||
Backend choice: prefer Postgres if it can be integrated without a broad new dependency surface or destabilizing the current runtime; otherwise use the least invasive remote backend that can be shipped with the current stack and document the tradeoff clearly. Preserve the current local SQLite mode as the default/offline fallback if possible.
|
||||
|
||||
This ticket should cover the full product/architecture change: configuration, storage access, stats reads, startup/error handling, migration/bootstrap from existing local data, tests, and docs.
|
||||
<!-- SECTION:DESCRIPTION:END -->
|
||||
|
||||
## Acceptance Criteria
|
||||
<!-- AC:BEGIN -->
|
||||
- [ ] #1 The app can be configured to use a remote authoritative backend for immersion tracking instead of only a local `immersion.sqlite` file.
|
||||
- [ ] #2 The chosen backend persists tracker writes and serves the existing stats read models across app restarts.
|
||||
- [ ] #3 Two devices can point at the same remote backend without relying on a shared filesystem or raw SQLite file sync.
|
||||
- [ ] #4 Local SQLite remains supported as the default or fallback mode for offline use.
|
||||
- [ ] #5 If the remote backend is unavailable or misconfigured, startup/write paths fail with actionable errors instead of silent data loss.
|
||||
- [ ] #6 A migration or bootstrap path exists to move existing local immersion data into the remote backend or seed a new device from it.
|
||||
- [ ] #7 Config/examples/docs explain the backend choice, required connection/setup details, and any security/network assumptions.
|
||||
- [ ] #8 Tests cover backend selection plus at least one representative write/read path against the remote backend.
|
||||
<!-- AC:END -->
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
id: TASK-268
|
||||
title: 'Address CodeRabbit review action items for PR #38'
|
||||
status: Done
|
||||
assignee: []
|
||||
created_date: '2026-04-01 05:35'
|
||||
updated_date: '2026-04-01 05:40'
|
||||
labels:
|
||||
- pr-review
|
||||
- coderabbit
|
||||
dependencies: []
|
||||
references:
|
||||
- 'https://github.com/ksyasuda/SubMiner/pull/38'
|
||||
priority: medium
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
<!-- SECTION:DESCRIPTION:BEGIN -->
|
||||
Review unresolved CodeRabbit feedback on PR #38 and implement the actionable fixes without regressing duplicate grouping or popup behavior.
|
||||
<!-- SECTION:DESCRIPTION:END -->
|
||||
|
||||
## Acceptance Criteria
|
||||
<!-- AC:BEGIN -->
|
||||
- [x] #1 All unresolved actionable CodeRabbit review comments on PR #38 are triaged and either fixed in code or explicitly identified as non-actionable or ambiguous.
|
||||
- [x] #2 Code changes preserve duplicate grouping and popup flow behavior covered by existing or added regression tests.
|
||||
- [x] #3 Relevant local verification for the affected areas passes.
|
||||
<!-- AC:END -->
|
||||
|
||||
## Final Summary
|
||||
|
||||
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
||||
Addressed all unresolved actionable CodeRabbit comments on PR #38. Fixed duplicate tracking so empty duplicate lists are not persisted after sentence-card creation, sanitized Yomitan add-note noteId values to accept only positive integers, preserved paused playback for configured subtitle-seek keybindings when pause state is unknown, and short-circuited duplicate exact-match scanning for single-result lookups. Added regression tests for each case and verified with `bun test` on the affected suites plus `bun run typecheck`, `bun run test:fast`, `bun run test:env`, `bun run build`, and `bun run test:smoke:dist`.
|
||||
<!-- SECTION:FINAL_SUMMARY:END -->
|
||||
Reference in New Issue
Block a user