Skip to content

feat(ui): replace sidebar session menu button with Archive - #154144

Merged
steipete merged 5 commits into
mainfrom
codex/sidebar-inline-archive
Sep 21, 2026
Merged

steipete merged 5 commits into
mainfrom
codex/sidebar-inline-archive

Conversation

@steipete

@steipete steipete commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Desktop sidebar rows spend an action on an ellipsis even though the full session menu is already available by right-clicking.

User Impact

Native session rows now show Archive beside Pin; archived rows show Restore. Right-click, Shift+F10, and the Menu key open the full menu. Touch devices retain a separate tappable menu button. Archive preserves the open conversation and offers Undo, with existing permissions and protected-session checks intact.

Why This Change Was Made

Use the existing archive/restore operation for the common row action. Menu state stays separate from hovercard accessibility state, and focus returns to a valid row control when a catalog session is adopted. Catalog-only rows and the Sessions table retain their existing controls.

Evidence

  • Full CI passed on aa68608e8ade254fef1188e9eb9cf885de53a032, including all 13 browser shards, three UI component shards, and the real-Gateway lane. Fresh review has no remaining findings.
  • Local proof: 491 sidebar/hovercard component tests, 54 browser tests across nine full files, and 40 targeted catalog lifecycle/controller/focus tests passed. Archive/restore, Undo, access denial, duplicate suppression, keyboard focus, actual touch taps, and adopted catalog actions are covered.
  • Changed-file type/lint/i18n/export checks passed. Real Chrome synthetic preview verified desktop and touch presentation, context-menu entry, keyboard hovercards, and focus restoration. Screenshots below were inspected and their GitHub rendering verified.
  • The independently reviewed test-cleanup fix fix(test): prevent stale database readers across test files #154214 landed first. Its CI and required Linux proof passed: 20 standalone regressions and three original-order 218-file shards, each with 2,841 passing tests and only existing skips. An identical duplicate left by a concurrent fix is tracked in the reviewed one-line cleanup draft chore(test): deduplicate shared reader retirement #154266.
Measured test cost and CI repairs

The sidebar/hovercard component run took 44.15s wall with one worker. Full browser-file test times: hovercard 13.89s; navigation 6.40s; identity links 16.50s; trailing indicators 9.70s; sidebar 29.70s; native catalog 6.58s; mobile 5.28s; invitation interactions 39.32s. Owner assignment passed all 12 cases in 29.70s wall. Catalog lifecycle/controller coverage passed 39 cases in 5.91s; the existing reorder-focus sibling passed in 5.46s. The new closed-menu adoption case took 47ms and failed before its repair. The longer existing browser compositions exercise viewport, input, and Gateway event boundaries.

Full CI exposed a keyboard-hovercard regression: the row link's hovercard and menu shared aria-expanded. The final code detects actual mounted menu elements and leaves the link's ARIA with its hovercard owner. A stale owner-assignment assertion now checks actual menu removal and restored focus after Escape. Catalog adoption also preserves focus when its old, closed menu button disappears. Touch tests use actual taps instead of a right-click substitute.

An archive-action fixture lacked sessions.patch capability, so its Archive button was correctly unfocusable; the fixture now advertises the operation it exercises. The unrelated Claw close-error test inherited explicit native-mode state from an earlier installer test; this branch includes the merged owner repair #154120. A later main-branch worker mock leaked into workspace-read tests; #154214 fixes the shared test-generation cleanup. Failed jobs were diagnosed, not rerun to obtain green.

The local real-Gateway fixture lacked built plugin SDK artifacts, so hosted built-artifact CI supplied that proof. The generic synthetic preview's archive fixture returns an identity error; dedicated mock-Gateway tests verify successful archive/restore requests and visible outcomes.

Before:

Sidebar before: ellipsis beside Pin

After:

Sidebar after: Archive beside Pin

Touch layout:

Touch sidebar retains Pin, Archive, and menu

@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 20, 2026 23:10
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Sep 20, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 Sep 20, 2026
@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 20, 2026, 9:20 PM ET / September 21, 2026, 01:20 UTC (Revision 5).

ClawSweeper review

What this changes

The PR adds direct Archive and Restore controls to sidebar session rows, preserves touch and keyboard menus, repairs focus restoration, and includes shared test-worker cleanup.

Merge readiness

✅ Ready for maintainer review

The sidebar improvement remains absent from current main and the latest release. All prior findings are addressed, and this review found no remaining blocking defects.

