Skip to content

fix(web): brief timestamp, Ask flicker+typing, chart polish, drop Habits - #5

Merged
8tp merged 1 commit into
mainfrom
fix/ui-polish-batch
Jun 23, 2026
Merged

fix(web): brief timestamp, Ask flicker+typing, chart polish, drop Habits#5
8tp merged 1 commit into
mainfrom
fix/ui-polish-batch

Conversation

@8tp

@8tp 8tp commented Jun 23, 2026

Copy link
Copy Markdown
Owner

A batch of dashboard/Trends/Ask polish + the Habits removal.

  • Brief timestamp — was showing the wrong time (e.g. "03:17 PM"): new Date() parsed sqlite's tz-less UTC string as local. Now normalized via the existing toEpoch helper; the header date uses the briefing's civil date.
  • Trends/charts looked stretchedSparkline rendered a fixed 360 viewBox with preserveAspectRatio="none", horizontally stretching strokes and the marker into an oval. Rewritten to render at its measured pixel width (1:1, undistorted) with per-day hover tooltips (date + value + guide line). Wired into Trends, Sleep, and Dashboard.
  • Ask AI flickeruseConfigStatus returned null for both loading and error, so the page flashed the setup empty-state before the chat mounted. Now undefined = loading; the page holds a stable frame until it resolves.
  • Ask AI typing animation — the backend returns the whole answer at once, so it snapped in. useAsk now reveals it with a typewriter (~1.5s steady pace) and the caret blinks until the reveal finishes.
  • Habits — removed from nav + router (code left in place for easy re-enable).

Verified: typecheck + lint + 20 tests + web build green; Trends screenshot confirms clean, undistorted charts.

🤖 Generated with Claude Code

- Brief timestamp: render createdAt via the existing UTC normalization (sqlite
  stores tz-less UTC; new Date() misread it as local → wrong time). Header date
  now uses the briefing's civil date.
- Charts: Sparkline rendered at measured pixel width instead of a fixed 360
  viewBox with preserveAspectRatio=none — fixes the stretched/distorted strokes
  and oval marker. Adds per-day hover tooltips (date + value + guide line),
  wired into Trends, Sleep, and Dashboard.
- Ask AI flicker: useConfigStatus now distinguishes loading (undefined) from
  failure (null); AskPage holds a stable frame until config resolves instead of
  flashing the setup empty-state.
- Ask AI typing: useAsk reveals the reply with a typewriter (steady ~1.5s pace)
  so the assistant types its answer back; caret persists until the reveal ends.
- Remove the Habits page from the nav + router (not deleting the code).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@8tp
8tp merged commit ae89597 into main Jun 23, 2026
2 checks passed
@8tp
8tp deleted the fix/ui-polish-batch branch June 23, 2026 15:33
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