mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
feat(subtitles): improve mpv hovered-token highlighting flow
- add subtitleStyle.hoverTokenColor config default + validation - normalize hover color payloads and propagate configured color to mpv runtime - refresh invisible overlay tokenization with current subtitle text and tighten hover overlay cleanup hooks - record TASK-98 and subagent coordination updates
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# Agent: `codex-mpv-hover-token-highlight-20260221T231509Z-n8x2`
|
||||
|
||||
- alias: `codex-mpv-hover-token-highlight`
|
||||
- mission: `Design and implement mpv OSD token hover highlighting fed from electron token hover state`
|
||||
- status: `completed`
|
||||
- branch: `main`
|
||||
- started_at: `2026-02-21T23:15:09Z`
|
||||
- heartbeat_minutes: `5`
|
||||
|
||||
## Current Work (newest first)
|
||||
- [2026-02-21T23:33:04Z] handoff: implemented invisible-overlay-only hovered-token mpv OSD highlighting path with renderer IPC -> main -> mpv `osd-overlay`; build + targeted tests green.
|
||||
- [2026-02-21T23:28:10Z] test: `bun run build`; `node --test dist/main/runtime/mpv-hover-highlight.test.js dist/core/services/ipc.test.js`; `node --test dist/renderer/subtitle-render.test.js`.
|
||||
- [2026-02-21T23:24:20Z] edit: added `mpv-hover-highlight` runtime helper + tests and wired app state + IPC hover reporting + renderer token index datasets/hover reporting.
|
||||
- [2026-02-21T23:18:40Z] progress: reviewed `Yomipv` selector hover render; feasible model is ASS re-render with per-token highlight and hitbox mapping.
|
||||
- [2026-02-21T23:17:50Z] progress: created backlog `TASK-98`; traced renderer token DOM + IPC handlers + mpv protocol events; no existing hover-token IPC path.
|
||||
- [2026-02-21T23:15:09Z] intent: read coordination + skills, create backlog linkage, inspect mpv/electron token highlight pipeline.
|
||||
|
||||
## Files Touched
|
||||
- `backlog/tasks/task-98 - Add-mpv-OSD-hovered-token-highlighting-from-electron-token-state.md`
|
||||
- `src/main/runtime/mpv-hover-highlight.ts`
|
||||
- `src/main/runtime/mpv-hover-highlight.test.ts`
|
||||
- `src/main.ts`
|
||||
- `src/main/state.ts`
|
||||
- `src/main/dependencies.ts`
|
||||
- `src/core/services/ipc.ts`
|
||||
- `src/core/services/ipc.test.ts`
|
||||
- `src/preload.ts`
|
||||
- `src/types.ts`
|
||||
- `src/renderer/renderer.ts`
|
||||
- `src/renderer/handlers/mouse.ts`
|
||||
- `src/renderer/subtitle-render.ts`
|
||||
- `src/renderer/state.ts`
|
||||
- `docs/subagents/agents/codex-mpv-hover-token-highlight-20260221T231509Z-n8x2.md`
|
||||
|
||||
## Assumptions
|
||||
- `osd-overlay` command path is available in connected mpv builds used by SubMiner.
|
||||
|
||||
## Open Questions / Blockers
|
||||
- None.
|
||||
|
||||
## Next Step
|
||||
- Wait for user validation in real mpv session; adjust highlight color/style if requested.
|
||||
- [2026-02-22T00:30:37Z] follow-up fix: invisible renderer path now renders token spans (when tokenized payload exists) instead of plain text only; hover token index reporting now has actual token targets.
|
||||
- [2026-02-22T00:30:37Z] test: rebuilt and reran `dist/main/runtime/mpv-hover-highlight.test.js`, `dist/core/services/ipc.test.js`, `dist/renderer/subtitle-render.test.js` (pass).
|
||||
- [2026-02-22T00:32:45Z] follow-up fix: overlay ASS now redraws full subtitle line and recolors hovered token instead of rendering only the hovered glyph; removes separate-character artifact.
|
||||
@@ -0,0 +1,14 @@
|
||||
# Agent: `codex-mpv-plugin-hover-20260222T004010Z-b3k9`
|
||||
|
||||
- alias: `codex-mpv-plugin-hover`
|
||||
- mission: `Shift mpv subtitle token highlighting from overlay hack to plugin-driven subtitle color mutation`
|
||||
- status: `completed`
|
||||
- branch: `main`
|
||||
- started_at: `2026-02-22T00:40:10Z`
|
||||
- heartbeat_minutes: `5`
|
||||
|
||||
## Current Work
|
||||
- [2026-02-22T01:22:00Z] implemented plugin-side hover handler in `plugin/subminer.lua`: parses `subminer-hover-token` payload, aligns tokens via startPos/endPos, renders highlighted subtitle via `mp.set_osd_ass`, and clears on invalid/revision-stale messages.
|
||||
- [2026-02-22T21:06:00Z] implemented plugin-directed payload path: Electron now sends `script-message-to yomipv yomipv-hover-token` JSON instead of osd-overlay ASS; added subtitle revision guard and hover payload metadata in runtime.
|
||||
- [2026-02-22T21:06:00Z] added `subtitle/hover_highlight.lua` module in Yomipv and wired init from `main.lua`.
|
||||
- [2026-02-22T21:06:00Z] added runtime tests for payload command generation and hover-clear behavior (`src/main/runtime/mpv-hover-highlight.test.ts`).
|
||||
Reference in New Issue
Block a user