Repository navigation
Show a Bot's last 7 days on the mobile profile, with an Activity screen for the detail - #1903
Merged
Merged
Conversation
…creen with the detail Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGYM4VZHNRXNUap8oQMGdA
…t activity views; add PR screenshots Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGYM4VZHNRXNUap8oQMGdA
|
Warning Review limit reachedYou'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 39 minutes. View limit details
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. Comment |
… heatmap layout with the screen tests Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGYM4VZHNRXNUap8oQMGdA
…to claude/project-thread-anbtuc
…to claude/project-thread-anbtuc
…s, so token counts are real Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGYM4VZHNRXNUap8oQMGdA
DoodleBears
changed the base branch from
claude/project-thread-55eh0x
to
main
October 15, 2026 16:05
DoodleBears
marked this pull request as ready for review
October 15, 2026 16:05
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Vain · project thread
Why the change
From the phone the Human could not see how much a Bot costs or how active it is. Now the Bot profile shows a light "Last 7 days" card, like a health app's summary, and tapping it opens an Activity screen with the detail.
Closes #1895 (part of #1893). Stacked on #1899 (it shares that PR's
Segmentedswitch and theDayBarschart that #1899 took from this branch); review only this PR's own commits, not the merges from #1899. Once #1899 merges this PR retargets tomain.Special things to note
profileActivitybridge method with{ channelId, weeks, before }; no Host change and no new bridge method, so CLI parity is unchanged (deepseekbot bot-activity-historyalready exists). Revert is a plain revert.src/host/bot-activity.ts: defensive parsing (a bad answer fails only this section, like the other profile parts), the 7-day slice (weeks: 1covers a little of an eighth day, which is left out), and paging by whole windows withbefore.modelUsageRows[].totalTokens, the same number the Web profile's Token usage card shows; unknown buckets show as "Partially known" with the Web's partial-data note, never as zero.DayBars(one bar per day or week, optionally stacked) andDayHeat(weeks × weekdays heatmap) inprimitives/, with tones derived from the Bot's colour indesign/chart.ts. No existing primitive drew a chart; no chart library.tsc --noEmit(root),pnpm --filter @botharness/mobile typecheck,pnpm vitest run apps/mobile(43 files, 333 tests),pnpm lint,oxfmt --checkall pass locally.test/bot-activity.test.ts: parsing, 7-day slicing, quiet week, unknown vs zero, token split, by model, by reason, weekly buckets, paging.test/bot-profile.test.ts: the profile callsprofileActivitythrough the DM withweeks: 1, and a failed call leaves the other sections. It uses an answer recorded from a real isolated Host (test/fixtures/host-wire.json→rpc.profileActivity): 207,439 tokens, 2 events and 2 Memory commits today.test/bot-profile-sheet.test.tsxandtest/activity-detail.test.tsx(jsdom + RN shim): the card shows the total and opens Activity; a quiet week; Try again; switching windows refetches; Earlier/Later paging; the Memory heatmap layout.test/wire-contract.ts.opencode-go/step-5-preview-free; the Bot-side numbers (tokens, usage row, events, Memory commits) are real Host output.apps/mobile/test/, already covered by the plan. Note for.tstests there: the roottscincludes them, so they must not import React Native UI files (that pulls RN globals into Node packages); the heatmap test therefore lives in the.tsxscreen test.Change outline
display, a 7-day bar row, then a smaller row of events plus Memory commits with weekday initials. A Bot with no activity shows a quiet week; a failed read shows "Could not read this section" with Try again.app/bot/[slug]/activity.tsx→ActivityDetailView:weeks1 / 4 / 26) with ‹ › paging.DESIGN.mddescribes both levels; change fragmentchanges/1895-mobile-bot-activity.md.Before: the profile went straight from the actions to Identity. After:
Bot profile, Last 7 days
Activity, 7 days
Activity, 4 weeks
Activity, 6 months (weekly bars, Memory heatmap)
🤖 Generated with Claude Code
https://claude.ai/code/session_01WGYM4VZHNRXNUap8oQMGdA