Skip to content

fix(ui): prevent hidden session selection from bulk deletion - #117015

Merged
steipete merged 1 commit into
mainfrom
codex/qa300-ui-hidden-selection-owner
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa300-ui-hidden-selection-owner

Conversation

@steipete

@steipete steipete commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes a destructive Sessions-page bug where selecting a thread, changing the roster search, and deleting a newly visible thread could silently delete the previously selected hidden thread and its transcript as well.

Why This Change Was Made

The canonical roster-search owner now clears the local bulk selection whenever the visible roster population changes. Existing intentional cross-page selection, sorting, grouping, Gateway authorization, and deletion behavior remain unchanged.

User Impact

Bulk deletion can no longer retain invisible selections from an earlier roster search. Users receive an immediate, accurate selection state before choosing visible threads to delete.

Evidence

  • Original reproduced frozen baseline: 36b80ada3ceae2de21b3d8710b883d778e4c4578.
  • Exact current-main base: 727216b014c15ab878486e0e1378c5564b84386e.
  • Exact freshly reviewed rebased head: 85ce28efeec63acb3d9f33a0ca5845c79f09187d.
  • The rebase preserves the original reviewed stable patch-id exactly: d97b37ca060c28338a5e2f32aee8ad2df702af7b.
  • Actual Chromium reproduced the frozen-baseline failure: a newly hidden selected thread remained selected after changing the roster search.
  • Exact rebased-head server-preferences singleton/isolation regression: 2/2 passed. Current main already contains the separate isolation fix that caused the earlier unrelated synthetic-merge CI failure.
  • Exact rebased-head Sessions owner suite: 25/25 passed.
  • Exact rebased-head actual Chromium archive/deletion sibling suite: 7/7 passed, with zero skips.
  • The new browser regression inspects actual Gateway WebSocket requests and proves that only visible agent:main:bravo receives sessions.delete with deleteTranscript: true.
  • Genuine full structured Codex autoreview and TruffleHog secret scan, explicitly including P0 through P3: clean, zero findings, confidence 0.97.
  • Independent exact-head owner/caller/Gateway/sibling review: clean through P3.
  • Production delta: one line; no authorization, configuration, public SDK, protocol, persistent-state, or cross-page selection changes.
  • Remote current-head proof lease was stopped and independently verified completed: https://github.com/openclaw/openclaw/actions/runs/30675010399.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Jul 31, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P1 High-priority user-facing bug, regression, or broken workflow. labels Jul 31, 2026
@clawsweeper

clawsweeper Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 31, 2026, 8:40 PM ET / August 1, 2026, 00:40 UTC.

ClawSweeper review

What this changes

The PR clears the Sessions page’s local bulk selection when roster search changes and adds a browser regression test proving deletion targets only the newly visible selected session.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

This is a narrow, browser-covered repair for a real destructive selection-state bug, with no source-level correctness or security finding. Keep it open for human maintainer acceptance because the protected maintainer label reserves the intentional bulk-selection behavior change, and the exact-head CI set is still in progress.

Priority: P1
Reviewed head: 85ce28efeec63acb3d9f33a0ca5845c79f09187d
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused owner-boundary repair has strong browser-level request proof and no supported correctness or security finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body provides after-fix Chromium evidence that checks the observed Gateway delete request, and the supplied context marks that proof sufficient; redact private session data if future proof is posted.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides after-fix Chromium evidence that checks the observed Gateway delete request, and the supplied context marks that proof sufficient; redact private session data if future proof is posted.
Evidence reviewed 6 items Current-main behavior remains unfixed: Current origin/main still updates the roster-search text and page number without clearing the page-local selection; the new regression test is also absent from current main.
Deletion snapshots all selected keys: The bulk-delete owner snapshots every entry in selectedKeys before confirmation and passes each key to the Gateway deletion operation, so a session hidden by roster search remains eligible for destructive deletion without this reset.
Existing invalidation policy: Current code already clears the same local selection when roster filters, archived status, route state, or clear-filters operations change the displayed population; search is the missing parallel boundary.
Findings None None.
Security None None.

How this fits together

The Control UI lists Gateway sessions, lets an operator select rows for bulk actions, and sends selected session keys to the Gateway for deletion. Roster search changes which rows are visible, so page-owned selection state must not retain a hidden row into a destructive action.

flowchart LR
  Gateway[Gateway session list] --> Page[Sessions page]
  Page --> Search[Roster search]
  Search --> Rows[Visible session rows]
  Rows --> Selection[Local bulk selection]
  Selection --> Confirm[Delete confirmation]
  Confirm --> Delete[Gateway deletion request]
Loading

Decision needed

Question Recommendation
Should the Sessions page clear all local bulk selections whenever the roster-search text changes, accepting that operators must reselect rows after editing search? Accept the reset: Merge after the exact-head required checks are green, making roster search follow the existing filter-selection invalidation rule.

Why: The existing filter and status-change paths already clear selection, and the proposed behavior prevents accidental transcript deletion; the protected maintainer label reserves this destructive-action tradeoff for a human decision.

Before merge

  • Resolve merge risk (P1) - Merging intentionally clears a user’s local bulk selection on every roster-search edit. That matches existing filter-reset policy and prevents hidden-row deletion, but a human maintainer should explicitly confirm the tradeoff for this destructive flow.
  • Resolve merge risk (P1) - The PR head is behind current main and the supplied exact-head check set remains in progress; refresh merge/head verification after CI completes rather than treating ordinary base drift as a patch defect.
  • Complete next step (P2) - There is no mechanical repair blocker; a human maintainer must confirm the intentional destructive-selection semantics and wait for exact-head CI.
Agent review details

Security

None.

PR surface

Source +1, Tests +58. Total +59 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 0 +1
Tests 1 58 0 +58
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 59 0 +59

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: ui/src/e2e/session-management.archive.e2e.test.ts, unknown-data-model-change: ui/src/e2e/session-management.archive.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Confirm reset semantics (recommended)
    Accept that changing roster search discards page-local bulk selection, then merge after exact-head checks complete green.
  2. Define persistent selection
    Pause this patch if maintainers want selection to survive search edits and specify a deletion contract that visibly enumerates all selected sessions.

Technical review

Best possible solution:

Keep bulk selection page-owned and clear it whenever roster search changes the visible population, then merge after a human maintainer confirms that destructive bulk actions must not retain hidden selections and the exact-head checks finish green.

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

Yes—source clearly establishes the mechanism: selection survives roster-search filtering, while deletion snapshots every selected key. The PR also supplies a Chromium regression that drives the sequence and inspects the resulting Gateway request.

Is this the best way to solve the issue?

Yes, subject to the maintainer selection-semantics decision: resetting the page-owned selection where search changes visible rows matches the existing filter and status-reset boundaries, instead of trying to compensate late in deletion.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add merge-risk: 🚨 session-state: The patch changes when local session-selection state is discarded during a destructive bulk-action workflow.

Label justifications:

  • P1: A hidden selected session can be included in a user-triggered bulk deletion and lose its transcript.
  • merge-risk: 🚨 session-state: The patch changes when local session-selection state is discarded during a destructive bulk-action workflow.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-fix Chromium evidence that checks the observed Gateway delete request, and the supplied context marks that proof sufficient; redact private session data if future proof is posted.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix Chromium evidence that checks the observed Gateway delete request, and the supplied context marks that proof sufficient; redact private session data if future proof is posted.

Evidence

