Skip to content

feat(ui): move session filter to a global sidebar toolbar - #125690

Merged
steipete merged 9 commits into
mainfrom
steipete/session-filter-discoverability-92b4b1
Aug 18, 2026
Merged

steipete merged 9 commits into
mainfrom
steipete/session-filter-discoverability-92b4b1

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The sidebar's filter/sort control rendered only on the "Sessions" section header and was hover-gated to opacity 0, so operators could not find it — even though the menu behind it (grouping, sort, status, owner filter, automation/system visibility) controls the entire sidebar session list. Separately, the ungrouped catch-all section was labeled "Sessions" in a sidebar where every row is a session, which read as noise next to user-named groups and "Coding".

Why This Change Was Made

A global view control belongs on global chrome, not on the hover state of one mid-list section header. The session list now has an always-visible "Sessions" toolbar row at the top carrying the filter/sort funnel (tooltip "Filter & sort", previously the misleading "Sort sessions") and the new-session "+". The buttons are quiet by default (reduced emphasis, full on hover/focus/menu-open) and the funnel shows an accent dot whenever a non-default view is active (owner filter or non-Active status). The catch-all section is renamed "Other", and its header is suppressed entirely when it is the only headered section — those rows sit directly under the toolbar. Per-section headers keep their local hover-revealed actions (group +, kebab). The sidebarSectionHasHeader helper is replaced by a renderHeader fact computed once at partition time.

User Impact

The session filter is discoverable: it is always visible at the top of the session list instead of appearing only when hovering one section header. Active filters are signaled globally. The confusing "Sessions"-group-among-sessions naming is gone; ungrouped sessions are labeled "Other" only when other sections exist. Docs updated (docs/web/control-ui.md).

Evidence

  • pnpm check:changed green; focused suites green (app-sidebar component tests, session-management.groups / chat-flow.navigation-presentation / session-ownership e2e — 32 e2e tests passed); stale-collapse regression test fails on pre-fix HEAD.
  • i18n baseline + verify green (5,290 keys).
  • Codex autoreview (gpt-5.6-sol, high): clean, no actionable findings.
  • Before/after captured from a real mocked-gateway Control UI run via scripts/capture-session-toolbar-proof.mts (mock fixtures: two custom groups, ungrouped chat sessions, worktree coding rows; menu interactions through the real UI, no DOM injection):

Before: grouped sessions at rest, with the global filter/sort control absent from visible chrome.
before

Before: hovering the catch-all "Sessions" header reveals its hidden filter and new-session actions.
before

After: the always-visible "Sessions" toolbar sits above custom groups, "Other", and "Coding".
after

After: the toolbar funnel opens the global grouping, sorting, status, and visibility menu.
after

After: the accent dot marks a non-default session status filter.
after

After: when only ungrouped sessions exist, rows sit directly beneath the toolbar without a redundant section header.
after

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

@steipete
steipete marked this pull request as ready for review August 18, 2026 07:22
@steipete steipete self-assigned this Aug 18, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts size: L maintainer Maintainer-authored PR labels Aug 18, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. 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: needs maintainer review before merge. Reviewed August 18, 2026, 11:02 AM ET / 15:02 UTC.

ClawSweeper review

What this changes

Moves the Control UI session filter and new-session actions into a persistent sidebar toolbar, labels ungrouped sessions as Other, and updates supporting docs, tests, and proof capture.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open. Current main still hides the session-wide controls in the ungrouped header; this PR moves them into persistent global chrome while retaining the existing action callbacks. The prior generated-artifact finding is resolved, and no blocking correctness or security issue was found.

Priority: P2
Reviewed head: 5c24c004bf2e3420505c5cd66e4cc2667bc7b25b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A well-scoped UI change with resolved prior feedback, focused coverage, and no supported blocking finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; its body nevertheless provides before/after mocked-Control-UI screenshot evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; its body nevertheless provides before/after mocked-Control-UI screenshot evidence.
Evidence reviewed 6 items Current-main behavior: Current main renders the filter and new-session buttons only inside the ungrouped session header, confirming that the PR's discoverability change is not already implemented.
PR owner-boundary change: The PR renders one toolbar above the session list and continues to call the existing sort-menu and new-session host callbacks.
Partition and caller coverage: Header visibility is decided once during partitioning, while the sidebar remains the caller that supplies the existing session and catalog state to the renderer.
Findings None None.
Security None None.

