Repository navigation
fix: keep your place when closing chat search during a reply - #208093
Conversation
Treat retained stream rows as empty for history-anchor restoration, without changing live output, highlights, or the no-match status. Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: e8317902-da43-4506-8e62-273dc793bc3c
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: passed. What this changesThis PR restores the saved reading position when an empty chat search closes while a reply is streaming. Example: Read note 56 in a 78-message chat, search for an absent term during a reply, then close search.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a concrete reading-position bug still present on current main, with a focused implementation and no actionable findings. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI projects loaded history and live replies into transcript rows, then supplies search state to the existing scroll-anchor owner to restore the reader’s position. flowchart TD
A[Loaded history and live reply] --> B[Search filtering]
B --> C[Transcript projection]
C --> D[Visible transcript rows]
C --> E[History emptiness signal]
E --> F[Existing scroll anchor]
F --> D
Technical reviewBest possible solution: Use the existing anchor’s empty-history signal for stream-only search projections, as this PR does. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the failure path, supported by the supplied before/after Chromium scenario; this read-only review did not execute target code. Is this the best way to solve the issue? The patch corrects the projection’s input to its existing anchor owner and preserves live rendering, search status, and the earlier restoration mechanics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b904594b0377. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +3, Tests +22. Total +25 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed November 29, 2026, 4:19 AM ET / 09:19 UTC (Revision 4). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…w#208093) Restore the saved reading position when closing a search that leaves only the streaming reply visible. Keep the live reply and search highlights on screen. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: e8317902-da43-4506-8e62-273dc793bc3c
Related: #208010, #207673
What Problem This Solves
While a reply is streaming, closing a search that found no earlier messages can jump from the message you were reading to the bottom of the chat. The same search in a completed chat keeps your place.
User Impact
Close the search and the message you were reading stays at the same position in the transcript. The reply keeps streaming. There is no new setting or migration.
Why This Change Was Made
The live reply stays on screen during search, even when none of the saved messages match. The scroll anchor treated that live row as a history result and skipped restoring the saved position. I changed only what the existing anchor receives: a stream-only projection has no history row to return to. The separate decision about whether to show “No matches” is unchanged, so the UI does not put that notice above a highlighted live reply.
This builds on #208010, which is already in the tested main revision. It does not change first-match navigation, follow-to-latest behavior, or the anchor implementation from #207673.
Evidence
I tested the real Control UI and Gateway in Chromium on Crabbox AWS, with 78 synthetic history messages and a loopback provider holding an actual response stream open. I scrolled up, opened Find from the composer, entered an absent term, received another reply delta, and closed Find before the reply finished.
3f6e3a9: the first visible message changed from note 56 to 74; distance from the bottom went from 1,962 px to zero.27fd5fe: note 56 stayed first, 14.58 px from the transcript top before search and 14.08 px after. The reply remained active.querySelectorcalls inchat-pane-shared.tson both main and head. I did not change that file. I did not test Safari or Firefox.Clean comparison
Before: On main, note 74 is clipped at the top and the live reply is visible below it.
After: On the fix, note 56 is still first while the reply continues below the viewport.
Annotated comparison
Both captures are from the same 1180 × 760 Chromium flow. The transcript change and its browser regression test match the files tested on AWS. In a separate Chromium run with a mocked Gateway, main
5b7efcdlost the saved message and all five cases passed on76b19b5with the same test file.Worked on by
Work sessions
Linked for team reference; these sessions aren’t public.
🦞 Made with OpenClaw