Skip to content

feat(ui): add settings profile page with lifetime token stats, streaks, and activity heatmap#102842

Merged
steipete merged 3 commits into
mainfrom
claude/settings-profile-section-962d93
Jul 9, 2026
Merged

feat(ui): add settings profile page with lifetime token stats, streaks, and activity heatmap#102842
steipete merged 3 commits into
mainfrom
claude/settings-profile-section-962d93

Conversation

@steipete

@steipete steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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.cost and sessions.usage, range: "all", local-day buckets). Two additive aggregate response fields (aggregates.sessionCount, aggregates.longestSessionDurationMs) were added to sessions.usage so 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 reports refreshing/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

dark light mobile
dark light mobile

Screenshots come from the mock-gateway harness (pnpm dev:ui:mock), which now ships deterministic profile fixtures.

Validation (Blacksmith Testbox, delegated runs):

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts size: XL maintainer Maintainer-authored PR labels Jul 9, 2026
@steipete
steipete force-pushed the claude/settings-profile-section-962d93 branch from 3349888 to dd4a3ee Compare July 9, 2026 13:25
@clawsweeper

clawsweeper Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head dd4a3eec962b39da10ced9bb7c0a9ecdc25a4782, but the PR head is now 455308864c4b9008a76cae7d33372a5835f4d735. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

@steipete
steipete force-pushed the claude/settings-profile-section-962d93 branch from dd4a3ee to 4553088 Compare July 9, 2026 13:50
@steipete
steipete merged commit 2f01338 into main Jul 9, 2026
98 checks passed
@steipete
steipete deleted the claude/settings-profile-section-962d93 branch July 9, 2026 14:03
@steipete

steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Settings profile page — lifetime token stats, streaks, and activity heatmap

1 participant