Live Verification

Command: pnpm ui:proof:session-toolbar -- --mode after --output-dir .artifacts/control-ui-e2e/session-toolbar-proof

Result: PASS (completed)

pnpm ui:proof:session-toolbar -- --mode after --output-dir .artifacts/control-ui-e2e/session-toolbar-proof
runner@runnervmzvulz:/tmp/clawsweeper-live-proof-125690-tKysAA/target$ pnpm ui:proof:session-toolbar -- --mode after --output-dir .artifacts/control-ui-e2e/sess
ion-toolbar-proof
$ node --import tsx scripts/capture-session-toolbar-proof.mts -- --mode after --output-dir .artifacts/control-ui-e2e/session-toolbar-proof
pnpm ui:proof:session-toolbar -- --mode after --output-dir .artifacts/control-ui-e2e/session-toolbar-proof
{
  "captured": [
    "/tmp/clawsweeper-live-proof-125690-tKysAA/target/.artifacts/control-ui-e2e/session-toolbar-proof/after-grouped.png",
    "/tmp/clawsweeper-live-proof-125690-tKysAA/target/.artifacts/control-ui-e2e/session-toolbar-proof/after-toolbar-menu.png",
    "/tmp/clawsweeper-live-proof-125690-tKysAA/target/.artifacts/control-ui-e2e/session-toolbar-proof/after-filter-active.png",
    "/tmp/clawsweeper-live-proof-125690-tKysAA/target/.artifacts/control-ui-e2e/session-toolbar-proof/after-ungrouped-only.png"
  ],
  "fixture": "custom installMockGateway scenario",
  "mode": "after"
}
runner@runnervmzvulz:/tmp/clawsweeper-live-proof-125690-tKysAA/target$ pnpm ui:proof:session-toolbar -- --mode after --output-dir .artifacts/control-ui-e2e/sess
ion-toolbar-proof


































Assertions:

  • PASS expect_output: after-ungrouped-only.png

How this fits together

The Control UI sidebar partitions Gateway session rows into groups, ungrouped sessions, coding, and catalog sections. Its session toolbar opens the existing global filter menu and new-session flow, which then affect the displayed session list.

flowchart LR
  A[Gateway session rows] --> B[Sidebar partition]
  B --> C[Section header decision]
  C --> D[Session toolbar]
  D --> E[Filter and sort menu]
  D --> F[New session flow]
  E --> G[Visible session list]
  F --> G
Loading

Before merge

  • Complete next step (P2) - No narrow repair is indicated; this maintainer-authored PR should follow normal exact-head CI and maintainer review.
Agent review details

Security

None.

PR surface

Source +88, Tests +18, Docs 0, Config +1, Other +309. Total +416 across 21 files.

View PR surface stats
Area Files Added Removed Net
Source 12 295 207 +88
Tests 6 69 51 +18
Docs 1 2 2 0
Config 1 1 0 +1
Generated 0 0 0 0
Other 1 309 0 +309
Total 21 676 260 +416

Review metrics

Metric Value Why it matters
Production versus test LOC production +209/-189; tests and test-support +464/-69; docs +2/-2; package script +1 The modest production growth implements the persistent toolbar, while the larger test-support addition supplies deterministic mocked-Control-UI proof.

Stored data model

Persistent data-model change detected: serialized state: ui/src/e2e/session-management.groups.e2e.test.ts, serialized state: ui/src/e2e/session-management.sidebar.e2e.test.ts, serialized state: ui/src/e2e/session-ownership.e2e.test.ts, serialized state: ui/src/lib/sessions/grouping.ts, serialized state: ui/src/test-helpers/app-sidebar-cases/session-list-sections.ts, serialized state: ui/src/test-helpers/app-sidebar-cases/session-ownership-filtering.ts, and 3 more. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Land the toolbar design after exact-head checks complete, keeping global actions routed through the existing sidebar host APIs and proof captures under ignored artifacts.

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

Not applicable as a feature review; current-main source clearly establishes the prior hover-gated placement that this PR changes.

Is this the best way to solve the issue?

Yes. The toolbar uses existing filter-menu and new-session callbacks, and the header decision is computed once at the partition owner rather than duplicated in render paths.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.
  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is not_applicable.