Priority: P2
Reviewed head: aa68608e8ade254fef1188e9eb9cf885de53a032

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with inspected visual evidence, successful exact-head CI, and resolved prior findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected Chrome before/after and touch screenshots directly demonstrate the sidebar presentation change. Existing-operation wiring and focused browser coverage support interaction behavior; the disclosed synthetic archive error is not treated as successful transport proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected Chrome before/after and touch screenshots directly demonstrate the sidebar presentation change. Existing-operation wiring and focused browser coverage support interaction behavior; the disclosed synthetic archive error is not treated as successful transport proof.
Evidence reviewed 10 items Pinned introduction and merge scope: Reviewed the merge-base-to-head introduced diff. The recorded test merge has the pinned base followed by the exact PR head as parents; its changes match the introduced surface rather than unrelated endpoint drift.
Existing operation ownership preserved: The new controls reuse the organizer's archive-with-Undo and restore operations. The existing operation owner checks current mutation scope, durable session identity, and method access; archive admission suppresses duplicate requests.
Prior review findings resolved: Mounted menu elements now determine hovercard suppression; touch retains a tappable menu; the owner-assignment test asserts dismissal and restored focus; catalog adoption falls back to the replacement row link. The previous completed review examined this same head and retained no findings.
Findings None None.
Security None None.

How this fits together

The Control UI sidebar displays sessions supplied by the Gateway. Its row controls invoke existing session operations, which manage permission checks, archive state, visible recovery, and Undo.

flowchart LR
 A[Gateway session roster] --> B[Sidebar session rows]
 B --> C[Archive or Restore]
 B --> D[Touch or keyboard menu]
 C --> E[Existing session operations]
 D --> E
 E --> F[Gateway permission and identity checks]
 F --> G[Updated roster and Undo]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +57, Tests +42, Docs 0. Total +99 across 43 files.

View PR surface stats
Area Files Added Removed Net
Source 5 83 26 +57
Tests 37 245 203 +42
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 43 329 230 +99

Review metrics

None.

Technical review

Best possible solution:

Keep direct Archive and Restore controls backed by the existing session owner, with accessible menus and Undo preserved.

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

Not applicable: this is a UI interaction improvement; current-main source and the before screenshot establish the existing ellipsis control.

Is this the best way to solve the issue?

Yes. Reusing existing archive, restore, access, and Undo operations avoids a competing state owner while retaining touch and keyboard access.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a667c541c1eb.

Labels

Label justifications:

  • P2: A bounded improvement to frequently used session controls with preserved archive and menu contracts.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected Chrome before/after and touch screenshots directly demonstrate the sidebar presentation change. Existing-operation wiring and focused browser coverage support interaction behavior; the disclosed synthetic archive error is not treated as successful transport proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected Chrome before/after and touch screenshots directly demonstrate the sidebar presentation change. Existing-operation wiring and focused browser coverage support interaction behavior; the disclosed synthetic archive error is not treated as successful transport proof.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected Chrome before/after and touch screenshots directly demonstrate the sidebar presentation change. Existing-operation wiring and focused browser coverage support interaction behavior; the disclosed synthetic archive error is not treated as successful transport proof.

Evidence

