feat(ui): multi-select sessions in the sidebar with batch menu actions#104416
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85c2bd399e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return; | ||
| } | ||
| const { selectedAgentId } = this.getSessionNavigationState(); | ||
| const result = await context.sessions.deleteMany( |
There was a problem hiding this comment.
Surface batch delete failures in the sidebar
When any selected target fails during deleteMany (for example, a row becomes undeletable because an active run starts after the menu opens, or the gateway rejects one target), the capability returns that failure in result.errors and does not publish it as state; the Sessions page explicitly handles those errors, but this new sidebar path drops them and only reports preserved worktrees. The menu then closes and failed rows simply remain with no explanation, so please surface result.errors here the same way the existing batch delete flow does.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 7:36 AM ET / 11:36 UTC. Summary PR surface: Source +531, Tests +180, Docs 0. Total +711 across 68 files. Reproducibility: yes. from source inspection: the shared capability returns per-target errors, while the exact PR head ignores them and its new tests cover successful deletion only. Review metrics: none identified. 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:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Retain the capability-based sidebar design, present aggregate deletion errors consistently with the Sessions page, add a mixed-success regression test, and attach redacted real-browser proof of selection, retargeting, and a batch action. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: the shared capability returns per-target errors, while the exact PR head ignores them and its new tests cover successful deletion only. Is this the best way to solve the issue? Mostly yes: extending the existing sidebar, menu, and shared session capability is the narrowest maintainable approach, but its result handling must match the established Sessions-page feedback contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1d84acf2c35b. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +531, Tests +180, Docs 0. Total +711 across 68 files. View PR surface stats
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
Review history (1 earlier review cycle)
|
5bd43c6 to
f33d178
Compare
openclaw#104416) * feat(ui): multi-select sessions in the sidebar with batch menu actions * chore(i18n): sync locale bundles for sidebar multi-select strings * docs(control-ui): document sidebar session multi-select and batch menu
What Problem This Solves
Closes #104409.
The sessions sidebar only supports acting on one session at a time. Cleaning up after a busy day means archiving or deleting sessions one by one, each with its own context-menu round-trip and (for delete) its own confirm dialog. The Sessions settings page already has checkbox multi-select with batch delete, but the sidebar — where people actually manage sessions — has nothing.
Why This Change Was Made
Batch session management belongs where the session list lives. The batch RPC path (
SessionCapability.deleteMany) already exists and is used by the Sessions page; the sidebar just never adopted it. This change adds standard list multi-select UX on top of the existing menu and capability seams without touching gateway protocol or core.User Impact
…menu on) a selected row shows a batch menu:Mark N as unread/Mark N as read,Move N to group,Archive N,Delete N…— only actions that apply to every selected session. Single-session menus are unchanged.sessions.deleteManypath, and surfaces preserved dirty worktrees as a single summary alert (same policy as the Sessions page). Archive/delete are enabled only when every selected row is archivable (agent main sessions and active runs stay protected).pnpm ui:i18n:sync, fallbacks=0).Evidence
ui/src/components/app-sidebar.ts(selection state, click handling, batch dispatch),ui/src/components/session-menu.ts(batch mode),ui/src/lib/sessions/index.ts(batch targets carrydeleteTranscript),ui/src/styles/layout.css,ui/src/i18n/locales/en.ts+ generated bundles.ui/src/components/app-sidebar.test.ts— cmd-click toggle + plain-click clear, shift-range across visible order, batch archive patches every selected key, batch delete via one confirm +deleteManywithdeleteTranscript, unselected-row retarget.ui/src/components/session-menu.test.ts— batch menu renders only count-labeled batch actions;Mark N as readaggregation.pnpm test ui/src/components/app-sidebar.test.ts ui/src/components/session-menu.test.ts→ 2 files, 36 tests passed (leasetbx_01kx8c6jdxfaya74b0n41xbr8e).pnpm check:changed→ passed (exit 0, 9m0s, same lease).pnpm test ui/src/i18n→ passed (locale structural alignment covers the new keys across all bundles).gpt-5.5, thinking xhigh) on the source commit: one P1 — "generated locale bundles not synced" — which is addressed by the branch's follow-up i18n sync commit (the review was commit-scoped because the generated.i18ntranslation-memory diff exceeds the 180k review-bundle cap). No other findings.