Skip to content

feat(ui): make sidebar catalog project groups collapsible - #109648

Merged
steipete merged 1 commit into
mainfrom
claude/catalog-project-groups-collapse
Jul 17, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/catalog-project-groups-collapse

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

PR #109575 grouped the native session catalogs (Codex + Claude) by project under each host, but the groups are static headers: a node with many sessions in one busy repo still forces scrolling past all of them to reach the next project. Every other sidebar section (catalogs, pinned, categories) collapses; project groups should too.

Why This Change Was Made

Follow-up agreed in #109575. The project head becomes a collapse toggle reusing the existing section-collapse machinery — no new state surface:

  • renderCatalogHostGroup renders each head as a <button> with a chevron and aria-expanded; clicking calls the existing onToggleSection with id catalog-project:<catalogId>:<hostId>:<projectKey>, persisted in the existing openclaw:sidebar:sessions:collapsed-sections localStorage set.
  • Collapsed groups keep the head with its session count; rows unmount. The ungrouped tail and the flatten toggle are unaffected.
  • CSS converts the head to a button (reset + hover/focus-visible affordance consistent with the other sidebar toggles).

User Impact

Project groups under each node in the Codex/Claude session catalogs now collapse and expand like every other sidebar section, and the collapsed set survives reloads. No config or protocol changes; docs updated in docs/nodes/index.md.

Live proof (real gateway from this branch on a Testbox, real seeded ~/.claude/projects store with a worktree session, Chromium via Playwright):

Grouped (live) openclaw collapsed (live) Flattened (live)
grouped collapsed flat

Evidence

  • Live end-to-end on Blacksmith Testbox tbx_01kxq4qp88ctde1t04zw50mn8k: built the branch (pnpm build), seeded ~/.claude/projects with three sessions across two projects (one in .claude/worktrees/fix-sidebar), ran node openclaw.mjs gateway --bind loopback with a token, drove the real dashboard in Chromium: 2 project heads, worktree folded (openclaw count 2), collapse hid its 2 rows (aria-expanded=false, other project untouched), flatten removed heads with all 3 rows present. Screenshots above are from that run.
  • Playwright e2e extended in ui/src/e2e/codex-sessions.e2e.test.ts: collapse hides only that group's rows, head + count persist, collapsed-sections storage gains/loses catalog-project:codex:gateway:local:/Users/dev/openclaw, expand restores. Green on the Testbox alongside scoped run-oxlint, tsgo:ui, and tsgo:test:ui.
  • node scripts/run-vitest.mjs ui/src/lib/sessions/catalog-project-grouping.test.ts — 12/12 (helper untouched, no regression).
  • Autoreview (Codex gpt-5.6-sol): clean, no findings ("patch is correct", 0.96).

Project group heads in the native session catalogs (Codex + Claude) are now
collapse toggles: chevron + aria-expanded, rows hidden while the head and
count stay visible. State persists per catalog+host+project through the
existing collapsed-sections localStorage set. Follow-up to #109575.
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui plugin: file-transfer size: S maintainer Maintainer-authored PR labels Jul 17, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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 17, 2026
@clawsweeper

clawsweeper Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 12:43 AM ET / 04:43 UTC.

Summary
Makes Codex and Claude sidebar project groups collapsible, persists each group’s state in the existing collapsed-sections store, adds browser coverage, and updates node documentation.

PR surface: Source +40, Tests +32, Docs +1. Total +73 across 4 files.

Reproducibility: not applicable. This PR adds an agreed sidebar interaction rather than repairing broken behavior under an existing contract. The before-and-after behavior is nevertheless demonstrated through a real Gateway and browser run.

Review metrics: 1 noteworthy metric.

  • Persisted UI state: 1 dynamic section-ID family added. Project-specific collapse keys are added to the existing localStorage set without introducing a second preference store or changing its JSON shape.

Stored data model
Persistent data-model change detected: serialized state: ui/src/e2e/codex-sessions.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • No automated repair is indicated; this protected-label PR needs only ordinary maintainer review and completion of its exact-head merge gates.

Security
Cleared: The patch changes local UI rendering, CSS, browser preference entries, tests, and docs without altering permissions, secrets, dependencies, downloads, workflows, or executable supply-chain inputs.

Review details

Best possible solution:

Land the shared-renderer disclosure implementation after the protected-label maintainer review and exact-head checks complete, keeping the existing opaque collapse-state mechanism and focused browser coverage.

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

Not applicable: this PR adds an agreed sidebar interaction rather than repairing broken behavior under an existing contract. The before-and-after behavior is nevertheless demonstrated through a real Gateway and browser run.

Is this the best way to solve the issue?

Yes. Reusing the shared catalog renderer and existing collapsed-section persistence is narrower and more maintainable than adding catalog-specific state or a parallel preference surface.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P3: This is a small, low-risk Control UI ergonomics feature with focused shared-renderer and browser-test changes.
  • add proof: sufficient: Contributor real behavior proof is sufficient. Three live screenshots and a detailed Testbox transcript show the changed behavior against a real Gateway: project headers render, one group collapses independently, and flattening restores the ungrouped view.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Three live screenshots and a detailed Testbox transcript show the changed behavior against a real Gateway: project headers render, one group collapses independently, and flattening restores the ungrouped view.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Three live screenshots and a detailed Testbox transcript show the changed behavior against a real Gateway: project headers render, one group collapses independently, and flattening restores the ungrouped view.

Label justifications:

  • P3: This is a small, low-risk Control UI ergonomics feature with focused shared-renderer and browser-test changes.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Three live screenshots and a detailed Testbox transcript show the changed behavior against a real Gateway: project headers render, one group collapses independently, and flattening restores the ungrouped view.
  • proof: sufficient: Contributor real behavior proof is sufficient. Three live screenshots and a detailed Testbox transcript show the changed behavior against a real Gateway: project headers render, one group collapses independently, and flattening restores the ungrouped view.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Three live screenshots and a detailed Testbox transcript show the changed behavior against a real Gateway: project headers render, one group collapses independently, and flattening restores the ungrouped view.
Evidence reviewed

PR surface:

Source +40, Tests +32, Docs +1. Total +73 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 51 11 +40
Tests 1 32 0 +32
Docs 1 4 3 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 87 14 +73

What I checked:

Likely related people:

  • steipete: Current-main history attributes the native Codex/Claude catalog, cross-node session display, project grouping, and adjacent node documentation work to this contributor, including the immediately preceding merged grouping change. (role: feature owner and recent area contributor; confidence: high; commits: 5154fe0, 05aecc1, c3b426f; files: ui/src/components/app-sidebar-session-catalogs.ts, ui/src/e2e/codex-sessions.e2e.test.ts, docs/nodes/index.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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 merged commit b1ef426 into main Jul 17, 2026
166 of 177 checks passed
@steipete
steipete deleted the claude/catalog-project-groups-collapse branch July 17, 2026 04:50
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 17, 2026
…09648)

Project group heads in the native session catalogs (Codex + Claude) are now
collapse toggles: chevron + aria-expanded, rows hidden while the head and
count stay visible. State persists per catalog+host+project through the
existing collapsed-sections localStorage set. Follow-up to openclaw#109575.
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
…09648)

Project group heads in the native session catalogs (Codex + Claude) are now
collapse toggles: chevron + aria-expanded, rows hidden while the head and
count stay visible. State persists per catalog+host+project through the
existing collapsed-sections localStorage set. Follow-up to openclaw#109575.
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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: file-transfer proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S 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