Skip to content

Tap a day's bar on the phone's Usage screen to see that day - #1911

Merged
DoodleBears merged 2 commits into
mainfrom
claude/project-thread-55eh0x-usage-scrub
Oct 15, 2026
Merged

DoodleBears merged 2 commits into
mainfrom
claude/project-thread-55eh0x-usage-scrub

Conversation

@DoodleBears

Copy link
Copy Markdown
Contributor

Requested by Vain · project thread

Why the change

On the phone's Usage screen you could see 7 daily bars but not how many tokens any one day used; now, like the iOS Health app, tapping a bar shows that day.

Refs #1896, follows #1899.

Special things to note

  • Merge risk: mobile-only, read-only, no new Host call (the days already come in overviewUsage), so CLI parity is unchanged (deepseekbot overview-usage already returns each day). Tapping a bar replaces the dates and total above the chart with that day's date and tokens (N+ when the Host marks the day partial) and dims the other bars to the new chart.dim. Tapping the same bar again, or switching Today / Last 7 days, shows the week again. By kind and By PersonaBot stay on the week. DayBars takes optional selected / onSelect; without onSelect (the Settings card, and Show a Bot's last 7 days on the mobile profile, with an Activity screen for the detail #1903's profile chart) the bars stay a plain picture, so the card's tap still opens Usage. VoiceOver keeps reading the whole week from the chart's label. Revert is a plain revert.
  • Verification:
    • Automated: pnpm typecheck, pnpm lint, pnpm format:check, vitest run apps/mobile (42 files) pass. New screen tests: tapping a quiet day shows 0 tokens and its date, tapping a busy day shows its tokens, tapping it again shows the week total; switching the period forgets the picked day.
    • Runtime: node scripts/e2e-mobile-usage-web.mjs passes against a fresh isolated Host with the real model, and now also taps a quiet day (headline 0 tokens), a busy day (that day's tokens) and the busy day again (week total).
    • Not run: a native build (no simulator here). I first tried press-and-slide across the bars like Health; tap is what shipped because I could verify it end to end. Slide can follow if wanted.
  • CI test plan: affected.

Change outline

  • src/ui/primitives/day-bars.tsx: each day column is a Pressable (disabled without onSelect), dimmed when another day is selected.
  • src/ui/usage-view.tsx: UsageSummary keeps the picked day and shows it in the headline; src/host/usage.ts carries each day's partial.
  • apps/mobile/DESIGN.md, the verify feature map and the e2e journey describe and check the tap.

Before (week) and after (a quiet day tapped), web export 390 × 844, live Host data:

Week, light Day picked, light

Week, dark Day picked, dark

🤖 Generated with Claude Code

https://claude.ai/code/session_01U1JSurmR8K71uTv8K3rT4w


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U1JSurmR8K71uTv8K3rT4w
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c2cc30f3-dbd5-4869-9e2b-903bb123018d
📥 Commits

Reviewing files that changed from the base of the PR and between 10384a0 and 5598a1d.

⛔ Files ignored due to path filters: 4
  • .github/pr-screenshots/usage-day-tap/day-dark.png is excluded by !**/*.png
  • .github/pr-screenshots/usage-day-tap/day-light.png is excluded by !**/*.png
  • .github/pr-screenshots/usage-day-tap/week-dark.png is excluded by !**/*.png
  • .github/pr-screenshots/usage-day-tap/week-light.png is excluded by !**/*.png
📒 Files selected for processing: 10
  • .agents/skills/verify-deepseekbot/features/phone-usage.md
  • apps/mobile/DESIGN.md
  • apps/mobile/src/host/usage.ts
  • apps/mobile/src/ui/design/chart.ts
  • apps/mobile/src/ui/primitives/day-bars.tsx
  • apps/mobile/src/ui/shell/usage-card.tsx
  • apps/mobile/src/ui/usage-view.tsx
  • apps/mobile/test/usage-screen.test.tsx
  • changes/1911-usage-day-tap.md
  • scripts/e2e-mobile-usage-web.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U1JSurmR8K71uTv8K3rT4w
@DoodleBears
DoodleBears merged commit b1ad397 into main Oct 15, 2026
9 checks passed
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.

2 participants