Repository navigation
fix(sessions): prevent search failures during session updates - #160237
roboclaw-bot wants to merge 2 commits into
Conversation
Co-authored-by: vyctorbrzezowski <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 28, 2026, 3:23 PM ET / 19:23 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch lets Gateway session search tolerate ordinary session-row updates and makes failed Control UI palette searches compact and retryable, with tests, copy, and documentation. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: current main lacks the repair, and the branch offers a focused change with no confirmed introduced defect. Priority: P2 Review scores
Verification
How this fits togetherGateway session search combines access-scoped session rows with transcript matches from a SQLite worker and returns authorized results. The Control UI command palette presents those results and offers Retry when search fails. flowchart LR
A[Palette query] --> B[Gateway search scope]
B --> C[Session row projection]
C --> D[Transcript worker]
D --> E[Scope and access recheck]
E --> F[Results or error]
F --> G[Palette results or Retry]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +52, Tests +169, Docs +3. Total +224 across 10 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the search refresh and retry behavior after resolving the conflict while preserving current main's palette shortcut rendering and the final access checks. Do we have a high-confidence way to reproduce the issue? Yes. The added registered-handler cases give a specific path in which committed session updates arrive after a real transcript read; this review did not execute them. Is this the best way to solve the issue? Yes. Joining one projection refresh before the existing scope and authorization rechecks is a narrow repair, and Retry gives the palette a visible recovery path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fd28e926dcb1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Co-authored-by: vyctorbrzezowski <[email protected]>
|
This pull request has been automatically marked as stale due to inactivity. |
What Problem This Solves
Fixes: message search intermittently reports unavailable during ordinary session activity, and the command palette leaves empty filters and hints beneath that failure.
User Impact
Search now tolerates ordinary title/usage updates, including activity in excluded background sessions. Genuine database errors, changed access, and session-lifecycle changes are still checked and reported; a failed search never becomes a false “No results found.” The palette retains a compact error message and Retry, preserving the query, focus, and foreground draft.
No permission, schema, retention, or stored-data changes. This PR has not been deployed to the reported Gateway.
Why This Change Was Made
The backend treated any pending session-row refresh as a changed search scope. Two harmless updates could consume both transcript-search attempts, even though the authorized session keys and lifecycle identities were unchanged.
Each attempt now joins one existing projection refresh before the original owner, readiness, scope, and generation checks. New dirty work after that refresh still consumes the existing retry budget. The final synchronous authorization/presentation check remains in place. This fixes the cause instead of suppressing its error.
Reported and requested by @vyctorbrzezowski.
Work sessions
Evidence
Earlier UI validation caveat
The first UI changed-check run stopped at a native TypeScript compiler nil-pointer panic in checkCollisionWithRequireExportsInGeneratedCode. A controlled baseline run and the byte-identical restored candidate both passed afterward. No compiler/dependency change or suppression was made; that one-off panic remains unexplained. Remaining checks were run separately, not represented as a green initial aggregate.
Same query, viewport, theme, and simulated service failure:
Before
After
Narrow viewport
Before:
After: