Files
SubMiner/backlog/tasks/task-104 - Mirror-overlay-annotation-hover-behavior-in-vendored-texthooker.md
sudacode 5d96f9d535 Add annotation websocket and texthooker startup config
- Add `texthooker.launchAtStartup` (default `true`) and wire startup behavior
- Add dedicated `annotationWebsocket` config/service path (default port `6678`) for texthooker annotations
- Regenerate config example/tests and update Yomitan patching/vendor assets
2026-03-07 01:41:08 -08:00

2.4 KiB

id, title, status, assignee, created_date, updated_date, labels, dependencies, references, priority
id title status assignee created_date updated_date labels dependencies references priority
TASK-104 Mirror overlay annotation hover behavior in vendored texthooker Done
codex
2026-03-06 21:45 2026-03-06 21:45
texthooker
subtitle
websocket
TASK-103
/home/sudacode/projects/japanese/SubMiner/src/core/services/subtitle-ws.ts
/home/sudacode/projects/japanese/SubMiner/vendor/texthooker-ui/src/components/App.svelte
/home/sudacode/projects/japanese/SubMiner/vendor/texthooker-ui/src/line-markup.ts
/home/sudacode/projects/japanese/SubMiner/vendor/texthooker-ui/src/app.css
medium

Description

Bring bundled texthooker annotation rendering closer to the visible overlay. Keep the lightweight texthooker UX, but preserve token metadata for hover, match overlay color-precedence rules across known/N+1/name/frequency/JLPT, expose name-match highlighting as a toggle, and emit a structured annotation payload on the dedicated websocket so non-SubMiner clients can treat it as an API.

Acceptance Criteria

  • #1 Annotation websocket payload includes both rendered sentence HTML and structured token metadata for generic clients.
  • #2 Vendored texthooker preserves annotation metadata attrs needed for hover labels and uses overlay-matching color precedence rules.
  • #3 Vendored texthooker supports character-name highlighting with a user-facing toggle and standalone-web note.
  • #4 Hovering annotated texthooker tokens reveals JLPT/frequency metadata without adding the full overlay popup workflow.
  • #5 Focused serializer, texthooker markup, socket parsing, CSS, and build verification pass.

Final Summary

Extended the dedicated annotation websocket payload to ship version, plain text, rendered sentence, and structured tokens metadata while keeping backward-compatible sentence consumers working. Updated the vendored texthooker to preserve hover metadata attrs, follow overlay color precedence for known/N+1/name/frequency/JLPT annotations, add a character-name highlight toggle plus standalone-web dictionary note, and render lightweight hover labels for frequency/JLPT metadata. Added focused regression coverage and rebuilt both the vendored texthooker bundle and SubMiner.