feat(ui): add settings profile page with lifetime token stats, streaks, and activity heatmap#102842
Merged
Merged
Conversation
steipete
force-pushed
the
claude/settings-profile-section-962d93
branch
from
July 9, 2026 13:25
3349888 to
dd4a3ee
Compare
Contributor
|
Codex review: stale review; fresh review needed. Summary Next step |
steipete
force-pushed
the
claude/settings-profile-section-962d93
branch
from
July 9, 2026 13:50
dd4a3ee to
4553088
Compare
Contributor
Author
|
Merged via squash.
|
This was referenced Jul 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 10, 2026
…s, and activity heatmap (openclaw#102842) * feat(ui): add settings profile i18n strings and regenerated locale bundles * feat(ui): add settings profile page with token stats, streak heatmap, and top tools * chore(ui): record intentional OpenClaw brand string in raw-copy baseline
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.
Closes #102841
What Problem This Solves
OpenClaw tracks rich lifetime usage per session (tokens, cost, tools, channels, models) but only surfaces it through the analysis-oriented Usage dashboard. There was no glanceable identity page summarizing an install's lifetime activity. This adds a Profile section to the Control UI settings: your agent's stats, streaks, and life in the reef.
Why This Change Was Made
Built as a settings takeover page fed entirely by existing gateway RPCs (
usage.costandsessions.usage,range: "all", local-day buckets). Two additive aggregate response fields (aggregates.sessionCount,aggregates.longestSessionDurationMs) were added tosessions.usageso headline stats are computed over every matched session instead of the 1,000-row page; sessions are counted only when they have in-range activity (discovery deliberately admits transcripts modified after the range end). The page polls while the server-side usage cache reportsrefreshing/partial(5s, backing off to 60s) so cold caches converge instead of freezing first-load numbers, and it clears state when the gateway client changes. Non-goal: DST-aware historical day bucketing — the page inherits the existing fixed-UTC-offset "local" semantics of the Usage page; a usage-wide IANA-timezone follow-up is noted inline.User Impact
Settings gains a Profile section (
/settings/profile, lobster icon) showing: agent identity hero (avatar/emoji, agent id, "in the reef since", top channels), a stat strip (lifetime tokens with approximate cost, peak day, longest session, current/longest streak), a 52-week token-activity heatmap, activity insights (most used model, messages, tool calls, distinct tools, agents, sessions), and most-used tools with run counts. Localized into all 20 Control UI locales; light/dark and mobile layouts supported. No config surface added.Evidence
Screenshots come from the mock-gateway harness (
pnpm dev:ui:mock), which now ships deterministic profile fixtures.Validation (Blacksmith Testbox, delegated runs):
pnpm test ui/src/pages/profile/stats.node.test.ts— 13 unit tests (token/duration formatting, streak edges, heatmap alignment + quartile levels, aggregate preference): https://github.com/openclaw/openclaw/actions/runs/29016769080pnpm test ui/src/e2e/profile-page.e2e.test.ts— 3 mocked-gateway Playwright cases (full render incl. hero/stats/heatmap/insights, cold-cache loading state, fresh-shell empty state)pnpm test src/gateway/server-methods/usage.sessions-usage.test.ts— extends the sessions.usage: aggregate totals silently capped by limit parameter #76496 cap-regression test: aggregate count/duration cover rows hidden bylimit, and discovered-but-inactive sessions stay out ofsessionCountpnpm test ui/src/app-navigation.test.ts ui/src/app-navigation-groups.test.ts— route/nav registriespnpm buildgreen;pnpm check:changedgreen (11m full lanes): https://github.com/openclaw/openclaw/actions/runs/29019381228pnpm ui:i18n:checkgreen, including keyless (CI parity); locale bundles regenerated viapnpm ui:i18n:sync