What I checked:

  • Current-main behavior remains unfixed: Current origin/main still updates the roster-search text and page number without clearing the page-local selection; the new regression test is also absent from current main. (ui/src/pages/sessions/sessions-page.ts:1400, afa8fffab882)
  • Deletion snapshots all selected keys: The bulk-delete owner snapshots every entry in selectedKeys before confirmation and passes each key to the Gateway deletion operation, so a session hidden by roster search remains eligible for destructive deletion without this reset. (ui/src/pages/sessions/sessions-page.ts:683, 7dd74db83693)
  • Existing invalidation policy: Current code already clears the same local selection when roster filters, archived status, route state, or clear-filters operations change the displayed population; search is the missing parallel boundary. (ui/src/pages/sessions/sessions-page.ts:647, 7dd74db83693)
  • Patch and browser regression: The proposed one-line reset is at the roster-search owner. Its Chromium regression selects Alpha, filters to Bravo, deletes Bravo, and asserts the observed sessions.delete request targets only Bravo with deleteTranscript enabled. (ui/src/e2e/session-management.archive.e2e.test.ts:19, 85ce28efeec6)
  • Browser-to-Gateway assertion contract: The shared Playwright harness records mock Gateway method requests and waitForRequest returns an observed request after it arrives, so the test covers the Control UI action through its Gateway boundary rather than only a component method. (ui/src/test-helpers/control-ui-e2e.ts:1898, cc0315a397c8)
  • Feature-history provenance: The available history attributes the Sessions page, its view, and archive/deletion E2E suite to one introducing commit. The only origin/main commit after the local main checkout changes Gateway HTTP files, not this Sessions surface. (ui/src/pages/sessions/sessions-page.ts:1, cc0315a397c8)

Likely related people:

  • Sarah Fortune: The available current-main history attributes the Sessions page, its view, and surrounding archive/deletion E2E suite to the same introducing commit. (role: feature introducer; confidence: medium; commits: cc0315a397c8; files: ui/src/pages/sessions/sessions-page.ts, ui/src/pages/sessions/view.ts, ui/src/e2e/session-management.archive.e2e.test.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 (3 earlier review cycles)
  • reviewed 2026-07-31T19:35:21.324Z sha d625723 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-31T19:46:45.921Z sha d625723 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-31T22:39:00.189Z sha d625723 :: needs maintainer review before merge. :: none

@steipete
steipete marked this pull request as ready for review July 31, 2026 22:33
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 31, 2026
@steipete
steipete force-pushed the codex/qa300-ui-hidden-selection-owner branch from d625723 to 85ce28e Compare August 1, 2026 00:33
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. label Aug 1, 2026
@steipete
steipete merged commit 0ae516d into main Aug 1, 2026
106 checks passed
@steipete
steipete deleted the codex/qa300-ui-hidden-selection-owner branch August 1, 2026 00:42
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to pacocartones/openclaw that referenced this pull request Aug 1, 2026
* origin/main: (217 commits)
  fix(messages): reply actions leak citation markers and reply/poll answers draw the no-reply fallback (openclaw#116909)
  fix(slack): let durable ingress retry transient thread lookups (openclaw#117135)
  refactor(doctor): consolidate shipped state migration ownership (openclaw#117142)
  fix(ai): Codex stream shows internal parser text on a malformed frame (openclaw#116966)
  fix: guard every migrated session accessor path (openclaw#117140)
  fix(terminal): measure unicode display width consistently (openclaw#117062)
  fix(openai): clear ChatGPT SSE fallback per session (openclaw#117123)
  fix(mistral): reject incomplete streamed tool terminals (openclaw#117137)
  fix(ai): preserve structured chat content and refusals (openclaw#117136)
  fix(doctor): persist normalized agent roster (openclaw#117115)
  fix(signal): avoid replay after ambiguous quote delivery errors (openclaw#117134)
  fix(cron): reject disabled delivery accounts when scheduling (openclaw#116899)
  fix(gateway): honor HTTP If-Modified-Since media validators (openclaw#117133)
  fix(config): delete one array element per config patch delete (openclaw#116463)
  fix(plugins): report installed dependency health authoritatively (openclaw#117029)
  fix(ui): recover moving sessions across paged gateway rosters (openclaw#117016)
  fix(ui): clear hidden session selection before bulk deletion (openclaw#117015)
  fix(discord): avoid replaying ambiguous voice deliveries (openclaw#117127)
  fix(ui): scope Gateway reconnect lineage to its target (openclaw#117125)
  fix(models): expose runtime provider catalogs in browse views (openclaw#116857)
  ...
vincentkoc added a commit to yetval/openclaw that referenced this pull request Aug 1, 2026
* commit 'c41f033b87545b658215a9c3bbe03f88fbaa867d': (347 commits)
  refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146)
  fix(messages): reply actions leak citation markers and reply/poll answers draw the no-reply fallback (openclaw#116909)
  fix(slack): let durable ingress retry transient thread lookups (openclaw#117135)
  refactor(doctor): consolidate shipped state migration ownership (openclaw#117142)
  fix(ai): Codex stream shows internal parser text on a malformed frame (openclaw#116966)
  fix: guard every migrated session accessor path (openclaw#117140)
  fix(terminal): measure unicode display width consistently (openclaw#117062)
  fix(openai): clear ChatGPT SSE fallback per session (openclaw#117123)
  fix(mistral): reject incomplete streamed tool terminals (openclaw#117137)
  fix(ai): preserve structured chat content and refusals (openclaw#117136)
  fix(doctor): persist normalized agent roster (openclaw#117115)
  fix(signal): avoid replay after ambiguous quote delivery errors (openclaw#117134)
  fix(cron): reject disabled delivery accounts when scheduling (openclaw#116899)
  fix(gateway): honor HTTP If-Modified-Since media validators (openclaw#117133)
  fix(config): delete one array element per config patch delete (openclaw#116463)
  fix(plugins): report installed dependency health authoritatively (openclaw#117029)
  fix(ui): recover moving sessions across paged gateway rosters (openclaw#117016)
  fix(ui): clear hidden session selection before bulk deletion (openclaw#117015)
  fix(discord): avoid replaying ambiguous voice deliveries (openclaw#117127)
  fix(ui): scope Gateway reconnect lineage to its target (openclaw#117125)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 1, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 1, 2026
* commit '31f24547a94a8bd74a32e42cde1783591c5804d9': (347 commits)
  refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146)
  fix(messages): reply actions leak citation markers and reply/poll answers draw the no-reply fallback (openclaw#116909)
  fix(slack): let durable ingress retry transient thread lookups (openclaw#117135)
  refactor(doctor): consolidate shipped state migration ownership (openclaw#117142)
  fix(ai): Codex stream shows internal parser text on a malformed frame (openclaw#116966)
  fix: guard every migrated session accessor path (openclaw#117140)
  fix(terminal): measure unicode display width consistently (openclaw#117062)
  fix(openai): clear ChatGPT SSE fallback per session (openclaw#117123)
  fix(mistral): reject incomplete streamed tool terminals (openclaw#117137)
  fix(ai): preserve structured chat content and refusals (openclaw#117136)
  fix(doctor): persist normalized agent roster (openclaw#117115)
  fix(signal): avoid replay after ambiguous quote delivery errors (openclaw#117134)
  fix(cron): reject disabled delivery accounts when scheduling (openclaw#116899)
  fix(gateway): honor HTTP If-Modified-Since media validators (openclaw#117133)
  fix(config): delete one array element per config patch delete (openclaw#116463)
  fix(plugins): report installed dependency health authoritatively (openclaw#117029)
  fix(ui): recover moving sessions across paged gateway rosters (openclaw#117016)
  fix(ui): clear hidden session selection before bulk deletion (openclaw#117015)
  fix(discord): avoid replaying ambiguous voice deliveries (openclaw#117127)
  fix(ui): scope Gateway reconnect lineage to its target (openclaw#117125)
  ...
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 maintainer Maintainer-authored PR merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S 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