Repository navigation
fix(ui): restore the saved reading position after an empty search - #207673
Conversation
Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 05b75afd-1e3d-8174-8592-21c715e277cf
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. |
Browser proof: closing an empty searchThe reader starts on Folio 51. On the scheduled-main source, closing the search jumps back to Folio 1. With the fix, Folio 51 returns at the same viewport position and the unsent draft stays intact. Built Control UI, Chromium, 1280 × 900, light theme, synthetic Gateway history. Before: Clean comparisonBefore After Annotated comparisonBefore After |
|
Codex review: passed. What this changesThis PR prevents an empty search viewport’s offset reset from moving the saved chat reading position. Example: While reading Folio 51, search for absent-from-the-transcript and close search.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a current-main scroll-restoration regression, and no actionable correctness or security defect was found. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI’s per-session transcript anchor receives search projections and native offset changes, then restores a retained message through the virtualizer. flowchart TD
A[Search query] --> B[Transcript projection]
B --> C[Message anchor owner]
D[Native offset observer] --> C
C --> E[Virtualizer restoration]
E --> F[Visible reading position]
Technical reviewBest possible solution: Keep search-return targets fixed in the existing anchor owner while preserving history movement and explicit scroll cancellation. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the saved-target corruption, supported by the supplied browser comparison and reported revert comparison; this read-only review did not rerun the application. Is this the best way to solve the issue? The transient flag expresses a necessary distinction within the existing owner, preserves subsequent anchor captures, and avoids reverting the earlier history-scroll repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ba0a7a5fac3e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +6, Tests +22. Total +28 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: No label 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 HistoryReview history (1 earlier review cycle)
Reviewed November 28, 2026, 10:48 PM ET / November 29, 2026, 03:48 UTC (Revision 2). |
Pick up the Doctor registry and legacy-comment browser test fixes.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
* commit '1b246c09b0c1d41ed0f090f07fc50381decba90d': (574 commits) fix: stop the manual handoff UI test from hanging after completion (#207945) fix: surface favorites and recommended models in picker search (#201450) fix: show the saved quota reset when chat skips its only model (#207210) fix: avoid reloading unchanged plugins after Gateway boot (#207949) fix: keep Task progress double-clicks from changing the window (#207937) fix(doctor): continue repairs past retained conflicting exec approvals (#207951) test(reply): make account isolation assertion decisive (#207793) fix: keep task progress compact when reopening Details (#207943) fix(ui): restore the saved reading position after an empty search (#207673) fix: remove four Memory Wiki settings that had no effect (#207882) test(ios): verify send-at-tap feedback and work grouping (#207913) test(agents): reject unsuccessful live replay completions (#207724) fix(cron): keep a started cron turn running when its job is edited (#207947) improve(ui): put waiting for a free agent under automation timing (#201282) chore(ui): refresh control ui locales (#207514) fix: distinguish unresolved delivery failures from delivery history (#207897) test(doctor): require security check in proxy ordering assertion (#207912) fix: keep update rollback tests in sync with shipped workers (#207822) test(agents): fix provider header filtering coverage (#207732) refactor: remove the bundled GBrain adapter (#207924) ...
* commit 'a012e91c821705e443e42660c34e352623fb0a70': (584 commits) fix: confirm recovered config edits while the Gateway is busy (#207918) fix: make desktop chat presence avatars slightly smaller (#207966) fix: list and select routed Claude models without requiring Claude CLI (#207806) fix(ci): check out verifier before plugin preflight reuse test(reply): prove channel replacement on user messages (#207813) fix(release): bootstrap smoke uses persistent agent creation fix(ui): stop model picker Enter checks from failing on cold opens (#207963) fix: explain when a provider policy stops a chat reply (#207411) fix: show context usage during Claude CLI turns (#207036) fix: align the side panel with its resize divider (#207936) fix: stop the manual handoff UI test from hanging after completion (#207945) fix: surface favorites and recommended models in picker search (#201450) fix: show the saved quota reset when chat skips its only model (#207210) fix: avoid reloading unchanged plugins after Gateway boot (#207949) fix: keep Task progress double-clicks from changing the window (#207937) fix(doctor): continue repairs past retained conflicting exec approvals (#207951) test(reply): make account isolation assertion decisive (#207793) fix: keep task progress compact when reopening Details (#207943) fix(ui): restore the saved reading position after an empty search (#207673) fix: remove four Memory Wiki settings that had no effect (#207882) ...
…enclaw#207673) Keep the saved message position fixed when the empty search viewport resets its scroll offset. Ordinary history anchors continue to follow the reader. Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 05b75afd-1e3d-8174-8592-21c715e277cf




Related: #207631
What Problem This Solves
Closing an empty chat search can leave the transcript at the wrong position instead of returning to the message the reader was viewing. The scheduled Chromium test reproduced the regression after #207631.
User Impact
Closing or clearing an empty search returns the reader to their saved position. The change preserves the earlier fix for reading upward through loaded history and does not change explicit scroll cancellation.
Why This Change Was Made
The empty viewport clamps its scroll offset before the full transcript is restored. That delta belongs to the results viewport, not to the saved transcript position. Keep the search-return target fixed while letting ordinary history anchors keep moving with the reader.
Evidence
ci:fullbefore marking this draft ready.Co-authored with @vincentkoc.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by