What I checked:

  • Pinned introduction and merge scope: Reviewed the merge-base-to-head introduced diff. The recorded test merge has the pinned base followed by the exact PR head as parents; its changes match the introduced surface rather than unrelated endpoint drift. (aa68608e8ade)
  • Existing operation ownership preserved: The new controls reuse the organizer's archive-with-Undo and restore operations. The existing operation owner checks current mutation scope, durable session identity, and method access; archive admission suppresses duplicate requests. (ui/src/components/session-organizer-operations.runtime.ts:51, aa68608e8ade)
  • Prior review findings resolved: Mounted menu elements now determine hovercard suppression; touch retains a tappable menu; the owner-assignment test asserts dismissal and restored focus; catalog adoption falls back to the replacement row link. The previous completed review examined this same head and retained no findings. (ui/src/components/app-sidebar-session-catalog-render.ts:124, aa68608e8ade)
  • Inspected visual proof: Inspected all three downloaded screenshots from the captured PR body: desktop before shows Pin and ellipsis, desktop after shows Pin and Archive, and touch shows Pin, Archive, and ellipsis. These prove the changed presentation, not successful archive transport. The body separately reports Chrome interaction checks and explicitly discloses the synthetic preview's archive identity error. (aa68608e8ade)
  • Behavioral regression coverage: The updated component regression checks denied access, duplicate-click suppression, preserved navigation, durable identity, and Undo with pin restoration. Browser changes exercise inline archive/restore, actual touch taps, keyboard entry, and menu dismissal. Reported test results are supplemental; this read-only review ran no tests. (ui/src/test-helpers/app-sidebar-cases/session-mutations.ts:197, aa68608e8ade)
  • Exact-head CI verified: GitHub reports workflow run 35548742912 completed successfully for the exact reviewed head. The captured body identifies the browser, component, and real-Gateway lanes; this is supporting validation rather than screenshot or runtime-path proof. (aa68608e8ade)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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 (4 earlier review cycles)
  • reviewed 2026-09-20T23:24:57.795Z sha 30d7e6b5d12d75004982efed6997dd43d99e40e3 :: blocked before merge. :: [P2] Separate menu-open detection from hovercard expansion state | [P2] Retain a touch-operable session-menu trigger
  • reviewed 2026-09-21T00:08:55.759Z sha 95d24e7d7a26e3e88dff909cd781d3804e1a07c0 :: needs changes before merge. :: [P2] Assert menu dismissal instead of the old trigger attribute
  • reviewed 2026-09-21T00:24:09.180Z sha dbb27f467f3d6a5795e998d7161308b377bd82d1 :: needs changes before merge. :: [P2] Preserve focused controls when a catalog row is adopted
  • reviewed 2026-09-21T00:53:26.674Z sha aa68608 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/sidebar-inline-archive branch from 30d7e6b to 95d24e7 Compare September 20, 2026 23:59
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Fixed keyboard-hovercard self-dismissal by checking mounted menus, preserved a touch-only menu button, and restored actual tap coverage for touch entry. All 491 component tests and 42 mocked browser tests pass. Rebased to include the merged filesystem fixture repair in #154120; updated CI is attached to the new head.

@clawsweeper

clawsweeper Bot commented Sep 20, 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.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Sep 21, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Resolved the remaining owner-assignment assertion in dbb27f467f3: Escape now verifies the menu is removed and focus returns to the row link, then retains keyboard reopen/self-assignment proof. All 12 tests in that file pass (29.70s), and independent review of this test-only correction is clean. Production code is unchanged from the prior review.

@clawsweeper

clawsweeper Bot commented Sep 21, 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:

Retire the shared read-pool generation alongside its SQLite lifecycle owner so later files register cleanup with their current owner. Extend the existing ordered SQLite runner fixture to prove the next file drains its own pool.
Keep full actions available through row context menus and keyboard shortcuts. Reuse archive/restore operations with Undo, access checks, and protected-session policy.
Detect mounted session menus instead of borrowing the hovercard expansion state. Keep a coarse-pointer menu button and exercise actual touch input. Correct the archive-action fixture capability.
@steipete
steipete force-pushed the codex/sidebar-inline-archive branch from dbb27f4 to aa68608 Compare September 21, 2026 00:46
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Fixed closed-menu catalog adoption focus: restoration uses the original control when present, otherwise the replacement row link. The regression fails before the fix; 40 focused lifecycle/controller/reorder tests pass, and independent review is clean. All prior UI CI shards and the real-Gateway lane passed. The branch also includes the independently reviewed test-worker cleanup dependency #154214 for the remaining backend CI failure; that PR lands first.

@clawsweeper

clawsweeper Bot commented Sep 21, 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.

@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 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 Sep 21, 2026
@steipete
steipete merged commit f305044 into main Sep 21, 2026
175 checks passed
@steipete
steipete deleted the codex/sidebar-inline-archive branch September 21, 2026 01:46
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 21, 2026
…154144)

* fix(test): retire shared state readers between files

Retire the shared read-pool generation alongside its SQLite lifecycle owner so later files register cleanup with their current owner. Extend the existing ordered SQLite runner fixture to prove the next file drains its own pool.

* feat(ui): replace sidebar session menu button with archive

Keep full actions available through row context menus and keyboard shortcuts. Reuse archive/restore operations with Undo, access checks, and protected-session policy.

* fix(ui): preserve touch menus and keyboard hovercards

Detect mounted session menus instead of borrowing the hovercard expansion state. Keep a coarse-pointer menu button and exercise actual touch input. Correct the archive-action fixture capability.

* test(ui): assert context menu dismissal at its owner

* fix(ui): retain focus when catalog rows are adopted
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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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