Skip to content

feat(timeline): day-resolution tooltip + phone-friendly rail and taps#133

Closed
bndct-devops wants to merge 1 commit into
fix/mobile-stats-headerfrom
feat/timeline-polish
Closed

feat(timeline): day-resolution tooltip + phone-friendly rail and taps#133
bndct-devops wants to merge 1 commit into
fix/mobile-stats-headerfrom
feat/timeline-polish

Conversation

@bndct-devops

Copy link
Copy Markdown
Owner

Overnight run PR 2/12 — stacked on #132; merge in order.

What

  • Day-resolution tooltip: hovering a bar now resolves the exact day under the cursor — "15 May · 22m", or "no reading" on a gap day — as an accent line under the book totals. You ran into this gap while testing: the ticks encoded day data but the tooltip only answered at book level.
  • Mobile pass: below 480px the series rail narrows 200→96px so the ribbon keeps most of the screen; on touch devices the first tap on a bar shows the tooltip and a second tap on the same bar opens the book (tap elsewhere or scroll dismisses). Previously any tap navigated instantly, making "inspect" impossible.

Dropped from scope, deliberately

The book-page activity sparkline from the idea sheet is not in here: while building it I found the per-book stats hero already charts per-day activity for both data sources — compute_book_reading_stats synthesizes sessions from imported page-stats, so even device-only books get the hero with its day chart. The strip would have been a duplicate chart directly under an identical one. Marked accordingly on the sheet; no code shipped for it.

Verification

  • WebKit iPhone 13 (touch): first tap keeps you on /stats with the tooltip up (screenshot shows the new day line), second tap navigates to the book. Narrow rail active.
  • Chromium desktop: hover tooltip shows "May 15 · 22m" day line.
  • Frontend build/typecheck clean. No backend changes.

- The tooltip resolves the day under the cursor (date + that day's minutes,
  or "no reading" inside a gap) below the book totals — the per-day data was
  only legible as tick opacity before.
- Phones (<480px container): the rail narrows 200->96px so the ribbon keeps
  the viewport; coarse-pointer taps inspect first (tooltip), navigate on the
  second tap on the same bar. Scroll or empty-space tap dismisses.

Book-page activity sparkline (planned as part of this PR) was investigated
and dropped: the per-book stats hero already charts per-day activity for
both live sessions and imported page-stats (sessions are synthesized from
page-stats), so the strip would duplicate an adjacent chart.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant