Skip to content

fix(control-ui): stop hiding settled chat rows on reload - #170662

Merged
steipete merged 2 commits into
mainfrom
steipete/coldload-blank-center-bisect
Oct 13, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/coldload-blank-center-bisect

Conversation

@steipete

@steipete steipete commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes a blank transcript center when a signed-in operator reloads a chat or dashboard deep link. The cold-load investigation measured 14 intermediate states; its synthetic revision comparison showed transcript content around +436 ms in d3601e62147b, versus +1,042 ms in 2bd6ca195418 despite earlier cached sidebar restoration.

User Impact

Measured transcript rows can paint with the cached sidebar instead of remaining hidden through another browser frame. Saved reading positions, tail anchoring, reply metadata, and progress remain intact. There are no config, schema, or cache-format changes.

Why This Change Was Made

The Solid transcript port (4e3818bab0fe, #168887) scheduled positioning after another animation frame. The subsequent visibility gate (68d586924cd3, #169334) correctly hid unpositioned rows, but made that scheduling delay visible as a blank center. Three-run historical probes narrowed the regression to this gate; the fixed timing threshold became unreliable as shared-host load changed, so the adjacent source comparison and regression test supply the causal evidence.

The transcript owner now finishes positioning after nested row commits and reveals only when the selected virtual rows are connected and their committed intrinsic sizes match the measured sizes. Simply removing the frame wait caused a 402 px cached-tail jump and was rejected. The geometry condition preserves that protection and removes the unused generic afterLayout phase.

Evidence

Five interleaved runs per revision on final pushed head d6f83eabba6a used the synthetic Team-scale dashboard fixture and immutable production bundles. First visible transcript means the first native trace screenshot after first paint containing the fixture's user-bubble color and text in the center; this excludes the previous document and sidebar-only paints. All timings are noisy shared-host observations.

Metric Older build d3601e62147b Unchanged base 8f84b2166dd4 Final head d6f83eabba6a
Navigation → first visible transcript, median [range], ms 704 [530–1,496] 829 [781–993] 678 [551–887]
FCP → first visible transcript, median, ms 2.0 185.2 0.8
Forced layouts, median 65 30 34
CLS, median 0.02396 0.00124 0.00124

The final same-base median improves 150 ms (18%). The deterministic regression reveals committed rows without flushing an animation frame. Four of five fixed runs show transcript content in the initial contentful frame, versus zero of five for the unchanged base and four of five for the older build. The final cohort meets the older-build median target (678 vs 704 ms), but earlier batches changed old/fixed ordering as host load shifted. This supports removal of the blank-center regression; it is not a reliable quiet-host latency guarantee or completion of the broader cold-load campaign. One fixed run still has a 319 ms contentful-paint-to-transcript gap; the lead should recheck that remaining startup path on a quieter host.

Earlier five-triplet comparisons on a07acefb6abb improved same-base first transcript 1,129→797 ms and first-contentful-frame transcript 0/5→4/5. The older build measured 689 ms then. A second five-pair old/fixed comparison gave 1,178→955 ms. Both batches are retained in the lane evidence; shifting host load makes cross-batch timing comparisons unsuitable.

Validation:

  • pnpm test ui/src/pages/chat/components/chat-transcript-controller.test.ts --maxWorkers=1: 34/34 passed; Vitest 52.20 s, harness 63.35 s. The added regression fails on original production code (visibility: hidden).
  • pnpm test ui/src/pages/chat/solid-render-lifecycle.test.tsx --maxWorkers=1: 6/6 passed; Vitest 7.26 s, harness 13.97 s.
  • Final pushed head: node scripts/run-vitest.mjs ui/src/e2e/chat-cold-load-anchor.e2e.test.ts --maxWorkers=1: 3/3 passed; Vitest 25.47 s, harness 29.80 s, including the UI build.
  • node scripts/run-vitest.mjs ui/src/e2e/chat-history-stale-geometry.e2e.test.ts --maxWorkers=1: 1/1 passed; Vitest 21.30 s, harness 25.62 s.
  • node scripts/run-vitest.mjs ui/src/e2e/session-transcript-search.e2e.test.ts --maxWorkers=1: 4/4 passed; Vitest 22.43 s, harness 30.31 s.
  • node scripts/run-vitest.mjs ui/src/e2e/team-scale-cold-load.e2e.test.ts --maxWorkers=1: 1/1 passed; Vitest 33.92 s, harness 47.38 s.
  • Production UI builds and git diff --check passed. Fresh independent review: scoped-clean, no actionable P0–P2 findings.
  • No Testbox lease: remote capacity is blocked. The campaign waiver substitutes single-file local e2e and exact-head GitHub CI for the full UI suite. Full typecheck and full UI e2e have not run locally. Initial CI run 38350229823 found four failures in reply-reveal tests across two unit shards. They reproduced locally; their frame-only helpers now await nested commit microtasks, with all flash-lifetime and interruption assertions retained. chat-transcript-message-reveal.test.ts is 7/7 (11.17 s Vitest, 15.86 s harness), and chat-transcript-replies.test.ts is 27/27 (11.26 s, 15.22 s). The adjustment had a fresh clean review. Final head d6f83eabba6a: CI run 38351856292 and openclaw/ci-gate are green. All three UI unit shards pass (328/346/305 s wall time, including unrelated files); selected UI e2e passes (116 s). Performance, types, lint, and docs checks also pass. No workflow rerun was used; the second run follows the committed test-helper repair.

Runtime production LOC delta: −6 (+38/−44). The requested stat filter also includes .test.tsx and the UI README: +64/−134, net −70. Tests and docs account for that difference. Release-note context: chat reloads reveal positioned, measured transcript rows sooner while retaining scroll-anchor stability.

The attached before/after filmstrips use only synthetic fixture data. The before filmstrip shows the transcript still hidden at the initial contentful paint; the after filmstrip shows transcript content at that paint. No private captures were uploaded.

Review note: initial completion calls presentation.measureRows() before the intrinsic-size check. That owner reads current computed row heights, with data-measuring-rows disabling content visibility, and retries when any measured size changes. The inline-size check then verifies those measured sizes reached the committed DOM. Later image/font/widget resizing keeps the existing native observer and reader-follow ownership. Restoring an unconditional frame phase is therefore declined; the cached-tail and stale-width browser proofs cover the initial geometry boundary.

Before: measured base leaves transcript hidden after contentful paint

After: final head paints measured transcript at contentful paint

@clawsweeper

clawsweeper Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T05:35:39.333239Z d6f83ea New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M labels Oct 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a415cf38b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +206 to +208
this.lifecycle.afterCommit(() => {
// Nested row islands finish their commits before initial geometry is read.
queueMicrotask(() => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve the transcript's layout-settlement phase

Using queueMicrotask here runs initial-position reconciliation before the browser’s layout/ResizeObserver phase. When a row’s geometry settles during that phase—for example after content-visibility, font, image, or custom-element layout—the intrinsic-size comparison can validate the previously written virtual size, clear visibility, and then let the observer correction move the visible transcript. Keep the separate layout-settlement phase, or gate visibility on post-layout geometry rather than commit-time inline styles; the scoped Solid lifecycle guidance explicitly requires that phase.

AGENTS.md reference: ui/AGENTS.md:L5-L7

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the steipete/coldload-blank-center-bisect branch from 3a415cf to d6f83ea Compare October 13, 2026 05:31
@steipete
steipete merged commit 010435d into main Oct 13, 2026
103 checks passed
@steipete
steipete deleted the steipete/coldload-blank-center-bisect branch October 13, 2026 06:06
steipete added a commit that referenced this pull request Oct 13, 2026
## What Problem This Solves

Offscreen reply navigation and position-rail jumps can freeze the Control UI renderer. When the target bubble is not mounted, `completeMessageReveal()` scrolls toward its virtual row and unconditionally requests another render. Commit `010435d1635247f39a6a14a05dbe5a8b342da101` (#170662) moved layout completion from a browser frame to a microtask, allowing this loop to starve the native scroll notification needed to advance the virtual range.

Remove that redundant render request. The initial reveal still requests an update for folded-work expansion; native scroll notifications, mounted rows, and deferred projection settlement own subsequent progress. Target highlighting, cancellation, and reader-scroll behavior are unchanged. The fast initial-display path remains intact.

Accepted edge case: an absent target waits for an actual scroll, row mount, or projection event instead of polling unchanged DOM. No security or data-authority check is removed.

## Evidence

- Scheduled baseline: [run 38359584345](https://github.com/openclaw/openclaw/actions/runs/38359584345), source `0348a2526c561d8ccce61bfd23931024a6b8f13e`. UI2/job 115170476315 fails the deep standalone-work reply reveal; UI8/job 115170476361 fails both dark/light position-rail navigation cases and reply-source navigation after reconnect. Diagnostics show a connected, uncrashed browser whose renderer does not respond.
- Candidate `5ed8e6c21f2dba67cb0f33d2562b08e099e5e059`: all four original cases pass in [focused hosted run 38364929226/job 115187670047](https://github.com/openclaw/openclaw/actions/runs/38364929226/job/115187670047): dark/light position rail 22.973/22.448 seconds, deep earlier reveal 2.985 seconds, reconnect source navigation 3.574 seconds. Three files, four passed, seven unrelated cases filtered; total Vitest time 83.06 seconds. Source verification confirms the owner and all three test files are unchanged. No assertions, timeouts, retries, or screenshot behavior are weakened.
- Changed-file oxfmt, oxlint, and `git diff --check`: passed. No local suite, build, or dependency installation was run.
- Codex autoreview: scoped-clean; no actionable P0–P2 findings. Normal commit hooks passed.

Focused candidate command (ordinary PR CI omitted these four original cases):

```sh
OPENCLAW_UI_E2E_SKIP_REAL_GATEWAY=1 node scripts/run-vitest.mjs run \
  --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner --maxWorkers=1 \
  ui/src/e2e/chat-collapsed-reply-reveal.e2e.test.ts \
  ui/src/e2e/chat-position-rail.e2e.test.ts \
  ui/src/e2e/chat-reply-preview-recovery.e2e.test.ts \
  -t 'reveals the deep earlier message in standalone work|tracks reader position and keyboard jumps|refreshes the page-carried original after reconnect and keeps source navigation working' \
  --reporter=verbose
```

Scope: one file, +2/-1 lines. No SQL or database-worker/T1 call paths change; no SQL harness measurement applies.

Ordinary candidate CI [38363444022](https://github.com/openclaw/openclaw/actions/runs/38363444022) passed all 28 selected jobs; 26 were skipped. Required, security, types, lint, architecture and static gates passed. Ratchets remain T1 454 to 454, compatibility calls 9 to 9, all dialect groups 0 to 0. The initial PR-context check required these body headings and was corrected; replacement run 38363572076 passed.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…0662)

* perf(control-ui): reveal settled transcript rows without an extra frame

* test(control-ui): await committed reply reveal geometry
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…w#170789)

## What Problem This Solves

Offscreen reply navigation and position-rail jumps can freeze the Control UI renderer. When the target bubble is not mounted, `completeMessageReveal()` scrolls toward its virtual row and unconditionally requests another render. Commit `f17d27e18ccba603bab078885201bd7cf3162fb3` (openclaw#170662) moved layout completion from a browser frame to a microtask, allowing this loop to starve the native scroll notification needed to advance the virtual range.

Remove that redundant render request. The initial reveal still requests an update for folded-work expansion; native scroll notifications, mounted rows, and deferred projection settlement own subsequent progress. Target highlighting, cancellation, and reader-scroll behavior are unchanged. The fast initial-display path remains intact.

Accepted edge case: an absent target waits for an actual scroll, row mount, or projection event instead of polling unchanged DOM. No security or data-authority check is removed.

## Evidence

- Scheduled baseline: [run 38359584345](https://github.com/openclaw/openclaw/actions/runs/38359584345), source `116f0502239e7f1cd4a85f57331f986f616e8939`. UI2/job 115170476315 fails the deep standalone-work reply reveal; UI8/job 115170476361 fails both dark/light position-rail navigation cases and reply-source navigation after reconnect. Diagnostics show a connected, uncrashed browser whose renderer does not respond.
- Candidate `5ed8e6c21f2dba67cb0f33d2562b08e099e5e059`: all four original cases pass in [focused hosted run 38364929226/job 115187670047](https://github.com/openclaw/openclaw/actions/runs/38364929226/job/115187670047): dark/light position rail 22.973/22.448 seconds, deep earlier reveal 2.985 seconds, reconnect source navigation 3.574 seconds. Three files, four passed, seven unrelated cases filtered; total Vitest time 83.06 seconds. Source verification confirms the owner and all three test files are unchanged. No assertions, timeouts, retries, or screenshot behavior are weakened.
- Changed-file oxfmt, oxlint, and `git diff --check`: passed. No local suite, build, or dependency installation was run.
- Codex autoreview: scoped-clean; no actionable P0–P2 findings. Normal commit hooks passed.

Focused candidate command (ordinary PR CI omitted these four original cases):

```sh
OPENCLAW_UI_E2E_SKIP_REAL_GATEWAY=1 node scripts/run-vitest.mjs run \
  --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner --maxWorkers=1 \
  ui/src/e2e/chat-collapsed-reply-reveal.e2e.test.ts \
  ui/src/e2e/chat-position-rail.e2e.test.ts \
  ui/src/e2e/chat-reply-preview-recovery.e2e.test.ts \
  -t 'reveals the deep earlier message in standalone work|tracks reader position and keyboard jumps|refreshes the page-carried original after reconnect and keeps source navigation working' \
  --reporter=verbose
```

Scope: one file, +2/-1 lines. No SQL or database-worker/T1 call paths change; no SQL harness measurement applies.

Ordinary candidate CI [38363444022](https://github.com/openclaw/openclaw/actions/runs/38363444022) passed all 28 selected jobs; 26 were skipped. Required, security, types, lint, architecture and static gates passed. Ratchets remain T1 454 to 454, compatibility calls 9 to 9, all dialect groups 0 to 0. The initial PR-context check required these body headings and was corrected; replacement run 38363572076 passed.
steipete added a commit that referenced this pull request Oct 14, 2026
PR browser selection follows declared owner modules and their direct runtime
imports. The transcript-navigation tests only declared the chat route, so
#170662 changed the virtualizer, Solid layout, and render lifecycle without
selecting them, and the renderer freeze first failed on main.

Declare the transcript controller, Solid layout, and virtualizer host as owners
of chat-position-rail, chat-collapsed-reply-reveal, and
chat-reply-preview-recovery. Their direct imports reach message reveal and the
Solid render lifecycle. Real-checkout selector cases replay the #170662 diff.
steipete added a commit that referenced this pull request Oct 14, 2026
#171826)

PR browser selection follows declared owner modules and their direct runtime
imports. The transcript-navigation tests only declared the chat route, so
#170662 changed the virtualizer, Solid layout, and render lifecycle without
selecting them, and the renderer freeze first failed on main.

Declare the transcript controller, Solid layout, and virtualizer host as owners
of chat-position-rail, chat-collapsed-reply-reveal, and
chat-reply-preview-recovery. Their direct imports reach message reveal and the
Solid render lifecycle. Real-checkout selector cases replay the #170662 diff.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 15, 2026
openclaw#171826)

PR browser selection follows declared owner modules and their direct runtime
imports. The transcript-navigation tests only declared the chat route, so
openclaw#170662 changed the virtualizer, Solid layout, and render lifecycle without
selecting them, and the renderer freeze first failed on main.

Declare the transcript controller, Solid layout, and virtualizer host as owners
of chat-position-rail, chat-collapsed-reply-reveal, and
chat-reply-preview-recovery. Their direct imports reach message reveal and the
Solid render lifecycle. Real-checkout selector cases replay the openclaw#170662 diff.
steipete added a commit that referenced this pull request Nov 2, 2026
…#190589)

A warm reload of a dashboard deep link no longer keeps the measured, end-anchored conversation invisible after its rows settle. The transcript reveal owner (measured range plus reading-edge placement, #170662) was ready on time, but the desktop side region declared `@starting-style { opacity: 0 }` (added with the resizable panel frame in #176356). Every newly mounted side surface, including the dashboard's saved conversation pane, therefore replayed a 280 ms entrance fade over content that was already placed.

Delete that four-line `@starting-style` block. Initially mounted desktop side surfaces show their placed content immediately; geometry, opacity and display transitions remain for open/close changes, and the transcript reveal guard is unchanged. A side surface that goes from hidden to shown now appears without the 280 ms fade. No persisted facts, protocol, schema or config change.

The warm-reload proof rig gains a native tall-row dashboard fixture with bundled Workboard plus synthetic theme/board plugin modules on both plugin asset routes, and per-frame visibility probes (scripts/perf only).

Proof (final head, 11 interleaved AWS pairs per route plus A/A, real Gateway, three-viewer preparation check intact): dashboard visible transcript 701.6 -> 508.1 ms median, paired -200.1 ms, 11/11 better with separated IQRs; post-row hold 175.7 -> 0 ms; reading position and row height final in 11/11 on both routes, 0 px movement, 0% snapshot growth; chat mixed (paired -34 ms, not claimed) and no secondary regressions. Runtime -4 LOC. Exact-head CI green; full UI 891 pass / 2 fail, both reproduce on the exact main base.

Release-note context: Control UI dashboard warm reloads show the saved conversation pane immediately instead of fading it in.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 2, 2026
…openclaw#190589)

A warm reload of a dashboard deep link no longer keeps the measured, end-anchored conversation invisible after its rows settle. The transcript reveal owner (measured range plus reading-edge placement, openclaw#170662) was ready on time, but the desktop side region declared `@starting-style { opacity: 0 }` (added with the resizable panel frame in openclaw#176356). Every newly mounted side surface, including the dashboard's saved conversation pane, therefore replayed a 280 ms entrance fade over content that was already placed.

Delete that four-line `@starting-style` block. Initially mounted desktop side surfaces show their placed content immediately; geometry, opacity and display transitions remain for open/close changes, and the transcript reveal guard is unchanged. A side surface that goes from hidden to shown now appears without the 280 ms fade. No persisted facts, protocol, schema or config change.

The warm-reload proof rig gains a native tall-row dashboard fixture with bundled Workboard plus synthetic theme/board plugin modules on both plugin asset routes, and per-frame visibility probes (scripts/perf only).

Proof (final head, 11 interleaved AWS pairs per route plus A/A, real Gateway, three-viewer preparation check intact): dashboard visible transcript 701.6 -> 508.1 ms median, paired -200.1 ms, 11/11 better with separated IQRs; post-row hold 175.7 -> 0 ms; reading position and row height final in 11/11 on both routes, 0 px movement, 0% snapshot growth; chat mixed (paired -34 ms, not claimed) and no secondary regressions. Runtime -4 LOC. Exact-head CI green; full UI 891 pass / 2 fail, both reproduce on the exact main base.

Release-note context: Control UI dashboard warm reloads show the saved conversation pane immediately instead of fading it in.
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 size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant