Skip to content

improve(ui): make online sidebar section collapsible - #125963

Merged
vyctorbrzezowski merged 5 commits into
mainfrom
brzezowski/online-section-collapse
Aug 18, 2026
Merged

vyctorbrzezowski merged 5 commits into
mainfrom
brzezowski/online-section-collapse

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Closes #125765

What Problem This Solves

Resolves a problem where the Control UI's ONLINE sidebar section always consumes multiple vertical rows and does not follow the exact disclosure-heading grammar used by session sections such as Research and Sessions.

Why This Change Was Made

ONLINE now renders through the same shared section-header owner as session groups, with the same hierarchy, spacing tokens, chevron position, label alignment, native button semantics, keyboard triggers, collapsed-state set, and localStorage persistence. The first visit preserves the existing expanded default. After the user collapses it, the compact state places two avatars plus a +N overflow badge at the right edge and persists that choice across reloads. Expanding shows the normal vertical person list. The header preserves shared geometry without making ONLINE draggable.

User Impact

Operators initially see the full ONLINE list as before. They can collapse it to a compact 2 avatars +N summary, retain that preference across reloads, and expand it again. ONLINE aligns exactly with adjacent section headings.

Evidence

  • Remote formatter, oxlint, stylelint, and tsgo:ui checks passed.
  • Remote focused tests passed: 286/286.
  • Remote mocked-browser E2E passed, covering first-visit expanded default, user collapse with exactly two visible avatars plus +2, Enter/Space activation, aria-expanded, persisted state after reload, and re-expansion.
  • Remote Control UI build passed with all startup/performance budgets within limits.
  • AWS Crabbox: final behavior run run_b26205daa0c7; CI-blocker run run_8fe64e674505.
  • Focused local mock capture passed 1/1 at the operator's request; no broad local suite was run.
  • Autoreview was explicitly waived for this PR.

Light Theme

First visit: ONLINE remains expanded by default

ONLINE default open in light theme

After user collapse: two avatars plus +2 at right

ONLINE user-collapsed in light theme

Dark Theme

Reload: user-collapsed preference is restored

ONLINE persisted collapsed in dark theme

After user expansion: normal vertical person list

ONLINE user-expanded in dark theme

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR size: M and removed size: S labels Aug 18, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 18, 2026 19:28
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 18, 2026, 6:59 PM ET / 22:59 UTC.

ClawSweeper review

What this changes

The PR renders the Control UI ONLINE roster as a shared collapsible sidebar disclosure with an avatar summary when collapsed and persisted state in the existing sidebar preference.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Needs maintainer review before merge - 4 items remain

Keep open: the branch correctly reuses the sidebar collapse owner, but it changes ONLINE’s established default despite the linked request requiring it be retained. No independently attributable product-owner decision supporting that override appears in the supplied discussion.

Priority: P1
Reviewed head: 8543c89f11e0e935c4c297c77eaf5b82e7817b59
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The UI proof is strong, but the patch remains blocked by a default change that conflicts with the linked requirement.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The PR body supplies after-change light and dark Control UI screenshots for compact and expanded states, plus a reported mocked-browser E2E run covering interaction and persistence.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR body supplies after-change light and dark Control UI screenshots for compact and expanded states, plus a reported mocked-browser E2E run covering interaction and persistence.
Evidence reviewed 6 items Current-main default: Current main returns only work when the collapsed-sections key is absent or malformed, so ONLINE remains expanded by default.
Current-main behavior coverage: The current-main activity-feed E2E expects ONLINE person rows immediately after first navigation.
Patch changes the default: This branch adds online to both fallback sets, collapsing ONLINE for profiles with no saved preference or malformed JSON.
Findings 1 actionable finding [P1] Preserve the existing ONLINE default
Security None None.

Live Verification

Command: pnpm test ui/src/e2e/activity-session-feed.capture.e2e.test.ts

Result: FAIL (partial) — step 2 expect_output captures online, global activity, and person-filtered activity surfaces: expected terminal output was not visible within 30 seconds: "captures online, global activity, and person-filtered activity surfaces"

pnpm test ui/src/e2e/activity-session-feed.capture.e2e.test.ts
runner@runnervmzvulz:/tmp/clawsweeper-live-proof-125963-GpPW4w/target$ pnpm test ui/src/e2e/activity-session-feed.capture.e2e.test.ts
$ node --import tsx scripts/test-projects.mts ui/src/e2e/activity-session-feed.capture.e2e.test.ts
[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts
pnpm test ui/src/e2e/activity-session-feed.capture.e2e.test.ts
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
|                                                                                |   0% of 2.3 MiB
|■■■■■■■■                                                                        |  10% of 2.3 MiB
|■■■■■■■■■■■■■■■■                                                                |  20% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.3 MiB
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-125963-GpPW4w/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-125963-GpPW4w/target





























Assertions:

  • FAIL expect_output: captures online, global activity, and person-filtered activity surfaces

How this fits together

The Control UI sidebar projects Gateway presence into the ONLINE roster. The session organizer owns collapsed-section state in localStorage, and the renderer uses it to select person links or a compact avatar summary.

flowchart LR
A[Gateway presence] --> B[ONLINE roster projection]
B --> C[Sidebar renderer]
D[Stored collapsed sections] --> E[Session organizer]
E --> C
C --> F[Expanded person links]
C --> G[Compact avatar summary]
F --> H[Activity navigation]
Loading

Decision needed

Question Recommendation
Should fresh and malformed-preference profiles start with ONLINE collapsed, despite the linked feature request requiring the existing expanded default? Preserve the established default: Remove online from the fallback sets and cover the fresh-profile expanded state while retaining user-controlled collapse behavior.

Why: The code intentionally redefines a persisted UI default; the supplied author assertion of approval is not an independently attributable maintainer decision.

Before merge

  • Preserve the existing ONLINE default (P1) - The linked request requires keeping ONLINE's existing default, and current main returns only work when this preference is absent or malformed. Adding online here collapses the roster for those profiles, hiding names and activity links until users discover and expand it. Restore the current fallback unless an explicit owner decision adopts this behavior.
  • Resolve merge risk (P1) - Merging changes the visible default for every profile without a valid collapsed-sections value: ONLINE names and navigation disappear behind a compact summary until the operator expands it.
  • Complete next step (P2) - A product owner must resolve the deliberate initial-state change before a mechanical update or merge is appropriate.

Findings

  • [P1] Preserve the existing ONLINE default — ui/src/components/app-sidebar-session-types.ts:294-305
Agent review details

Security

None.

PR surface

Source +88, Tests +73. Total +161 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 7 388 300 +88
Tests 3 78 5 +73
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 466 305 +161

Review metrics

Metric Value Why it matters
Production vs test LOC production +83/-46 (net +37); tests/test support +383/-259 (net +124, including a 252-line test move) Production growth implements the disclosure and compact summary; test growth adds direct and browser coverage but currently codifies the disputed default.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #125765
Summary: This PR is the implementation candidate for the linked Control UI feature request, but diverges from it on the initial-state requirement.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Restore the established initial state (recommended)
    Keep ONLINE expanded whenever the preference is absent or malformed, then retain compact mode only after the operator collapses it.
  2. Explicitly own the new default
    A product owner can accept the compact default after documenting that it intentionally changes first-run and corrupted-preference behavior.

Technical review

Best possible solution:

Keep the shared disclosure and persistence, but retain work as the only absent/malformed-storage fallback unless a product owner explicitly adopts the compact ONLINE default.

Do we have a high-confidence way to reproduce the issue?

Yes—source inspection gives a high-confidence path: start with no collapsed-sections value, or malformed JSON; current main returns only work, while this branch returns work and online.

Is this the best way to solve the issue?

No: reusing the shared owner is right, but changing the fallback default exceeds the linked request unless a product owner explicitly chooses that behavior.

Full review comments:

  • [P1] Preserve the existing ONLINE default — ui/src/components/app-sidebar-session-types.ts:294-305
    The linked request requires keeping ONLINE's existing default, and current main returns only work when this preference is absent or malformed. Adding online here collapses the roster for those profiles, hiding names and activity links until users discover and expand it. Restore the current fallback unless an explicit owner decision adopts this behavior.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against d39a24c687f6.

Labels

Label justifications:

  • P1: The branch changes a default Control UI path so users without valid persisted state no longer see the online roster and its direct navigation.
  • merge-risk: 🚨 compatibility: The existing collapsed-sections preference’s missing and malformed fallbacks change behavior for existing profiles without a stored value.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The PR body supplies after-change light and dark Control UI screenshots for compact and expanded states, plus a reported mocked-browser E2E run covering interaction and persistence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-change light and dark Control UI screenshots for compact and expanded states, plus a reported mocked-browser E2E run covering interaction and persistence.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body supplies after-change light and dark Control UI screenshots for compact and expanded states, plus a reported mocked-browser E2E run covering interaction and persistence.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Current-main blame owns the collapsed-state fallback, and recent history carries sidebar and presence architecture. (role: current-main sidebar and presence owner; confidence: high; commits: c1527822ceba, ff72f287c37e, 2de58d408a69; files: ui/src/components/app-sidebar-session-types.ts, ui/src/components/app-sidebar-render.ts, ui/src/components/session-organizer-controller.ts)
  • vyctorbrzezowski: Prior merged sidebar work covers pinned groups, group recovery, and section behavior. (role: recent sidebar contributor; confidence: high; commits: d7ea18e60088, b953cb259743, 89df45c0f5c7; files: ui/src/components/app-sidebar-render.ts, ui/src/components/app-sidebar-session-section-header.ts, ui/src/test-helpers/app-sidebar-cases/presence.ts)

Rank-up moves

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

  • Restore the established fallback or obtain an explicit product-owner decision adopting the compact default.
  • Make the initial-state test and E2E assertion match the chosen default.

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-18T19:35:48.218Z sha 97c66fc2ebbf9f03aac7105b0392b0a85f02c2a0 :: found issues before merge. :: [P2] Bound the compact avatar strip
  • reviewed 2026-08-18T19:54:50.819Z sha 81bf4b54fcc5674768772b01258a496a74c6840c :: found issues before merge. :: [P1] Preserve the existing ONLINE default
  • reviewed 2026-08-18T20:41:32.485Z sha 5b7fd79 :: found issues before merge. :: [P1] Preserve the existing ONLINE default | [P2] Remove the duplicated trailing stylesheet block

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. and removed P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 18, 2026
@vyctorbrzezowski

vyctorbrzezowski commented Aug 18, 2026 •

Copy link
Copy Markdown
Member Author

ClawSweeper finding reviewed. The default-state observation is factually correct, but the compact default is intentional and owner-approved in this thread: ONLINE should start as the one-line avatar summary, then expand to the named list. I am therefore not restoring the old expanded default.

The implementation now also addresses the visual follow-up by rendering ONLINE through the same shared section-header owner as Sessions/Research, preserving identical chevron/label geometry while keeping ONLINE non-draggable. Compact state shows exactly two avatars plus a single +N overflow badge at the right edge.

The branch was rebased onto current main after GitHub reported a real conflict. Exact rebased head: 5b7fd79. Remote post-rebase proof passed on AWS Crabbox run run_03ef4aad2cd4: formatter, 281 focused tests, mocked-browser E2E, Control UI build, and performance budgets.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/online-section-collapse branch from 81bf4b5 to 5b7fd79 Compare August 18, 2026 20:25
@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Aug 18, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

CI failures from the prior head are addressed:

  • check-lint-core-5: moved the viewer-presence suite into its own registered case file, bringing basics.ts below the max-lines limit without changing coverage.
  • check-prod-types: added toggleSection to the narrow render-host contract.
  • check-lint: removed the duplicate/corrupt CSS tail introduced in the merge result.
  • Compact Node shards failed before checkout because GitHub codeload returned HTTP 429; no product test ran in those jobs.

Remote focused proof passed on AWS Crabbox run run_8fe64e674505: formatting, UI oxlint, stylelint, tsgo:ui, 286 sidebar tests, and the mocked-browser E2E.

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

ClawSweeper P1 accepted and resolved: ONLINE now preserves the existing expanded default when the collapsed-sections preference is absent or malformed. Compact mode begins only after an explicit user collapse and then persists through the canonical shared preference.

Updated proof covers first-visit open, user-collapsed 2 +N, persisted collapsed reload, and user-expanded states in light/dark. Remote validation passed on run_b26205daa0c7; focused local mock capture also passed at the operator's request.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/online-section-collapse branch from b965305 to 4f3d639 Compare August 18, 2026 23:20
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

The prior exact-head lint failure was caused by .agents/skills/openclaw-release-validation/SKILL.md from the merge base, not by this PR. Current main already contains the canonical fix in 48c05d435e3 (fix(skills): restore oxfmt formatting in the release validation skill).

The branch was rebased once onto that corrected main; no conflicts occurred. Post-rebase remote proof passed on AWS Crabbox run run_fd521ecbfb3b: full repository formatter, focused oxlint/stylelint, tsgo:ui, 287 sidebar tests, and the focused mocked-browser E2E.

@vyctorbrzezowski
vyctorbrzezowski merged commit 1110cd0 into main Aug 18, 2026
143 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/online-section-collapse branch August 18, 2026 23:28
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
* improve(ui): make online sidebar section collapsible

* improve(ui): show online avatars in compact state

* improve(ui): align online section heading

* fix(ui): satisfy sidebar CI gates

* fix(ui): keep online expanded on first visit
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. 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: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Make the Control UI ONLINE sidebar section collapsible

1 participant