Skip to content

feat(ui): multi-select sessions in the sidebar with batch menu actions#104416

Merged
steipete merged 3 commits into
mainfrom
claude/multi-select-session-sidebar-6ae47a
Jul 11, 2026
Merged

feat(ui): multi-select sessions in the sidebar with batch menu actions#104416
steipete merged 3 commits into
mainfrom
claude/multi-select-session-sidebar-6ae47a

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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

  • Cmd/Ctrl-click toggles a sidebar session row in and out of a selection; shift-click extends the selection from the anchor across the visible row order. Plain click clears the selection and opens the session as before.
  • Right-clicking (or opening the 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.
  • Right-clicking a row outside the selection retargets the menu to that row and drops the selection (standard behavior).
  • Batch delete asks for one confirmation, uses the existing sessions.deleteMany path, 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).
  • Selected rows get a distinct highlight that stays readable next to the active-row highlight.
  • New strings are translated across all 20 locales (pnpm ui:i18n:sync, fallbacks=0).

Evidence

  • Surface: 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 carry deleteTranscript), ui/src/styles/layout.css, ui/src/i18n/locales/en.ts + generated bundles.
  • Tests: 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 + deleteMany with deleteTranscript, unselected-row retarget. ui/src/components/session-menu.test.ts — batch menu renders only count-labeled batch actions; Mark N as read aggregation.
  • Testbox: pnpm test ui/src/components/app-sidebar.test.ts ui/src/components/session-menu.test.ts → 2 files, 36 tests passed (lease tbx_01kx8c6jdxfaya74b0n41xbr8e).
  • Testbox: pnpm check:changed → passed (exit 0, 9m0s, same lease).
  • Testbox: pnpm test ui/src/i18n → passed (locale structural alignment covers the new keys across all bundles).
  • Autoreview (Codex 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 .i18n translation-memory diff exceeds the 180k review-bundle cap). No other findings.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Jul 11, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Jul 11, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jul 11, 2026
@clawsweeper

clawsweeper Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 7:36 AM ET / 11:36 UTC.

Summary
Adds modifier-key session multi-selection and count-aware batch read, group, archive, and delete actions to the Control UI sidebar, with tests, styles, documentation, and generated locale updates.

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
Persistent data-model change detected: persistent cache schema: ui/src/i18n/.i18n/ar.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/de.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/es.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/fa.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/fr.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/hi.tm.jsonl, and 18 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #104409
Summary: This PR directly implements the linked Control UI sidebar multi-selection feature issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Surface mixed deleteMany errors and add focused regression coverage.
  • Attach redacted real Control UI proof of the selection and batch-action workflow.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR provides Testbox tests and checks only; add a redacted real Control UI recording or screenshots showing selection, retargeting, and a batch action, then update the PR body for automatic re-review or ask a maintainer to comment @clawsweeper re-review.

Risk before merge

  • [P1] A selected session rejected during batch deletion remains visible with no explanation after the menu closes, making a partial destructive operation appear silently inconsistent.
  • [P1] Modifier-key selection, shift-range ordering, menu retargeting, and destructive batch actions have not been demonstrated in a real Control UI browser flow.

Maintainer options:

  1. Repair partial-failure feedback (recommended)
    Display deleteMany errors in the sidebar and add mixed-success regression coverage before merge.
  2. Pause for complete proof
    Keep the PR open until the contributor demonstrates the real sidebar workflow and the resulting exact head is re-reviewed.

Next step before merge

  • [P1] The protected maintainer-labeled PR should remain in normal review for the author to address the concrete result-handling defect and supply real behavior proof.

Security
Cleared: No concrete security or supply-chain concern appears in the UI logic, existing RPC usage, tests, styles, documentation, or generated locale changes.

Review findings

  • [P2] Surface partial batch-delete failures — ui/src/components/app-sidebar.ts:692-698
Review details

Best 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:

  • [P2] Surface partial batch-delete failures — ui/src/components/app-sidebar.ts:692-698
    Handle result.errors from deleteMany as the existing Sessions page does. A target can become undeletable after the menu opens; this path otherwise closes while failed rows remain without any explanation.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1d84acf2c35b.

Label changes

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR provides Testbox tests and checks only; add a redacted real Control UI recording or screenshots showing selection, retargeting, and a batch action, then update the PR body for automatic re-review or ask a maintainer to comment @clawsweeper re-review.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 📣 needs proof.

Label justifications:

  • P3: This is a bounded, non-urgent Control UI productivity and ergonomics feature.
  • merge-risk: 🚨 other: The new destructive batch flow can silently leave individually rejected sessions unchanged, a user-visible inconsistency that green checks do not settle.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR provides Testbox tests and checks only; add a redacted real Control UI recording or screenshots showing selection, retargeting, and a batch action, then update the PR body for automatic re-review or ask a maintainer to comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +531, Tests +180, Docs 0. Total +711 across 68 files.

View PR surface stats
Area Files Added Removed Net
Source 65 687 156 +531
Tests 2 184 4 +180
Docs 1 2 2 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 68 873 162 +711

What I checked:

  • Current-head defect: The batch-delete handler consumes successful deletions and preserved worktrees but never reads or presents result.errors. (ui/src/components/app-sidebar.ts:692, f33d1787da50)
  • Capability contract: The shared deleteMany implementation catches individual deletion failures, accumulates them in errors, and returns that list to its caller. (ui/src/lib/sessions/index.ts:1052, e8cbc62e3e44)
  • Sibling behavior: The established Sessions-page batch flow handles aggregate deletion errors, so the new sidebar path should preserve the same user-feedback contract. (ui/src/pages/sessions/sessions-page.ts, 1d84acf2c35b)
  • Coverage gap: The added sidebar tests exercise successful batch deletion but do not return or assert a mixed-success result containing errors. (ui/src/components/app-sidebar.test.ts:446, f33d1787da50)
  • Prior finding continuity: The earlier ClawSweeper cycle raised this same partial-failure defect; direct inspection confirms it remains unfixed on the latest head. (ui/src/components/app-sidebar.ts:692, f33d1787da50)
  • Proof assessment: The PR body reports Testbox unit tests, i18n tests, and changed checks, but contains no recording, screenshots, live output, or linked artifact demonstrating the real sidebar interaction after the change. (f33d1787da50)

Likely related people:

  • steipete: Recent merged history shows sustained ownership of the sessions sidebar redesign, session context menus, Sessions page, and shared session capability used by this PR. (role: feature owner and recent area contributor; confidence: high; commits: fd2a2411b96a, cb641174162e, e500a4f017bf; files: ui/src/components/app-sidebar.ts, ui/src/components/session-menu.ts, ui/src/pages/sessions/sessions-page.ts)
  • maweibin: Recent merged work modified session-sidebar state retention through reconnects, making this contributor relevant to selection-state behavior across sidebar refreshes. (role: adjacent sidebar contributor; confidence: medium; commits: 8dd45e864e04; files: ui/src/components/app-sidebar.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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.
Review history (1 earlier review cycle)
  • reviewed 2026-07-11T11:08:16.838Z sha 5bd43c6 :: needs real behavior proof before merge. :: [P2] Surface batch delete failures in the sidebar

@steipete
steipete force-pushed the claude/multi-select-session-sidebar-6ae47a branch from 5bd43c6 to f33d178 Compare July 11, 2026 11:29
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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 Jul 11, 2026
@steipete
steipete merged commit d5fe0c5 into main Jul 11, 2026
91 of 97 checks passed
@steipete
steipete deleted the claude/multi-select-session-sidebar-6ae47a branch July 11, 2026 11:38
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 12, 2026
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
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: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI: multi-select sessions in the sidebar for batch archive/delete/group actions

1 participant