Label justifications:

  • P2: This is a bounded Control UI discoverability improvement with user-facing impact but no demonstrated urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; its body nevertheless provides before/after mocked-Control-UI screenshot evidence.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main blame attributes the replaced hover-gated session controls and their partition logic to Peter Steinberger, independently of this PR. (role: current-main feature introducer and recent area contributor; confidence: high; commits: fd1171f8fb52; files: ui/src/components/app-sidebar-session-list-render.ts, ui/src/components/app-sidebar-session-navigation-logic.ts)

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 (5 earlier review cycles)
  • reviewed 2026-08-18T07:43:46.448Z sha 2ee5eea :: needs changes before merge. :: [P1] Preserve the saved ungrouped collapse preference
  • reviewed 2026-08-18T08:35:34.680Z sha 659e452a888c5f9104796bac67a4067497488b0e :: found issues before merge. :: [P1] Preserve the saved ungrouped collapse preference
  • reviewed 2026-08-18T08:52:45.928Z sha ac81421c291a9390be127a421835f7da3ad1c607 :: needs changes before merge. :: [P1] Preserve the saved ungrouped collapse preference | [P3] Update the stale new-session location in the guide
  • reviewed 2026-08-18T09:40:42.042Z sha 848a908 :: needs changes before merge. :: [P3] Store proof captures under the ignored artifact directory
  • reviewed 2026-08-18T14:32:33.538Z sha 3538b42 :: found issues before merge. :: [P3] Store proof captures in the ignored artifact directory

@steipete steipete closed this Aug 18, 2026
@steipete steipete reopened this Aug 18, 2026
@steipete
steipete force-pushed the steipete/session-filter-discoverability-92b4b1 branch from 4c72365 to 659e452 Compare August 18, 2026 08:30
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 18, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Responding to the review findings:

[P1] Preserve the saved ungrouped collapse preference — rejected as a named tradeoff. When "Other" is the only headered section, honoring a stored collapsed state would blank the entire session list beneath a toolbar that offers no collapse control — a hidden-state dead end worse than showing the rows. The preference is not destroyed: it stays persisted and re-applies unchanged the moment a peer section returns. This decision is now recorded at the partition site (ui/src/components/app-sidebar-session-navigation-logic.ts, "Accepted tradeoff" comment) so future readers see it as intentional, and the regression test pins rows-stay-visible as the protected behavior.

[P3] Stale new-session location in the guide — fixed. docs/web/control-ui.md now says the + lives in the sidebar's Sessions toolbar.

@steipete
steipete force-pushed the steipete/session-filter-discoverability-92b4b1 branch from a03a903 to 848a908 Compare August 18, 2026 09:34
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Aug 18, 2026
Also name the accepted tradeoff for the inert ungrouped-collapse preference at the partition site (ClawSweeper P1/P3 response).
Menu-geometry assertions now measure relative to the picker anchor in one atomic evaluate (immune to unrelated page settles, still catches focus-induced moves). The post-reload refill raced the composer's async draft restore, which appended the stored draft to the typed text; waiting for the restored draft asserts the documented persistence instead. Failed CI shard checks-ui-e2e 5/12 on runs 32122284238 attempts 1-2.
@steipete
steipete force-pushed the steipete/session-filter-discoverability-92b4b1 branch from 848a908 to 2e42f5e Compare August 18, 2026 14:18
@steipete

Copy link
Copy Markdown
Contributor Author

Exact-head checks-ui-e2e (5/12) failed twice in ui/src/e2e/new-session-page.workspace-memory.e2e.test.ts, both times on pre-existing load-timing flakes: viewport-absolute boundingBox() equality was sampled across an asynchronous page settle, and the post-reload refill raced the composer's asynchronous draft restore, which appended the stored draft and produced the doubled-string failure. The pathfinder commit 2e42f5e3 deflakes both at the assertion boundary while strengthening the contracts they protect; the underlying draft-restore append race is filed here as follow-up work rather than being folded into this PR.

  • Geometry: take one atomic anchor-relative snapshot and assert the new-session card's position against the sidebar/content anchors, avoiding viewport-absolute samples taken at different settle points.
  • Draft restore: after reload, wait for the stored draft value instead of refilling immediately, so the test asserts documented persistence without racing the asynchronous restore.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. and removed merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 18, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready update on exact head 5c24c004bf2e3420505c5cd66e4cc2667bc7b25b:

