Repository navigation
fix(ui): keep chat at end after measured row growth - #166261
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 5:58 PM ET / 21:58 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR schedules chat-end reconciliation after late row measurements adjust the scroll position, preserving the existing reader-intent guards. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, focused repair for a gap still present on current main. No actionable introduced defect was found; the merged release-branch fix addresses a different scroll-follow transition. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI virtualizes chat messages and measures rendered rows as their content changes. Its transcript host combines those measurements with reader intent to keep following viewers at the end while preserving scrollback. flowchart TD
A[Chat content grows] --> B[Virtualizer measures rows]
B --> C[Scroll offset correction]
C --> D[Transcript end reconciliation]
E[Reader intent and active interaction] --> D
D --> F[Follow latest messages]
D --> G[Preserve reading position]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +12, Tests +2. Total +14 across 4 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep late measurement recovery in the existing transcript end-anchor owner, with current reader intent controlling every automatic follow. Do we have a high-confidence way to reproduce the issue? Yes, the source establishes a concrete path: a maintenance correction after the queued reconciliation finishes updates the anchor without scheduling another pass on current main. Runtime reproduction was not performed in this read-only review. Is this the best way to solve the issue? Yes. Routing the correction through the existing host scheduler closes the missing lifecycle step without introducing a competing follow policy or weakening the regression assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f368d655393c. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
9ba771b to
ae433e2
Compare
* ci(release): install Chromium for A-K live tests (#163178) (cherry picked from commit 9ce1498) * ci(release): pin reachable live provider models (#163177) (cherry picked from commit 0fa2ddd) * test(opencode): refresh free live tool model (#163470) Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: vincentkoc <[email protected]> (cherry picked from commit cd7c2d2) * test: synchronize Telegram recorder failure admission Gate the synthetic control timeline on the recorder's durable failure receipt so slow filesystem publication cannot overtake the intended failure precondition. Preserve every assertion and align the touched fixture with the existing lint rules. (cherry picked from commit 0dfb96f) * fix(ui): reconcile end after layout correction (#166261) (cherry picked from commit 51f772a) * fix(ci): forward live video provider credentials (#164317) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit d0ce76b) * fix(security): backport MCP dependency advisory fix (cherry picked from commit c39d9b0) * fix(test): make live qualification waits event driven * fix(test): Gateway e2e connect fails with 1006 when another fixture takes the instance port (#163003) gateway-cold-agent-abort intermittently failed with `gateway closed during connect (1006)` about 260 ms into the test, too early for its own cold Gateway child to have answered readiness. OpenClawTestInstance claims its port block and releases its reservation listener right before spawning the child. In-process Gateway fixtures picked ports with getGatewayE2ePortBlock(), a probe that released its claim before returning, and then started a Gateway whose listener retries EADDRINUSE every 500 ms. A fixture that probed the same candidate just before the instance claimed it won the port at the handoff, and the instance's /readyz was answered by that foreign Gateway (1006 while it closed, token mismatch while alive). getGatewayE2ePortBlock is removed. acquireGatewayE2ePortBlock (beside startClaimedGateway) returns a held claim, and every caller keeps it until the Gateway or server bound to that port has closed, including same-port restarts, unstarted-claim guards, and listener-specific release in the MCP App conformance fixture. Kernel-assigned port-0 binders stay out of scope (the Linux pool excludes the ephemeral range). The test instance gains bounded post-start diagnostics (diagnose(), responder uptime vs child age, Linux listener owners, handshake stage in the close error). Regression: an instance whose first candidate is an in-process Gateway E2E port must allocate a different port (fails on the probe-only helper). (cherry picked from commit 8095d77) --------- Co-authored-by: RoboClaw <[email protected]> Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Patrick Erichsen <[email protected]>
* ci(release): install Chromium for A-K live tests (#163178) (cherry picked from commit 9ce1498) * ci(release): pin reachable live provider models (#163177) (cherry picked from commit 0fa2ddd) * test(opencode): refresh free live tool model (#163470) Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: vincentkoc <[email protected]> (cherry picked from commit cd7c2d2) * test: synchronize Telegram recorder failure admission Gate the synthetic control timeline on the recorder's durable failure receipt so slow filesystem publication cannot overtake the intended failure precondition. Preserve every assertion and align the touched fixture with the existing lint rules. (cherry picked from commit 0dfb96f) * fix(ui): reconcile end after layout correction (#166261) (cherry picked from commit 51f772a) * fix(ci): forward live video provider credentials (#164317) Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit d0ce76b) * fix(security): backport MCP dependency advisory fix (cherry picked from commit c39d9b0) * fix(test): make live qualification waits event driven * fix(test): Gateway e2e connect fails with 1006 when another fixture takes the instance port (#163003) gateway-cold-agent-abort intermittently failed with `gateway closed during connect (1006)` about 260 ms into the test, too early for its own cold Gateway child to have answered readiness. OpenClawTestInstance claims its port block and releases its reservation listener right before spawning the child. In-process Gateway fixtures picked ports with getGatewayE2ePortBlock(), a probe that released its claim before returning, and then started a Gateway whose listener retries EADDRINUSE every 500 ms. A fixture that probed the same candidate just before the instance claimed it won the port at the handoff, and the instance's /readyz was answered by that foreign Gateway (1006 while it closed, token mismatch while alive). getGatewayE2ePortBlock is removed. acquireGatewayE2ePortBlock (beside startClaimedGateway) returns a held claim, and every caller keeps it until the Gateway or server bound to that port has closed, including same-port restarts, unstarted-claim guards, and listener-specific release in the MCP App conformance fixture. Kernel-assigned port-0 binders stay out of scope (the Linux pool excludes the ephemeral range). The test instance gains bounded post-start diagnostics (diagnose(), responder uptime vs child age, Linux listener owners, handshake stage in the close error). Regression: an instance whose first candidate is an in-process Gateway E2E port must allocate a different port (fails on the probe-only helper). (cherry picked from commit 8095d77) --------- Co-authored-by: RoboClaw <[email protected]> Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Patrick Erichsen <[email protected]> (cherry picked from commit 8aa6d7c) Release adaptation: Select only live-shard evidence handling for disabled llama.cpp, Meta, and Mistral URL/key prerequisites. Re-home regression cases in the stable evidence helper; no workflow credentials, dependencies, or fixture ownership changes. Companion audit: Historical release bundle is not on pinned main and #166341 has no pinned-main PR mentions. Recorded backports for Chromium, provider routes, workflow secrets, MCP versions, UI and Gateway fixtures are unrelated to the evidence slice; no additional commit. Co-authored-by: RomneyDa <[email protected]>
Closes #166219
What Problem This Solves
Fixes: an unlocked chat follower can settle above the transcript end when a rendered row changes size during virtualizer correction.
User Impact
User impact: chats that are following the latest turn remain at the true end after late row measurement, while readers who scrolled away retain their position.
Why This Change Was Made
TanStack can correct the native offset after the host update that normally schedules end reconciliation has already completed. The correction updated the end anchor but did not schedule another reconciliation, leaving the exact post-measurement gap behind.
Route layout-correction receipts through the transcript host's existing end-reconciliation owner. That owner records the correction and schedules a fresh reconciliation with the existing connection, interaction, touch, restoration, and reader-lock guards intact. This complements #166258's release-branch content-change fix; it owns the later post-measurement correction on
main.Evidence
EPIPE, and lost widget draft persistence. The provider final/persistence evidence was healthy for the first; both sibling cases passed unchanged in subsequent clean runs. Neither was counted as clean proof.node scripts/check-changed.mjs <four changed files>: passed, including format, lint, UI/core type graphs, ratchets, i18n, and dead-code scans.No assertions, retries, or timeouts were weakened or increased. This is behavior-only; the existing real-Gateway boundary test is the regression proof.