Repository navigation
refactor(ui): split Profile (identity) from Usage (statistics) - #115245
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 11:18 AM ET / 15:18 UTC. ClawSweeper reviewWhat this changesThis PR makes Profile an identity-focused settings page, moves the token-activity heatmap into Usage, and removes Profile’s duplicate usage polling and statistics widgets. Merge readinessKeep this PR open for explicit maintainer review: it carries the protected Priority: P3 Review scores
Verification
How this fits togetherThe Control UI receives gateway identity and usage responses, then presents them as settings pages. This change keeps agent identity controls on Profile while Usage becomes the single analytics workspace that renders the selected date range and its activity heatmap. flowchart LR
Gateway[Gateway identity and usage responses] --> Profile[Profile settings page]
Gateway --> Usage[Usage analytics page]
Profile --> Identity[Agent identity controls]
Profile --> UsageLink[Usage statistics link]
Usage --> Range[Selected date range]
Range --> Heatmap[Token activity heatmap]
Usage --> Analytics[Usage overview and analytics]
Decision needed
Why: This is an intentional, user-visible Control UI information-architecture change, and the protected maintainer label requires explicit human confirmation rather than an automated cleanup outcome. Before merge
Agent review detailsSecurityNone. PR surfaceSource -634, Tests -432. Total -1066 across 18 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Confirm the intended settings information architecture, inspect the two failed-check logs against the final merge result, and land the focused refactor if they do not reveal a regression in Profile identity handling, Usage filtering, or Control UI navigation. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this PR intentionally changes the Control UI layout, and the supplied live before/after screenshots directly show the proposed Profile and Usage states. Is this the best way to solve the issue? Unclear pending maintainer confirmation: consolidating duplicate analytics ownership in Usage is a coherent maintainable direction, but whether Profile should become identity-only is a product information-architecture choice rather than a mechanically provable bug fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 35f035806baf. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…etwork-none * origin/main: fix(macos): signed rebuild no longer stalls on app shutdown (#103957) fix(agents): prevent repeated Code Mode output across waits (#115213) refactor(ui): split Profile (identity) from Usage (statistics) (#115245) fix(channels): report a channel that cannot receive as unhealthy instead of connected (#115229) fix(cli): reject malformed infer model refs (#115225) feat(ui): finish the Lobsterdex at 42 with wild variants, squish fix, and blink variance (#115264) test(migrations): avoid mtime precision in checkpoint fixture (#115269) test(signal): verify archive limits without malformed tar (#115270) test(ui): reset config route hash between cases fix(talk): remove unsupported Codex OAuth realtime
…-20260728 * origin/main: fix(macos): signed rebuild no longer stalls on app shutdown (#103957) fix(agents): prevent repeated Code Mode output across waits (#115213) refactor(ui): split Profile (identity) from Usage (statistics) (#115245) fix(channels): report a channel that cannot receive as unhealthy instead of connected (#115229) fix(cli): reject malformed infer model refs (#115225) feat(ui): finish the Lobsterdex at 42 with wild variants, squish fix, and blink variance (#115264) test(migrations): avoid mtime precision in checkpoint fixture (#115269) test(signal): verify archive limits without malformed tar (#115270) test(ui): reset config route hash between cases fix(talk): remove unsupported Codex OAuth realtime
* origin/main: (199 commits) refactor(workboard): tidy Control UI card execution helpers (openclaw#115195) perf(agents): amortize history-limit eviction with hysteresis (openclaw#115273) (openclaw#115281) fix: schema-version refusal blames a downgrade that never happened and cannot identify the stale install (openclaw#115232) fix: restore Fish completion after global CLI options (openclaw#115222) refactor(agents): collapse the client-tool catalog branch (openclaw#115212) fix(macos): signed rebuild no longer stalls on app shutdown (openclaw#103957) fix(agents): prevent repeated Code Mode output across waits (openclaw#115213) refactor(ui): split Profile (identity) from Usage (statistics) (openclaw#115245) fix(channels): report a channel that cannot receive as unhealthy instead of connected (openclaw#115229) fix(cli): reject malformed infer model refs (openclaw#115225) feat(ui): finish the Lobsterdex at 42 with wild variants, squish fix, and blink variance (openclaw#115264) test(migrations): avoid mtime precision in checkpoint fixture (openclaw#115269) test(signal): verify archive limits without malformed tar (openclaw#115270) refactor(sessions): isolate legacy transcript fixtures (openclaw#115231) fix(discord): clear pending launch watchdog (openclaw#115100) fix(agents): stop quadratic subagent prompt rendering (openclaw#115263) fix(memory-core): recover dreaming cron reconciliation (openclaw#115174) fix(qa-lab): filter incompatible channel scenarios (openclaw#115087) fix(android): respect locale in compact labels test(i18n): prove iOS discovery catalog ownership ...
* origin/main: (62 commits) feat(macos): enable Computer Control by default and diagnose stale Accessibility grants (openclaw#115280) fix(qa): restore full-stack scenarios and truthful suite exits (openclaw#115290) feat(memory): backfill past sessions from Control UI (openclaw#115266) docs: link macOS onboarding pages to app download (openclaw#111361) feat(skills): shared authoring standards make learned skills routable (openclaw#115103) fix(matrix): suppress previews for modifying hooks fix: prevent node gateway hangs and runaway local inference (openclaw#115248) refactor(ui): adopt @lit/task across remaining page surfaces (openclaw#115274) fix(slack): cap chat.update edit text at the 4000-char limit, not the 8000 send limit (openclaw#115027) [AI-assisted] docs: recommend Node 26 in quickstart, landing, and platform install docs (openclaw#115064) refactor(workboard): tidy Control UI card execution helpers (openclaw#115195) perf(agents): amortize history-limit eviction with hysteresis (openclaw#115273) (openclaw#115281) fix: schema-version refusal blames a downgrade that never happened and cannot identify the stale install (openclaw#115232) fix: restore Fish completion after global CLI options (openclaw#115222) refactor(agents): collapse the client-tool catalog branch (openclaw#115212) fix(macos): signed rebuild no longer stalls on app shutdown (openclaw#103957) fix(agents): prevent repeated Code Mode output across waits (openclaw#115213) refactor(ui): split Profile (identity) from Usage (statistics) (openclaw#115245) fix(channels): report a channel that cannot receive as unhealthy instead of connected (openclaw#115229) fix(cli): reject malformed infer model refs (openclaw#115225) ...
…law#115245) * refactor(ui): profile owns identity; usage owns statistics * fix(ui): rerender profile on connection transitions * chore(ui): drop usage exports orphaned by the profile split * chore(ui): localize usage TTL constant in gateway source replacement test
What Problem This Solves
Profile mixed identity controls between two statistics sections and duplicated the dedicated Usage page's analytics with its own
usage.costandsessions.usagepolling. Identity was harder to find, while two pages independently owned overlapping usage state.Why This Change Was Made
Profile now owns the featured-agent hero and gateway identity, followed by a cross-page Usage statistics row. Usage owns the activity heatmap, fed by its existing cost-summary request and aligned to the selected date range; Profile's duplicate usage requests, cache-settle polling, stat tiles, and insight modules are gone.
The existing Usage overview already covers totals, daily peaks, top channels, tools, models, providers, and time-of-day activity, so those Profile widgets were deleted instead of transplanted. Longest-thread was also left out because Usage defaults to family rollups, whose lifespan is not an instance-safe thread duration.
User Impact
Profile is now a focused identity page for the agent hero, display name, avatar, and linked emails. Usage remains the single analytics workspace and now includes a selected-range token activity heatmap. The Profile refresh affordance refreshes identity only, and Profile no longer generates background usage traffic.
Evidence
node scripts/run-vitest.mjs ui/src/pages/profile— 14 passednode scripts/run-vitest.mjs ui/src/pages/usage— 100 passednode scripts/run-vitest.mjs ui/src/pages/config— 142 passednode scripts/run-vitest.mjs ui/src/i18n— 71 passednode scripts/run-vitest.mjs ui/src/app-navigation.test.ts— 74 passedpnpm ui:i18n:baseline— 4,120 source keys; raw-copy baseline 106;pnpm-lock.yamlunchangednode scripts/check-changed.mjs -- <18 changed files>— exit 0 on Blacksmith Testboxtbx_01kymfrnjhpv87acjd2ga6r09q(run)--mode uncommitted) — clean, no accepted/actionable findingsidentity-section.tsandidentity-section.test.tsare byte-for-byte unchangedReal behavior proof (live Control UI, scratch gateway)
Base:
raw.githubusercontent.com/steipete/openclaw-pr-assets/main/settings-restructure-2026-07/pr115245/(Scratch gateway with no usage history, so stats surfaces show their empty states; the structural change is what the captures demonstrate.)
Before (main): Profile carried the usage dashboard (stats/heatmap/insights machinery + polling) around the identity section:
After (this branch): Profile is identity + a Usage link; the activity heatmap lives on Usage: