Skip to content

experiment(control-ui): chat sidebar first-frame admission [do not merge] - #189792

Closed
steipete wants to merge 3 commits into
mainfrom
steipete/coldload-chat-route-sidebar-first-paint
Closed

steipete wants to merge 3 commits into
mainfrom
steipete/coldload-chat-route-sidebar-first-paint

Conversation

@steipete

@steipete steipete commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Outcome

Experiment only; do not merge. The candidate failed the pre-declared performance gate and will not be promoted to ready. No candidate runtime change was committed or pushed to this branch.

Problem and attribution

A signed-in warm reload can mount the transcript before cached sidebar admission and section-window geometry have published row content. The saved scope and agent were accepted in the instrumented reproduction; section hosts existed while their admitted row set was empty. The candidate joined the existing cache-admission promise for exact warm links and flushed the existing shared read-before-write geometry batch in a microtask for cached rows. Live updates retained animation-frame batching. No config, store, schema, or protocol change was needed.

Evidence

Fixed AWS c7a.4xlarge, pinned headless Chromium, real isolated Gateway, synthetic 3,000-session Team-shape fixture with nondefault agent, involving-me/category/created settings, 97 groups, 102 section-order entries, five collapsed sections, previews disabled, two pins and eight expanded retained parents. The sidebar reload projection changes in #189791 are common to both arms. Eleven interleaved pairs were captured per route, with a separate eleven-pair A/A control per route.

The native first-transcript-frame assertion fails in all three baseline cases and passes in all three candidate cases. Layout-measurement contracts pass 10/10; warm-route contracts pass 8/8. Independent review is clean through P2. Candidate runtime delta is +10 lines across four existing owners, with +19 net test lines.

Chat metric Baseline median Candidate median Median paired delta Paired result
LoAF blocking 194.1 ms 268.4 ms +67.7 ms Candidate worse 11/11
Final transcript rows, DOM 605.6 ms 711.1 ms +105.1 ms Candidate worse 10/11
Hello handled 461.9 ms 305.8 ms -163.2 ms Candidate better 10/11
First populated sidebar DOM 764.2 ms 575.9 ms -181.1 ms Candidate better 11/11
First observed populated sidebar surface 891.4 ms 929.4 ms +45.4 ms Mixed signs, overlapping IQRs

Chat LoAF IQRs are separated: 179.1–206.9 ms versus 256.2–281.3 ms. The A/A LoAF control has a -4.9 ms paired median with mixed signs and overlapping IQRs (182.9–208.6 ms versus 185.7–213.6 ms). Thus moving geometry earlier fails the blocking-time gate despite faster DOM admission and hello.

The uninstrumented comparison did not reproduce the historical empty first-surface baseline: both arms have populated visible sidebar rows in 11/11 first delivered app surfaces on both routes. All 357 original warm sidebar/header crops were exact-pixel classified against 36 inspected native-resolution states, and full first-app montages were inspected. Artwork still fills later in both arms. Compositor surfaces do not certify every display vsync; DOM readiness and FCP cutoffs were not substituted for visible pixels. No visible first-frame improvement is claimed.

Connect is the first RPC and one document loads in all 44 candidate-comparison warm runs. Full UI e2e, changed-file checks and candidate CI were not run after the measurement failure. This draft served only as the trusted remote-clone entry point; its committed diff contains the common experiment setup, not the rejected candidate. Synthetic captures and the complete per-pair report remain local. No private captures were uploaded.

Keep the scoped cached sidebar until live roster and expanded-child reads
settle, removing the three-second partial-display escape path. Retain the
sidebar owner when native layout reparents its host in the same turn.

Skip ordinary rows in wholly offscreen categories while preserving height
and current selection/focus retention during queued geometry updates.
Extend real-Gateway warm reload proof with grouped, involving-me settings,
personal pins, retained children and archived nondefault-agent deep links.
@clawsweeper

clawsweeper Bot commented Oct 31, 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 scripts Repository scripts size: L labels Oct 31, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR extends warm-reload diagnostics and changes sidebar handoff, host retention, and offscreen row rendering.

Example: An expanded child-session query takes more than three seconds during a warm reload.

  • Before: The sidebar replaces cached rows with the incomplete live roster after three seconds.
  • After: Cached rows remain until the relevant live reads settle.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The experiment has a useful direction, but its acceptance result is unestablished and its shared fixture breaks an existing proof runner.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Performance · Worth it: Yes · Fix scope: Partial
User problem: A signed-in warm reload can initially show an empty chat sidebar before saved session rows appear.
Reason: The maintainer-directed experiment investigates an observed continuity problem using existing owners and a reusable workload; its supporting runtime work is separately tracked.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep this maintainer-directed experiment open and honor its do-not-merge hold; two shared-fixture regressions need correction before landing.

Priority: P2
Reviewed head: 17a7ca5f4223a8ee1a7a1802e9cbb78b1248070b

Before merge

  • Update the network-proof consumer when moving the fixture identity (P2) - The shared fixture now installs its synthetic identity only on reviewer, while main retains only its generated workspace. scripts/perf/flaky-network-proof.ts:294 still reads config.agents.entries.main.identity.name and immediately throws "Fixture lost its synthetic agent identity" when absent. Every network-proof invocation therefore exits before starting its Gateway. Return and consume the selected fixture agent identity, or preserve the consumer's existing fixture contract.
  • Keep network-proof send targets writable (P2) - Unconditionally archiving both shared target sessions also changes the workload used by scripts/perf/flaky-network-proof.ts. After its identity lookup is repaired, its send helper still fills .agent-chat__composer-combobox textarea, but archived-session rendering replaces that input with the archive notice. Its send scenarios consequently time out before exercising network recovery. Keep archival specific to the reload experiment and retain writable targets for the network-proof consumer.

Findings

  • [P2] Update the network-proof consumer when moving the fixture identity — scripts/perf/warm-reload-fixture.ts:269-272
  • [P2] Keep network-proof send targets writable — scripts/perf/warm-reload-fixture.ts:399

Tests

  • Missing end-to-end proof: Supply the declared chat/dashboard first-frame campaign for this head and show both shared fixture consumers completing; current-head red-before/green-after results are not supplied.
Agent review details

How this fits together

The Control UI sidebar combines scoped browser snapshots with Gateway session lists; the performance rig seeds synthetic state and records browser reload behavior.

flowchart LR
  A[Synthetic fixture] --> B[Isolated Gateway]
  B --> C[Session owners]
  D[Browser snapshot] --> E[Sidebar owner]
  C --> E
  E --> F[Windowed sidebar]
  F --> G[Reload diagnostics]
Loading

Technical review

Best possible solution:

Preserve the shared network-proof fixture contract while proving first-frame admission through the existing snapshot and layout owners.

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

The shared-fixture failures follow directly from unchanged identity lookup and composer requirements; the original first-frame sidebar problem was not independently reproduced during this read-only review.

Is this the best way to solve the issue?

The runtime patch uses existing owners with little machinery, but its shared fixture must preserve each consumer's agent and writable-session requirements.

Full review comments:

  • [P2] Update the network-proof consumer when moving the fixture identity — scripts/perf/warm-reload-fixture.ts:269-272
    The shared fixture now installs its synthetic identity only on reviewer, while main retains only its generated workspace. scripts/perf/flaky-network-proof.ts:294 still reads config.agents.entries.main.identity.name and immediately throws "Fixture lost its synthetic agent identity" when absent. Every network-proof invocation therefore exits before starting its Gateway. Return and consume the selected fixture agent identity, or preserve the consumer's existing fixture contract.
    Confidence: 1
  • [P2] Keep network-proof send targets writable — scripts/perf/warm-reload-fixture.ts:399
    Unconditionally archiving both shared target sessions also changes the workload used by scripts/perf/flaky-network-proof.ts. After its identity lookup is repaired, its send helper still fills .agent-chat__composer-combobox textarea, but archived-session rendering replaces that input with the archive notice. Its send scenarios consequently time out before exercising network recovery. Keep archival specific to the reload experiment and retain writable targets for the network-proof consumer.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 828b81ad1f94.

Provenance checked

  • Cached-to-live handoff changes intended behavior with a stated reason (c44496a: Wait for complete root and child rosters, with a three-second escape to available live data.)
  • Sidebar host lifecycle keeps the original intent (e80558a: Preserve the single sidebar and its native navigation lifecycle during the Solid migration.)
  • Sidebar row windowing keeps the original intent (ff2c841: Construct visible rows while retaining active, selected, focused, dragged, and menu rows.)
  • Shared warm-reload fixture changes intended behavior with a stated reason (5df2f45: Provide synthetic real-Gateway reload captures; the later network-proof consumer also relies on its active targets and main-agent identity.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit c44496a adds ui/src/components/sidebar-snapshot.ts:174 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c44496a0cb48; files: ui/src/components/sidebar-snapshot.ts)

PR surface

Source +6, Tests +71, Docs +6, Other +206. Total +289 across 15 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 18 12 +6
Tests 4 140 69 +71
Docs 2 7 1 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 6 242 36 +206
Total 15 407 118 +289

Labels

Label changes:

  • add P2: The introduced defects break diagnostic tooling, with no demonstrated urgent shipped-user regression.
  • add merge-risk: 🚨 automation: The shared fixture changes prevent the existing network-proof runner from starting and invalidate its message-sending scenarios.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The introduced defects break diagnostic tooling, with no demonstrated urgent shipped-user regression.
  • merge-risk: 🚨 automation: The shared fixture changes prevent the existing network-proof runner from starting and invalidate its message-sending scenarios.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

Reviewed October 31, 2026, 6:03 PM ET / 22:03 UTC.

@steipete steipete closed this Oct 31, 2026
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 merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant