Skip to content

fix(ui): prevent chat layout shifts when adding comments - #186734

Merged
vyctorbrzezowski merged 5 commits into
mainfrom
brzezowski/annotation-table-layout
Oct 28, 2026
Merged

vyctorbrzezowski merged 5 commits into
mainfrom
brzezowski/annotation-table-layout

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

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 --uncommitted found 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 40689903400 failed 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 40699439675 passed the typography, background-update, cloud-startup, and provider-notice cases and all other required lanes except chat-stream-runtime-budgets.e2e.test.ts (three pane commits, expected zero). That unchanged test also fails on baseline b0966db: 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: the first comment moves the table left

before-desktop.mp4

After

After: table position stays fixed when the first comment is saved

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

Before: narrow conversation reflows when a comment is saved

After: narrow conversation retains its width and the pin stays visible

After: the pin remains beside text in the last table column

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.

Before follow-up: the timestamp wraps below the action icons

After follow-up: the full author name remains readable and timestamp aligns with actions

@vyctorbrzezowski vyctorbrzezowski self-assigned this Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 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.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review October 28, 2026 11:53
@vyctorbrzezowski vyctorbrzezowski changed the title fix: keep chat tables still when adding comments fix(ui): prevent chat layout shifts when adding comments Oct 28, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 28, 2026
@vyctorbrzezowski
vyctorbrzezowski enabled auto-merge (squash) October 28, 2026 12:15
@vyctorbrzezowski
vyctorbrzezowski merged commit 6ad36bd into main Oct 28, 2026
101 of 105 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/annotation-table-layout branch October 28, 2026 14:05
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

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
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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Adding a chat comment shifts wide tables horizontally

1 participant