Repository navigation
fix(ui): prevent chat layout shifts when adding comments - #186734
Merged
Merged
Conversation
Contributor
|
🦞👀 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. |
vyctorbrzezowski
marked this pull request as ready for review
October 28, 2026 11:53
vyctorbrzezowski
enabled auto-merge (squash)
October 28, 2026 12:15
vyctorbrzezowski
disabled auto-merge
October 28, 2026 12:30
Member
Author
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
This was referenced Oct 28, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 29, 2026
…6734) * fix: keep chat tables still when adding comments * fix(ui): preserve narrow chat alignment through session admission * test(ui): consolidate comment layout regression coverage * test(ui): sample current shortcut typography atomically
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #186733
What Problem This Solves
Fixes wide Markdown tables shifting horizontally when the first Add to chat comment is saved, then moving back when the last comment is removed.
User Impact
Conversation content keeps its horizontal position and width while comments are added, edited, or removed. The existing draft and normal vertical composer growth are preserved.
Why This Change Was Made
Reserve annotation space before the first comment, using the same inset for the reading column and wide-table bounds. Previously, adding a comment inserted padding inside the column and changed the table's center. The pending-session preview reserves the same space before admission. Narrow peer footers keep readable names and align actions with the timestamp when metadata wraps.
Risk and coverage: annotation-capable transcripts now keep a minimum 32px side inset for the pin and its gaps, including narrow layouts. Larger existing gutters are preserved. The composer keeps its existing inset; pin positioning, focus handling, and transcript virtualization are unchanged.
Evidence
Reproduced through an isolated Gateway with a real agent response on main
51420782b3810b4aa1230aa9621aec78f7dbbd3c. At 100% zoom/DPR 1, saving the first comment moved the table 14 CSS pixels left without changing its 712.578px width. After the fix, all 375 sampled frames through add/edit/remove kept the same horizontal position and width.Verified first/second comment, editing, removing one/final comment, Details open/closed, narrow layout, a selection at the table's right edge, and a table at its width cap. Draft preserved; horizontal scrolling unchanged. The independent vertical resize/scroll from the comment chip remains.
All six affected suites passed across the focused runs: 62 distinct tests covering comment lifecycle, selection destinations, Markdown tables, mobile shell geometry, attributed identity, and pending-session admission. The new regression fails on the base at both desktop and narrow widths. The regression now reuses the existing keyboard-deletion lifecycle and pin/reflow tests, including partial selections. The final table/mobile command took 44.65s; the consolidated geometry cases take about two seconds each locally. CI timing is pending.
UI build, UI typecheck, targeted style/TypeScript lint, formatting, and diff checks passed. Final
codex review --uncommittedfound no actionable regressions.Separate review-run limitation: its additional table run timed out on Enter activation of an external link in an expanded table, once in chat and once in the assistant panel. Both cases passed in the coordinated run. That popup-link path is unchanged; this failed attempt is not counted as passing evidence. A later combined local run also hit an unchanged sent-comment tooltip Escape timeout; its isolated replay passed without edits. No fix is claimed for either auxiliary timeout.
CI follow-up: run
40689903400failed the grouped-session fixture, a shortcut-font read (empty font family), and the first background-update render count (3 instead of at most 1). The grouped-session failure also reproduced on its exact main parent and was fixed separately in fix(ci): restore grouped sidebar pagination coverage #186749; this branch now incorporates that landed repair. The other two cases passed on both the exact main parent and tested merge, and a diagnostic run did not reproduce them. Their cause remains unconfirmed; no repair or inherited-failure exemption is claimed. Current-head CI remains required.Typography sampling repair: the test now queries the current shortcut and reads its font/text in one synchronous DOM evaluation. It retains the exact font and text assertions, without polling, delay, or retry. Both platform cases and targeted lint passed; a fresh Codex review found no actionable issue. The earlier empty-font CI failures remain recorded; current CI must validate this observation change. The background-render failure was independently reproduced on baseline
b0966db: lazy English-catalog publications caused the same three renders without changing conversation data or layout. No production change or higher render allowance was made.Final CI qualification: run
40699439675passed the typography, background-update, cloud-startup, and provider-notice cases and all other required lanes exceptchat-stream-runtime-budgets.e2e.test.ts(three pane commits, expected zero). That unchanged test also fails on baselineb0966db: late lazy English-catalog publications trigger pane commits independently of stream text. The test, publisher, and pane projection are byte-identical in the baseline and tested merge. This is retained as failed CI and attributed through the native inherited-failure route; its assertion and production behavior are unchanged.Before
The 14px horizontal shift is the defect. Vertical composer growth and scrolling are independent.
before-desktop.mp4
After
Videos run at 1×. A fixed crop removes the model toolbar; the conversation and draft remain visible. The content is synthetic.
Narrow layout and table-edge pin
After recording
after-desktop.mp4
CI follow-up: narrow peer footer and pending-session admission
CI exposed two affected consumers: a 320px peer footer could put the timestamp below its actions, and the pending-session preview did not yet reserve the admitted transcript's gutter. Both were reproduced and corrected at their layout owners. Existing alignment and admission-continuity assertions remain intact; the identity tests also verify short author names are not truncated. All 25 cases in the two affected suites passed across the final focused runs.
The screenshots below use synthetic shared-conversation data at 320px, real browser taps, passive waits, and unmodified browser animation/caret behavior.