fix: reduce transparent stream live row churn - #5456
3 commits merged into
Conversation
|
| Filename | Overview |
|---|---|
| static/ui.js | Core reconciliation changes: backward-pass insertion dedup, new thinking fast-path, and conditional innerHTML guard. Logic is sound; one subtle interaction worth noting. |
| static/style.css | Adds scrollbar-gutter:stable to thinking-card-body to reserve scrollbar space and prevent layout shift during content growth. |
| tests/test_issue5367_transparent_live_row_reconcile.py | Adds FakeElement.nextSibling getter, insertion-count instrumentation, and four new focused tests for insertion dedup, HTML-skip, thinking-path, and _tcData carry. Coverage is thorough. |
| tests/test_issue3820_chat_activity_display_mode.py | Updates CSS assertion to include the new scrollbar-gutter:stable property. Minimal, correct change. |
| tests/test_live_to_final_anchor_visible_order.py | Adds eval of _refreshTransparentThinkingLiveRow so the function is available when the full reconciliation pipeline is exercised in this test module. |
Reviews (2): Last reviewed commit: "fix: simplify transparent row sibling ch..." | Re-trigger Greptile
|
Addressed the Greptile note about the unreachable |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
|
I checked overlap with #5506 since it also touches Transparent Stream live-row behavior. The overlap appears limited to the general stable row-ordering/reinsert area in The pieces here that still appear distinct are:
If #5506 lands first, I can rebase this branch and keep only the remaining distinct DOM-stability pieces. |
Stacey2911's follow-up to the identity-preserving live-row reconcile: skip redundant innerHTML rewrite when unchanged, skip reinsert when already in position, stop thinking-block scrollbar flicker. Deep-review subagent + gate: no identity-invariant break (attrs/className/_tcData/interactive-state all still synced unconditionally; only redundant DOM writes gated). Staged on current master (resolves the stale-base #4295 test artifact — 114 transparent/anchor tests green on merge).
7274634
|
Shipped in v0.51.854 🎉 — merged via release Thanks @Stacey2911 — a clean follow-up to the identity-preserving live-row reconcile. The streaming view is smoother now: no redundant innerHTML rewrites when a row is unchanged, no reinsert when a row is already positioned, and no thinking-block scrollbar flicker. Cleared the full gate:
Note: the branch predated master's #4295 scroll-anchor fix so the raw head showed 2 unrelated reds — they cleared on merge-forward (114 transparent/anchor tests green on the merged tree). Closing as shipped — thanks for the contribution! |
Thinking Path
Transparent Stream now preserves live rows by identity, but follow-up testing found remaining no-op churn and layout instability during streaming updates:
Those cases preserve the top-level row node, but still create unnecessary DOM/layout instability during live rendering.
What Changed
_tcDataforward when a transparent live row is reconciled.innerHTMLreplacement when the candidate row markup is unchanged.insertBefore/appendChildwhen a reconciled row is already under the correct parent and in the correct sibling position.Why It Matters
This reduces Transparent Stream no-op DOM/layout churn during live responses without changing Compact Worklog behavior or replacing the existing row reconciliation model.
In local browser validation, this removed visible chat-window flicker caused by stable transparent rows being refreshed or reinserted during token generation, and also removed the remaining internal scrollbar flicker inside long thinking blocks.
Contract Routing
Touches Transparent Stream live-row reconciliation and visual/DOM stability. It does not change persisted session shape, message payloads, provider API behavior, backend contracts, or activity mode selection.
Verification
Local:
Result: 122 tests passed locally after the thinking-block scrollbar fix was added.
Browser/manual:
Risks / Follow-ups
Model Used
Planning/review: OpenAI GPT-5.5 Thinking.
Implementation/review support: Codex CLI and HermesAgent running qwen3.6-27b@q4_k_m.
Manual browser validation was performed by the user on the local HermesWebUI runtime.