Skip to content

fix: keep task progress collapsed while reading earlier messages - #148291

Merged
steipete merged 2 commits into
mainfrom
codex/ui-session-copy-startup-20260914
Sep 14, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/ui-session-copy-startup-20260914

Conversation

@steipete

@steipete steipete commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Continues #148014 on its preserved branch after GitHub refused to reopen the original PR. Original author: @steipete.

What Problem This Solves

Fixes task progress reopening while a reader stays on earlier chat messages and background row measurements adjust the transcript.

User Impact

Task progress stays collapsed while you read earlier messages, even as streaming output and layout measurements continue. Scrolling back to the end or selecting Latest resumes following; explicit card choices remain respected.

Why This Change Was Made

The existing per-session transcript offset owner records the actual browser-clamped offset written by measurement compensation. Reader input and disconnect retire that marker, so automatic corrections preserve reading mode while real input retains its normal behavior.

The interactive browser fixture uses native Home-key input when interrupting an active Latest return. Directly assigning scrollTop changes geometry without delivering reader takeover. The shared geometry helper, original card assertions, and click deadlines remain unchanged.

Evidence

A deterministic regression through the actual TanStack ResizeObserver and transcript/page-policy boundary fails on the original owner and passes with the repair. Both reader commits retain their reviewed patches exactly after rebasing onto main 5d461f09667b1d7474f7b963d2d1267c836a83f5; all four owned code/test files are byte-identical to the prior qualified version.

The original scripted browser setup produced a 10-second Latest-click timeout. Paired controls showed that native Home input cancels the retained Latest target. The permanent scenario fails with the old helper and passes with the correction. Fresh current-base qualification passes 147 owner/unit tests, nine ordinary reader browser scenarios plus the upstream cloud-reconciliation scenario, the production build and budget check (354,195 bytes startup JavaScript gzip), and the complete changed-file gate. Independent P2 reviews remain valid through exact patch identity.

CI run 34870373589 passed every executable job except the cloud-reconciliation fixture. A controlled completed-history-first refresh reproduced its missing assistant reply: the fixture omitted that reply from history and delivered an event without current run ownership. The independent repair already on main in #147684 supplies the persisted reply in history and reuses it in the live event. This PR keeps that upstream repair without a duplicate fixture change. The exact historical CI ordering was not captured, and no production admission or reducer bug is claimed. New exact-head CI qualifies this reader-only refresh.

Earlier failures remain attributable: the shared Docker assertion, cloud timestamp fixture, and wizard routing were repaired separately in #148129, #147926, and #148337. Run 34854229458 also failed a real-desktop viewer proof and checkout before tests. The newer run passed that desktop lane, but this does not establish the earlier cause; diagnostic-only #148354 remains separately owned. No local desktop fault replay or relaxed assertions/deadlines were used.

The prior CI run 34880403170 stopped in preflight because main's shared worker inventory listed the same wizard test twice; the regular test gates did not run. This base includes the routing repair from #148504 (867e655d51d892c47ee68fc7f02c7e8ca0a5628d), verified to retain exactly one wizard recovery route, and the separate UI fixture correction from #148444. Fresh qualification also covers main's Markdown-it and Vitest patch updates. No failed-job retry or weakened gate was used; new exact-head CI will qualify the refreshed source.

The exact intermittent CI animation interleaving did not reproduce locally. The inspected screenshots below illustrate the normal synthetic before/after flow. All three PR attachments were verified as accessible PNGs, and the same captures were inspected and rendered in the originating task.

The earlier UI shard 2/3 failure remains documented: “keeps malformed closing-tag validation bounded” measured 107.0 ms against its 100 ms guard. This PR does not claim to fix that timing failure; its stress case and threshold are untouched.

Before: normal synthetic reader flow

After: reader stays collapsed during streaming

After selecting Latest: progress expands again

@clawsweeper

clawsweeper Bot commented Sep 14, 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. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 14, 2026
@steipete
steipete marked this pull request as ready for review September 14, 2026 14:13
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 5:26 PM ET / 21:26 UTC (Revision 5).

ClawSweeper review

What this changes

The PR distinguishes automatic transcript measurement adjustments from reader scrolling so task progress stays collapsed, and updates regression coverage and chat documentation.

Merge readiness

✅ Ready for maintainer review

Keep open: this remains a useful, focused repair absent from current main. No blocking correctness or security findings were identified, and the existing proof supports the visible reader flow.

Priority: P2
Reviewed head: bb0ec7742421e214eaea907cee83cfe9bfba27bc

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with useful visual evidence, meaningful regression coverage, and no identified blocking defect.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected production Control UI captures with synthetic Gateway data show compact progress while reading and expansion after Latest, supported by reported browser runs and the targeted measurement regression. The screenshots illustrate the normal flow and do not claim to capture the exact intermittent animation race.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected production Control UI captures with synthetic Gateway data show compact progress while reading and expansion after Latest, supported by reported browser runs and the targeted measurement regression. The screenshots illustrate the normal flow and do not claim to capture the exact intermittent animation race.
Evidence reviewed 9 items Focused production repair: The virtualizer records the browser-clamped measurement offset and identifies its subsequent scroll as programmatic; native reader input and disconnect clear that marker. The existing page policy remains the decision owner. The direct elementScroll import establishes the relevant TanStack dependency contract.
Current-main defect remains: Current main lacks the measurement-offset marker. Its page scroll policy permits a positive offset delta at the physical end to clear reading history, which explains why measurement compensation needs to retain its origin.
Published dependency contract inspected: Registry metadata identifies TanStack/virtual as the repository for @tanstack/virtual-core 3.17.8, the version pinned by the UI. Its published source uses elementScroll to synchronously call scrollTo with offset plus adjustments; measurement compensation supplies adjustments, while explicit scroll commands pass undefined. The tarball source was read in memory without executing package code. No dependency commit SHA was supplied by registry metadata.
Findings None None.
Security None None.

How this fits together

The Control UI transcript combines incoming messages with browser row measurements and reader input. Its scroll policy controls whether the conversation follows new output and whether task progress expands above the composer.

flowchart TD
  A[Incoming messages] --> B[Transcript row measurements]
  B --> C[Automatic scroll adjustment]
  C --> D[Scroll origin tracking]
  E[Reader input or Latest] --> D
  D --> F[Reading and follow policy]
  F --> G[Task progress disclosure]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +13, Tests +82, Docs +5. Total +100 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 2 14 1 +13
Tests 2 85 3 +82
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 104 4 +100

Review metrics

None.

Root-cause cluster

Relationship: canonical
Canonical: #148291
Summary: This PR continues the closed-unmerged reader repair and addresses a remaining measurement case beyond the earlier merged follow-policy fix.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Preserve measurement-scroll origin within the existing transcript owner while keeping native reader input, Latest, and explicit card choices authoritative.

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

Yes, source establishes a focused path: read slightly above the end, grow a measured row, and let browser clamping produce a positive end-position scroll. The contributor reports a failing-before/passing-after regression; this review did not execute it.

Is this the best way to solve the issue?

Yes, the patch repairs scroll-origin classification at its existing owner without duplicating disclosure policy, adding settings, or changing persisted state.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3d21b1dce1d6.

Labels

Label justifications:

  • P2: This repairs a bounded chat-reading disruption without blocking message delivery or core runtime availability.
  • 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. Sufficient (screenshot): Inspected production Control UI captures with synthetic Gateway data show compact progress while reading and expansion after Latest, supported by reported browser runs and the targeted measurement regression. The screenshots illustrate the normal flow and do not claim to capture the exact intermittent animation race.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected production Control UI captures with synthetic Gateway data show compact progress while reading and expansion after Latest, supported by reported browser runs and the targeted measurement regression. The screenshots illustrate the normal flow and do not claim to capture the exact intermittent animation race.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected production Control UI captures with synthetic Gateway data show compact progress while reading and expansion after Latest, supported by reported browser runs and the targeted measurement regression. The screenshots illustrate the normal flow and do not claim to capture the exact intermittent animation race.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RoboClaw: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (4 earlier review cycles)
  • reviewed 2026-09-14T15:58:31.279Z sha 751b9ae :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T17:11:07.173Z sha 9b3e9e6e0d9a8e130c3615c49be0a6c16d0416d5 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T18:15:09.167Z sha 6533f275d6fafcf33814a445b23799ffa270e273 :: blocked before merge. :: none
  • reviewed 2026-09-14T18:40:17.292Z sha ad01226 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/ui-session-copy-startup-20260914 branch 2 times, most recently from 6533f27 to ad01226 Compare September 14, 2026 18:22
Preserve the provenance of virtualizer row-measurement adjustments when their native scroll event lands at the transcript end. Layout compensation must not unlock a history reader or reopen automatic task progress. Explicit reader input and manual Latest commands keep their existing behavior.

Validated the regression against the original implementation, 238 focused unit tests, 9 production-bundled Chromium E2Es, full changed checks, and independent P0-P2 review. The original CI animation timing did not reproduce locally; the controller and ResizeObserver regression independently proves the ownership defect.
Use actual Home input in the interactive manual-disclosure sequence so reader takeover cancels queued and active Latest commands. Exercise a return interrupted by keyboard collapse, while preserving all original card assertions and the 10-second click deadline. Keep the shared geometry-only helper and runtime unchanged.

Paired bundled controls reproduce the scripted setup defect and verify native-input reader preservation. The permanent scenario fails with the old helper; all 9 ordinary bundled browser cases pass with the correction. Targeted formatting, lint, and independent P0-P2 review passed.
@steipete
steipete force-pushed the codex/ui-session-copy-startup-20260914 branch from ad01226 to bb0ec77 Compare September 14, 2026 21:14
@steipete
steipete merged commit 5287036 into main Sep 14, 2026
133 checks passed
@steipete
steipete deleted the codex/ui-session-copy-startup-20260914 branch September 14, 2026 22:38
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
…nclaw#148291)

* fix(ui): keep task progress collapsed during layout corrections

Preserve the provenance of virtualizer row-measurement adjustments when their native scroll event lands at the transcript end. Layout compensation must not unlock a history reader or reopen automatic task progress. Explicit reader input and manual Latest commands keep their existing behavior.

Validated the regression against the original implementation, 238 focused unit tests, 9 production-bundled Chromium E2Es, full changed checks, and independent P0-P2 review. The original CI animation timing did not reproduce locally; the controller and ResizeObserver regression independently proves the ownership defect.

* test(ui): exercise reader input when interrupting Latest

Use actual Home input in the interactive manual-disclosure sequence so reader takeover cancels queued and active Latest commands. Exercise a return interrupted by keyboard collapse, while preserving all original card assertions and the 10-second click deadline. Keep the shared geometry-only helper and runtime unchanged.

Paired bundled controls reproduce the scripted setup defect and verify native-input reader preservation. The permanent scenario fails with the old helper; all 9 ordinary bundled browser cases pass with the correction. Targeted formatting, lint, and independent P0-P2 review passed.
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 docs Improvements or additions to documentation maintainer Maintainer-authored PR 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: 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