Skip to content

fix(ui): restore the saved reading position after an empty search - #207673

Merged
daniel-lxs merged 3 commits into
mainfrom
openclaw/nimble-shell-69ceea
Nov 29, 2026
Merged

daniel-lxs merged 3 commits into
mainfrom
openclaw/nimble-shell-69ceea

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • The unchanged browser case passed with only fix(ui): keep your place when scrolling older chat history #207631 reversed and failed again when it was restored. In the failing trace a −5,967 px delta moved the saved target from roughly 56 px to 6,023 px.
  • A new focused regression failed before this patch and passed after. All 127 focused tests passed, plus the three unchanged search-return cases and the upward-history cases at 390 px and 1280 px on the built UI with a mocked Gateway. UI typecheck, lint, formatting, and diff checks passed.
  • Clean and annotated screenshots show the same close-with-no-matches scenario before and after, using a Chromium build of the Control UI with synthetic history.
  • Independent review found no P0–P2 findings. A touch drag overlapping a pending search return was not separately covered. Full hosted CI is pending; apply ci:full before marking this draft ready.

Co-authored with @vincentkoc.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 28, 2026 18:52
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 05b75afd-1e3d-8174-8592-21c715e277cf
@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 28, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Browser proof: closing an empty search

The 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: 8ac87d6697d1. After: 40ec9cdf6157 (published tree matches tested source).

Clean comparison

Before

Before: chat jumps to Folio 1

After

After: chat returns to Folio 51

Annotated comparison

Before

Before: Folio 1 is visible instead of the saved Folio 51

After

After: Folio 51 is visible at its saved position

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This 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.

  • Before: The transcript jumps to Folio 1.
  • After: Folio 51 returns at the saved position, with the unsent draft retained.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with a distinct owner regression and relevant browser evidence; broad validation of the current head remains pending.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected screenshots exercise the built Control UI in Chromium with synthetic Gateway history and show the repaired Folio 51 result with the draft retained; a real Gateway and touch overlap were not independently exercised.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Closing or clearing a search with no matches loses the reader’s saved place in the chat.
Reason: The maintainer-authored repair restores an established behavior with a focused change to its existing owner.

Regression provenance

Possible 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: 8a1fd89828804a1c1d758fbbf799d7ec47f36127

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Empty-search return target keeps the original intent (95df0c9: Restore the last-read message or end-follow position after an empty search.)
  • Native reader movement keeps the original intent (9b59c56: Preserve upward reader movement when synchronous or idle observation precedes the native scroll event.)
  • Measured anchor restoration keeps the original intent (4c6f043: Reconcile reader restoration through measured geometry without competing warm-reload corrections.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 95df0c9 adds ui/src/pages/chat/components/chat-transcript-prepend-anchor.ts:89 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 95df0c9f398a; files: ui/src/pages/chat/components/chat-transcript-prepend-anchor.ts)
  • Peter Steinberger: Raw commit e44a7e3 adds ui/src/pages/chat/components/chat-transcript-prepend-anchor.ts:66 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e44a7e36817e; files: ui/src/pages/chat/components/chat-transcript-prepend-anchor.ts)
  • Josh Lehman: Raw commit d70f835 adds ui/src/pages/chat/components/chat-transcript-prepend-anchor.ts:22 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: d70f83517220; files: ui/src/pages/chat/components/chat-transcript-prepend-anchor.ts)
  • RoboClaw: Raw commit 0d67d5e adds ui/src/pages/chat/components/chat-transcript-prepend-anchor.ts:53 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 0d67d5e156b1; files: ui/src/pages/chat/components/chat-transcript-prepend-anchor.ts)

PR surface

Source +6, Tests +22. Total +28 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 9 3 +6
Tests 1 22 0 +22
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 31 3 +28

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-28T19:22:14.963Z sha 40ec9cd :: passed. :: none

Reviewed November 28, 2026, 10:48 PM ET / November 29, 2026, 03:48 UTC (Revision 2).

@daniel-lxs daniel-lxs added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Nov 29, 2026
@daniel-lxs
daniel-lxs marked this pull request as ready for review November 29, 2026 03:12
Pick up the Doctor registry and legacy-comment browser test fixes.
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@daniel-lxs
daniel-lxs merged commit f10c999 into main Nov 29, 2026
90 checks passed
@daniel-lxs
daniel-lxs deleted the openclaw/nimble-shell-69ceea branch November 29, 2026 04:25
vincentkoc added a commit that referenced this pull request Nov 29, 2026
* 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)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
* 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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
…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
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 ci:full Keep ordinary native-locale CI selection on the next PR run. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

2 participants