No remaining proof gap identified for the landing gate.

@steipete
steipete merged commit c77feb0 into main Aug 18, 2026
209 checks passed
@steipete
steipete deleted the steipete/session-filter-discoverability-92b4b1 branch August 18, 2026 15:10
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Aug 18, 2026
… text

After a reload the new-session composer renders before the gateway
recovery scope arrives; selectRoute then zeroes the draft revision, so
text typed in that window lost to the stored draft's higher revision and
the async restore overwrote (or, interleaved with input, appended to)
what the user had typed. Seen on PR #125690 CI (checks-ui-e2e 5/12, run
32122284238) as a doubled composer value.

NewSessionDraftPersistence now records a pristine baseline at each
programmatic content replacement (page reset, navigation handoff,
restore apply) and restores only when no user mutation happened past it;
otherwise the typed text wins and persists above the stored revision,
including minting a revision for text typed before route activation so
that draft still lands. The chat composer sibling is unaffected: its
revision lineage persists synchronously to localStorage.
steipete added a commit that referenced this pull request Aug 18, 2026
… text (#125884)

* fix(ui): never restore a stored draft over typed new-session composer text

After a reload the new-session composer renders before the gateway
recovery scope arrives; selectRoute then zeroes the draft revision, so
text typed in that window lost to the stored draft's higher revision and
the async restore overwrote (or, interleaved with input, appended to)
what the user had typed. Seen on PR #125690 CI (checks-ui-e2e 5/12, run
32122284238) as a doubled composer value.

NewSessionDraftPersistence now records a pristine baseline at each
programmatic content replacement (page reset, navigation handoff,
restore apply) and restores only when no user mutation happened past it;
otherwise the typed text wins and persists above the stored revision,
including minting a revision for text typed before route activation so
that draft still lands. The chat composer sibling is unaffected: its
revision lineage persists synchronously to localStorage.

* test(ui): run draft-persistence regression in the isolated ui lane

The regression test mocks the statically imported
durable-composer-persistence helper (the store runtime is only
dynamically imported, so under the shared isolate:false module graph its
mock alone is packing-dependent). Isolating the file makes the mocks
deterministic and keeps the shared-lane file set unchanged so sibling
packing does not shift.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
…25690)

* feat(ui): promote session controls to toolbar

* test(ui): add session toolbar proof capture script

* chore: register session toolbar proof script

* test(ui): target ungrouped session drop zone

* fix(ui): trim session toolbar startup cost

* docs(ui): point new-session guide at the Sessions toolbar

Also name the accepted tradeoff for the inert ungrouped-collapse preference at the partition site (ClawSweeper P1/P3 response).

* test(ui): deflake new-session workspace-memory e2e

Menu-geometry assertions now measure relative to the picker anchor in one atomic evaluate (immune to unrelated page settles, still catches focus-induced moves). The post-reload refill raced the composer's async draft restore, which appended the stored draft to the typed text; waiting for the restored draft asserts the documented persistence instead. Failed CI shard checks-ui-e2e 5/12 on runs 32122284238 attempts 1-2.

* fix(ui): use canonical session owner filter state

* chore(ui): keep session toolbar proof artifacts ignored
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
… text (openclaw#125884)

* fix(ui): never restore a stored draft over typed new-session composer text

After a reload the new-session composer renders before the gateway
recovery scope arrives; selectRoute then zeroes the draft revision, so
text typed in that window lost to the stored draft's higher revision and
the async restore overwrote (or, interleaved with input, appended to)
what the user had typed. Seen on PR openclaw#125690 CI (checks-ui-e2e 5/12, run
32122284238) as a doubled composer value.

NewSessionDraftPersistence now records a pristine baseline at each
programmatic content replacement (page reset, navigation handoff,
restore apply) and restores only when no user mutation happened past it;
otherwise the typed text wins and persists above the stored revision,
including minting a revision for text typed before route activation so
that draft still lands. The chat composer sibling is unaffected: its
revision lineage persists synchronously to localStorage.

* test(ui): run draft-persistence regression in the isolated ui lane

The regression test mocks the statically imported
durable-composer-persistence helper (the store runtime is only
dynamically imported, so under the shared isolate:false module graph its
mock alone is packing-dependent). Isolating the file makes the mocks
deterministic and keeps the shared-lane file set unchanged so sibling
packing does not shift.
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 merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: L 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