Skip to content

refactor(ui): split Profile (identity) from Usage (statistics) - #115245

Merged
steipete merged 4 commits into
mainfrom
steipete/profile-usage-split
Jul 28, 2026
Merged

steipete merged 4 commits into
mainfrom
steipete/profile-usage-split

Conversation

@steipete

@steipete steipete commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Profile mixed identity controls between two statistics sections and duplicated the dedicated Usage page's analytics with its own usage.cost and sessions.usage polling. 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 passed
  • node scripts/run-vitest.mjs ui/src/pages/usage — 100 passed
  • node scripts/run-vitest.mjs ui/src/pages/config — 142 passed
  • node scripts/run-vitest.mjs ui/src/i18n — 71 passed
  • node scripts/run-vitest.mjs ui/src/app-navigation.test.ts — 74 passed
  • pnpm ui:i18n:baseline — 4,120 source keys; raw-copy baseline 106; pnpm-lock.yaml unchanged
  • node scripts/check-changed.mjs -- <18 changed files> — exit 0 on Blacksmith Testbox tbx_01kymfrnjhpv87acjd2ga6r09q (run)
  • Codex autoreview (--mode uncommitted) — clean, no accepted/actionable findings
  • identity-section.ts and identity-section.test.ts are byte-for-byte unchanged

Real 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:

Profile (stats page) Usage
before profile before usage

After (this branch): Profile is identity + a Usage link; the activity heatmap lives on Usage:

Profile (identity) Usage (with heatmap section)
after profile after usage

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Jul 28, 2026
@steipete
steipete marked this pull request as ready for review July 28, 2026 14:44
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 28, 2026
@clawsweeper

clawsweeper Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 11:18 AM ET / 15:18 UTC.

ClawSweeper review

What this changes

This 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 readiness

⚠️ Needs maintainer review before merge - 3 items remain

Keep this PR open for explicit maintainer review: it carries the protected maintainer label, and the submitted evidence supports the intended Profile/Usage separation rather than a cleanup close. The proposed UI behavior appears focused, with live before/after captures and targeted test evidence in the PR body, but the final merge decision should include review of the failing check details and the current-base merge result.

Priority: P3
Reviewed head: 48405aea44cf3d593ffca4b0651a5b8cbcdf3b73
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The PR has strong visible proof for its UI change and focused coverage, while the protected product-direction decision and two failed checks prevent a higher-confidence merge assessment.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The PR supplies live Control UI before/after screenshots that directly show the changed Profile and Usage layouts; the stated focused tests supplement that visible after-fix evidence.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR supplies live Control UI before/after screenshots that directly show the changed Profile and Usage layouts; the stated focused tests supplement that visible after-fix evidence.
Evidence reviewed 5 items Focused Profile separation: The branch removes Profile-side usage request handling and statistics rendering while retaining the identity section and adding a navigation row to Usage, matching the stated single-owner analytics boundary.
Usage now owns heatmap rendering: The branch introduces a Usage-local heatmap builder and renderer, then renders it from the existing Usage view using the selected filter range.
Regression coverage accompanies the move: The supplied PR diff adds dedicated heatmap unit coverage and Usage rendering coverage, while removing Profile tests whose assertions covered the deleted analytics behavior.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Decision needed

Question Recommendation
Should Profile remain identity-only while Usage becomes the sole owner of usage analytics and the selected-range activity heatmap? Approve the ownership split: Keep Profile focused on gateway identity and use Usage as the only analytics workspace after resolving the reported check failures.

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

  • Resolve merge risk (P1) - Two reported checks failed (check-dependencies and checks-node-compact-large-4); their failure logs and the current-base merge result should be reviewed before landing, even though the PR’s supplied focused checks and live UI evidence are positive.
  • Resolve merge risk (P1) - Moving analytics out of Profile deliberately changes established navigation and refresh behavior; maintainer review should confirm that Profile’s identity-only refresh and the Usage date-range heatmap are the intended long-term information architecture.
Agent review details

Security

None.

PR surface

Source -634, Tests -432. Total -1066 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 10 315 949 -634
Tests 8 192 624 -432
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 507 1573 -1066

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    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.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a deliberate Control UI organization refactor with no evidence of data loss, security exposure, or urgent runtime failure.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR supplies live Control UI before/after screenshots that directly show the changed Profile and Usage layouts; the stated focused tests supplement that visible after-fix evidence.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR supplies live Control UI before/after screenshots that directly show the changed Profile and Usage layouts; the stated focused tests supplement that visible after-fix evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR supplies live Control UI before/after screenshots that directly show the changed Profile and Usage layouts; the stated focused tests supplement that visible after-fix evidence.

Label justifications:

  • P3: This is a deliberate Control UI organization refactor with no evidence of data loss, security exposure, or urgent runtime failure.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR supplies live Control UI before/after screenshots that directly show the changed Profile and Usage layouts; the stated focused tests supplement that visible after-fix evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR supplies live Control UI before/after screenshots that directly show the changed Profile and Usage layouts; the stated focused tests supplement that visible after-fix evidence.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR supplies live Control UI before/after screenshots that directly show the changed Profile and Usage layouts; the stated focused tests supplement that visible after-fix evidence.

Evidence

What I checked:

  • Focused Profile separation: The branch removes Profile-side usage request handling and statistics rendering while retaining the identity section and adding a navigation row to Usage, matching the stated single-owner analytics boundary. (ui/src/pages/profile/profile-page.ts:1, 48405aea44cf)
  • Usage now owns heatmap rendering: The branch introduces a Usage-local heatmap builder and renderer, then renders it from the existing Usage view using the selected filter range. (ui/src/pages/usage/view.ts:809, 48405aea44cf)
  • Regression coverage accompanies the move: The supplied PR diff adds dedicated heatmap unit coverage and Usage rendering coverage, while removing Profile tests whose assertions covered the deleted analytics behavior. (ui/src/pages/usage/heatmap.node.test.ts:1, 48405aea44cf)
  • Real UI evidence: The PR body includes before/after live Control UI screenshots showing Profile reduced to identity plus a Usage link and the heatmap displayed on Usage; its stated focused Profile, Usage, config-search, i18n, and navigation checks passed. (48405aea44cf)
  • Protected maintainer routing: The PR is labeled maintainer, so this conservative cleanup workflow must leave it open for explicit maintainer handling rather than close or auto-route it.

Likely related people:

  • steipete: The supplied branch history attributes both the Profile/Usage split and the follow-up connection-transition fix to this contributor; current-main feature-history ownership could not be resolved from the available read-only review evidence. (role: recent Control UI contributor; confidence: low; commits: f9e2df64f5e5, 48405aea44cf; files: ui/src/pages/profile/profile-page.ts, ui/src/pages/usage/view.ts, ui/src/pages/usage/heatmap.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Inspect and resolve or classify the check-dependencies and checks-node-compact-large-4 failures on the final merge result.
  • Obtain explicit maintainer confirmation that Profile should remain identity-only and Usage should own all analytics.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete steipete self-assigned this Jul 28, 2026
@steipete
steipete merged commit 13f2005 into main Jul 28, 2026
93 checks passed
@steipete
steipete deleted the steipete/profile-usage-split branch July 28, 2026 16:09
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 28, 2026
…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
vincentkoc added a commit that referenced this pull request Jul 28, 2026
…-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
vincentkoc added a commit to LZY3538/openclaw that referenced this pull request Jul 28, 2026
* 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
  ...
vincentkoc added a commit to christian-lallo/openclaw that referenced this pull request Jul 28, 2026
* 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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 29, 2026
…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
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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant