- Cycle `v` through `hidden | visible | hover` instead of a boolean toggle - Add `subtitleStyle.primaryDefaultMode` config with default `visible` - Carry primary mode independently from secondary in hot-reload payload - Add hover CSS: transparent until hovered, then fully visible - Show primary-specific OSD text on each mode change
3.8 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, priority
| id | title | status | assignee | created_date | updated_date | labels | dependencies | priority | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-357 | Add primary subtitle bar visibility modes | Done |
|
2026-05-13 03:17 | 2026-05-13 03:24 |
|
medium |
Description
Update the primary subtitle bar visibility control so the v key cycles through the same mode model used by secondary subtitles: hidden, visible, and hover/auto. The primary and secondary subtitle bars must keep separate visibility state and config defaults, and primary visibility changes must identify the primary bar in OSD feedback.
Acceptance Criteria
- #1 Pressing
vcycles primary subtitle bar visibility through hidden, visible, and hover/auto without changing secondary subtitle visibility. - #2 In hover/auto mode, the primary subtitle bar is normally hidden but becomes visible and interactable when hovering over its reserved location.
- #3 Primary and secondary subtitle visibility modes have independent runtime state and config defaults.
- #4
subtitleStyleexposes a primary subtitle visibility default that defaults to visible and validates invalid values with a warning/fallback. - #5 OSD feedback is shown when primary visibility mode changes and clearly identifies the primary subtitle bar.
- #6 Relevant tests and config example/docs are updated.
Implementation Plan
- Add failing tests for primary subtitle mode config default/validation and renderer
vcycling/OSD behavior. - Add primary subtitle mode type/config default under
subtitleStyle, parse it with warning fallback, include it in generated example config. - Carry primary mode in renderer state/startup/hot-reload payloads independently from secondary mode.
- Replace primary boolean toggle with
hidden -> visible -> hovercycle and OSD textPrimary subtitle: <mode>. - Add primary hover CSS mirroring secondary hover behavior so hover mode reserves a hit area and becomes interactable on hover.
- Run focused tests, then broader relevant checks if time/environment allows.
Implementation Notes
Implemented primary subtitle visibility as independent PrimarySubMode (hidden | visible | hover) with renderer state, startup default from subtitleStyle.primaryDefaultMode, hot-reload payload propagation, and primary-specific OSD. Focused tests were added before implementation and all focused tests passed. Full relevant gate passed: bun run typecheck, bun run test:config, bun run test:fast, bun run test:env, bun run build, bun run test:smoke:dist, bun run docs:test, bun run docs:build, bun run format:check:src, and bun run changelog:lint.
Final Summary
Summary:
- Added
subtitleStyle.primaryDefaultModewith defaultvisible, enum validation, generated config examples, and renderer/hot-reload payload wiring. - Changed the primary subtitle bar
vaction from a boolean hide/show toggle to independenthidden | visible | hovermode cycling with OSD text that identifies the primary subtitle. - Added hover-mode CSS so the primary bar stays invisible until its location is hovered, then becomes visible and interactable.
Tests:
bun test src/config/resolve/subtitle-style.test.ts src/config/config.test.ts src/renderer/handlers/keyboard.test.ts src/renderer/subtitle-render.test.ts src/main/runtime/config-hot-reload-handlers.test.tsbun run typecheckbun run test:configbun run test:fastbun run test:envbun run buildbun run test:smoke:distbun run docs:testbun run docs:buildbun run format:check:srcbun run changelog:lint