mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 03:16:46 -07:00
2.5 KiB
2.5 KiB
id, title, status, assignee, created_date, updated_date, labels, milestone, dependencies, references, priority, ordinal
| id | title | status | assignee | created_date | updated_date | labels | milestone | dependencies | references | priority | ordinal | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-193 | Fix session chart event popup position drift | Done |
|
2026-03-17 23:55 | 2026-03-17 23:59 |
|
m-1 |
|
medium | 105600 |
Description
Fix the session timeline event popup trigger positions so hover markers stay aligned with the underlying chart event lines across the full visible time range.
Acceptance Criteria
- #1 Event popup triggers stay horizontally aligned with chart event lines from session start through session end.
- #2 Alignment logic uses the rendered chart plot area rather than guessed container percentages.
- #3 Regression coverage locks the marker-position projection math.
Implementation Plan
- Add a failing regression test for marker-position projection with chart offsets.
- Capture the rendered plot box from Recharts and pass it into the overlay.
- Position overlay markers in plot-area pixels, rerun targeted stats verification, then record the result.
Outcome
Completed. Session event hover markers now read the actual Recharts plot-area offset and width, then project marker X positions into plot-area pixels instead of full-container percentages. That keeps popup triggers aligned with the underlying reference lines across long session timelines.
Verification:
bun test stats/src/lib/session-events.test.ts stats/src/lib/session-detail.test.tsx stats/src/components/sessions/SessionEventPopover.test.tsxcd stats && bun run buildbun x prettier --check 'stats/src/components/sessions/SessionDetail.tsx' 'stats/src/components/sessions/SessionEventOverlay.tsx' 'stats/src/lib/session-events.ts' 'stats/src/lib/session-events.test.ts' 'backlog/tasks/task-193 - Fix-session-chart-event-popup-position-drift.md'bun run typecheck:statsstill fails on pre-existing unrelated errors insrc/components/anime/AnilistSelector.tsx,src/components/library/LibraryTab.tsx,src/lib/reading-utils.test.ts,src/lib/reading-utils.ts,src/lib/vocabulary-tab.test.ts, andsrc/lib/yomitan-lookup.test.tsx