Repository navigation
feat(ui): sidebar Project grouping and truly flat None mode - #131543
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Group by: None now renders one flat session list — no Other/Groups/Coding zone headers — matching what None promises. New Group by: Project buckets sessions by their resolved repo/workspace checkout, folding .claude/worktrees checkouts into their origin repo via the same rule the harness catalogs already use; checkout-less rows keep their smart zones, mirroring Person mode.
… summary Companion to #131541, which fixed the strict-mode violation in config-form-guidance: settings-layout carries the same under-scoped summary locator; scope it to :scope > summary before it can trip the same way once its clicks happen against expanded advanced content.
fe771f8 to
90c8706
Compare
|
Codex review: found issues before merge. Reviewed August 28, 2026, 1:24 AM ET / 05:24 UTC. ClawSweeper reviewWhat this changesThis PR adds sidebar Project grouping based on session checkout paths and makes the None option a single flat session list. Merge readinessKeep this PR open: Project grouping currently treats checkout paths differing only by a trailing separator as separate projects, so the new mode can show duplicate identical headers. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI sidebar projects Gateway session rows into user-facing sections. Project grouping consumes each row’s resolved work context and emits sections that lead to selectable session rows. flowchart LR
A[Gateway session rows] --> B[Resolved work context]
B --> C[Sidebar grouping mode]
C --> D[Project path grouping]
D --> E[Sidebar project sections]
E --> F[Session list rendering]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +66, Tests +69, Docs 0, Other +12. Total +147 across 10 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Normalize checkout paths once at the shared catalog/sidebar boundary, then verify direct and worktree paths with and without trailing separators converge to one Project section. Do we have a high-confidence way to reproduce the issue? Yes, from source: two otherwise identical rows using Is this the best way to solve the issue? No. Reusing worktree folding without its sibling path canonicalization diverges from the catalog contract; normalize once in the shared helper rather than compensating in the renderer. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 13125bf33f20. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What 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
|
ClawSweeper P2: sidebar Project mode keyed sections by the raw workContext.path, so /repo/openclaw and /repo/openclaw/ minted two identical headers. Move trailing-separator stripping into foldWorktreeCheckoutPath so the catalog and sidebar callers share one canonicalization; regression case fails pre-fix.
|
Addressed the P2 in 6b6a2ba: trailing-separator stripping now lives inside the shared On the stored-data-model flag: no persistent data model changes here — |
|
Merged via squash.
|
…#131543) * feat(ui): sidebar project grouping and truly flat None mode Group by: None now renders one flat session list — no Other/Groups/Coding zone headers — matching what None promises. New Group by: Project buckets sessions by their resolved repo/workspace checkout, folding .claude/worktrees checkouts into their origin repo via the same rule the harness catalogs already use; checkout-less rows keep their smart zones, mirroring Person mode. * test(ui): scope settings-layout advanced-disclosure clicks to its own summary Companion to openclaw#131541, which fixed the strict-mode violation in config-form-guidance: settings-layout carries the same under-scoped summary locator; scope it to :scope > summary before it can trip the same way once its clicks happen against expanded advanced content. * fix(ui): canonicalize checkout paths inside the shared worktree fold ClawSweeper P2: sidebar Project mode keyed sections by the raw workContext.path, so /repo/openclaw and /repo/openclaw/ minted two identical headers. Move trailing-separator stripping into foldWorktreeCheckoutPath so the catalog and sidebar callers share one canonicalization; regression case fails pre-fix.
What Problem This Solves
Fixes an issue where setting the sidebar sessions Group by to None still rendered the Other / Groups / Coding zone headers, so the list looked grouped despite the operator explicitly asking for no grouping. It also adds the missing Project grouping mode: there was no way to organize the session list by the repo/workspace a session works in, even though the Codex/Claude harness catalogs directly below already group by project.
Why This Change Was Made
Operator report (with screenshot): "why do i still see groups when I set groups to none? Also I miss a mode to group per project."
The zones-always-split behavior dates back to the five-zone sidebar redesign (#110259), where
grouping: "none"was defined to only disable custom categories. That contradicts what the menu promises. None now means one flat list. Project buckets sessions by their resolved work checkout (worktree repo root, exec workspace, or spawned cwd), reusing the same.claude/worktrees/<name>→ origin-repo fold the harness catalogs use, so gateway sessions and catalog sessions agree on what one project is. Checkout-less rows keep their smart zones, mirroring how Person mode treats ownerless rows. Project sections are derived (not stored), so they sort alphabetically, take no drags/drops, and show the full checkout path as a header tooltip.User Impact
Menu before/after (Project option added):
Default Custom-groups layout, unchanged:
Evidence
ui/src/lib/sessions/grouping.test.ts— None flattens every zone; Project buckets by checkout with the worktree fold, alphabetical order ahead of stored zones, and residual smart zones;normalizeSidebarSessionsGroupingacceptsproject.ui/src/components/app-sidebar-session-projection.test.ts— flat list stays headerless beside catalog sections while category mode keeps its header.node scripts/run-vitest.mjs ui/src/lib/sessions/grouping.test.ts ui/src/lib/sessions/catalog-project-grouping.test.ts ui/src/components/app-sidebar-session-projection.test.ts— green; plus the four sidebar component suites (333 tests) andui/src/e2e/session-management.groups.e2e.test.ts.node scripts/check-changed.mjs— all lanes green (format, tsgo UI typecheck, lint, guards).pnpm dev:ui:mock), before = parent commit, after = this branch. The Project shot also proves the live worktree fold: the "Sidebar project grouping" session (spawned cwd under~/Projects/openclaw/.claude/worktrees/…) lands in the openclaw section.Accepted tradeoff: in flat (None) mode the native list renders headerless even if a stored section order places a harness catalog above it; the catalogs keep their own headers and default order keeps the flat list first.
Broken-main encounter
checks-ui-e2e (1/14)was red when this PR first ran:config-form-guidance.e2e.test.ts > keeps the one advanced disclosure browser-localfailed at the then-currentorigin/main(reproduced locally atabf412aba47). Root cause: the collapse click useddisclosure.locator("summary"), which after expansion also matches the nested collapsible Prefs object's<summary class="cfg-object__summary">— a Playwright strict-mode violation, deterministic since the<details>disclosure landed in #131421. Main's #131541 landed the same-shaped fix (:scope > summary) while this was being diagnosed, so after rebasing this PR keeps only the companion hardening:settings-layout.e2e.test.tscarried the identical under-scoped locator (unfired only because its clicks happen pre-expansion) and now scopes to:scope > summarytoo. Both e2e suites pass locally on the rebased head.