feat: session context menu (kebab + right-click) on the Sessions page#102564
Conversation
eba0e10 to
9ec9aeb
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 9, 2026, 5:13 AM ET / 09:13 UTC. Summary PR surface: Source +297, Tests +197. Total +494 across 70 files. Reproducibility: yes. at source level: render the new menu with session.archived=true and archiveAllowed=false and the Delete button is enabled by the changed condition. I did not execute the UI locally because this review is read-only. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Keep the shared menu extraction, but preserve the existing destructive-action policy by allowing Restore for archived rows while still requiring archiveAllowed for Delete, with regression coverage for archived protected rows. Do we have a high-confidence way to reproduce the issue? Yes, at source level: render the new menu with session.archived=true and archiveAllowed=false and the Delete button is enabled by the changed condition. I did not execute the UI locally because this review is read-only. Is this the best way to solve the issue? No, not yet: the shared component is the right owner-boundary shape, but Delete must still honor archiveAllowed for protected rows while Restore remains available for archived rows. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f141af7fd774. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +297, Tests +197. Total +494 across 70 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
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
|
|
Land-ready verification (head Remote proof (Blacksmith Testbox):
Local focused runs: Review: structured Codex autoreview ran three times (initial, after fixing its accepted P2 — deleting the currently targeted session now retargets the gateway to the agent main session in Known proof gaps: |
Extract the sidebar session menu into a shared <openclaw-session-menu> component and open it from a kebab button or row right-click on the Sessions page, replacing the per-row unread/fork/pin/archive/workboard icon buttons. Adds Open chat, Rename, Move to group, and per-row Delete to the page; guards (main/global/active-run) now flow through canArchiveSessionRow on both surfaces.
…from the sessions page Deleting the currently selected session via the new row menu (or the bulk bar) left gateway.snapshot.sessionKey pointing at the deleted key; fall back to the agent main session, mirroring the archive path and the sidebar delete path.
9ec9aeb to
d45a855
Compare
|
Merged via squash.
|
…runtime Feedback pass on the sessions redesign: status pills become a plain colored dot + label (green pulse for live, green dot with neutral label for done, muted idle, red failed) in both the roster and the drawer hero, and the Runtime column moves out of the table into the row drawer as Runtime (agent runtime) plus Run duration. Runtime stays searchable. Responsive breakpoints reflow for the 7-column roster and the actions column shrinks to the chevron and row menu that landed in #102564. Closes #102654
…runtime (#102664) Feedback pass on the sessions redesign: status pills become a plain colored dot + label (green pulse for live, green dot with neutral label for done, muted idle, red failed) in both the roster and the drawer hero, and the Runtime column moves out of the table into the row drawer as Runtime (agent runtime) plus Run duration. Runtime stays searchable. Responsive breakpoints reflow for the 7-column roster and the actions column shrinks to the chevron and row menu that landed in #102564. Closes #102654
…openclaw#102564) * feat(ui): add session context menu to sessions page rows Extract the sidebar session menu into a shared <openclaw-session-menu> component and open it from a kebab button or row right-click on the Sessions page, replacing the per-row unread/fork/pin/archive/workboard icon buttons. Adds Open chat, Rename, Move to group, and per-row Delete to the page; guards (main/global/active-run) now flow through canArchiveSessionRow on both surfaces. * fix(ui): retarget gateway session after deleting the current session from the sessions page Deleting the currently selected session via the new row menu (or the bulk bar) left gateway.snapshot.sessionKey pointing at the deleted key; fall back to the agent main session, mirroring the archive path and the sidebar delete path.
…runtime (openclaw#102664) Feedback pass on the sessions redesign: status pills become a plain colored dot + label (green pulse for live, green dot with neutral label for done, muted idle, red failed) in both the roster and the drawer hero, and the Runtime column moves out of the table into the row drawer as Runtime (agent runtime) plus Run duration. Runtime stays searchable. Responsive breakpoints reflow for the 7-column roster and the actions column shrinks to the chevron and row menu that landed in openclaw#102564. Closes openclaw#102654
Closes #102540
What Problem This Solves
The Sessions page table renders five separate icon buttons per row (mark unread, fork, pin, archive, add-to-workboard), which is visually noisy and still leaves common actions unreachable from a row: rename is buried in the details drawer and delete requires checkbox selection plus the bulk bar. The app sidebar already solved this with a session context menu (kebab + right-click), so the two surfaces behave inconsistently.
Why This Change Was Made
Extracts the sidebar session menu into a shared
<openclaw-session-menu>component (light-DOM Lit, discriminated-union action callbacks) and uses it on the Sessions page: one kebab button per row plus right-click anywhere on the row. The per-row icon buttons are removed; the details chevron and bulk-selection checkbox stay. The archive/delete guard policy (agent main sessions, active runs, global/unknown kinds) now flows through the existingcanArchiveSessionRowhelper on both surfaces instead of a duplicated inline condition, and the.sidebar-session-menu*CSS block is renamed to.session-menu*with unchanged declarations. The sidebar keeps its behavior and gains an "Open chat" item, a pin-state icon, and kebab click-to-toggle.User Impact
⋯menu instead of five hover buttons.sessionsView.openChat) synced across locale bundles.Evidence
ui/src/components/session-menu.test.ts(new): item order, conditional items, archived/guard disable states, close-before-dispatch ordering, group submenu actions, Escape/outside-pointerdown dismissal with trigger exclusion.ui/src/pages/sessions/view.test.ts: kebab hasaria-haspopupand reports row/position/trigger; rowcontextmenuopens the menu at cursor coordinates and prevents the native menu.ui/src/e2e/session-management.e2e.test.ts(mocked gateway): right-click opens the menu, Escape closes it, kebab reopens it, and "Archive session" issues the expectedsessions.patch; existing sidebar-menu e2e tests guard the extraction.node scripts/run-vitest.mjs run ui/src/components/session-menu.test.ts ui/src/pages/sessions/view.test.ts→ 2 files, 37 tests passed.