Repository navigation
improve: let chat drafts grow and resize message width from the border - #178226
roboclaw-bot merged 15 commits into
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: blocked before merge. What this changesThis PR lets drafts grow within the available pane and adds border dragging and keyboard controls for the existing Message width preference. Example: Writing ten lines in Chat at a 1440×900 viewport.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR open for a UI owner’s product decision; the contribution is coherent, and no concrete introduced defect was found. Priority: P3 Decision needed
Before merge
FindingsNone. Agent review detailsHow this fits togetherChat and New Session pass editor references and the saved width into shared layout measurement; CSS controls editor bounds, and the existing settings owner persists explicit width changes. flowchart TD
A[Chat and New Session] --> B[Composer layout binding]
B --> C[Shared layout measurement]
C --> D[Editor height limit]
B --> E[Pointer and keyboard interaction]
E --> F[Existing Message width preference]
F --> A
Technical reviewBest possible solution: Have the composer design owner choose the growth and border interaction contract, then retain one shared implementation using existing measurement, pointer, and settings owners. Do we have a high-confidence way to reproduce the issue? This is primarily a new interaction proposal; current-main source confirms the existing caps, and supplied visual evidence demonstrates the proposed behavior. Is this the best way to solve the issue? The implementation appropriately shares geometry and reuses pointer handling and settings persistence, but changing the established sizing contract needs an owner decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5437018f4f73. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +489, Tests +654. Total +1143 across 21 files. Added test files: 2. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (10 earlier review cycles; latest 8 shown)
Reviewed October 28, 2026, 12:05 AM ET / 04:05 UTC (Revision 11). |
9ae6e4f to
439e106
Compare
|
@clawsweeper re-review Rebased onto
167 tests pass (49 browser, 33 E2E, 85 unit). |
|
🦞👀 Re-review progress:
|
453508b to
66f6815
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Preview drags through the shared --chat-thread-max-width token instead of a separate fallback in every width rule, use the global focus ring on the border, and drop rules the width cap made dead.
2fcc15c to
4d25dc7
Compare
|
@clawsweeper re-review Rebased onto main 2753fa0; head is now 4d25dc7. One test change: the overflow browser test's draft now repeats 24 times instead of 6, so it actually crosses the pane-derived height cap from #186232 (13/13 browser tests pass locally). Main has raised the test-lines ceiling to 6,300,000, so this PR no longer changes it (local ratchet: 6,295,150). On the previous head, these UI e2e failures reproduce identically on unmodified main 2753fa0 (main's CI skips the UI e2e lane): |
|
🦞👀 Re-review progress:
|
Separate width controls from draft height while retaining the contributor branch and integrating current main. Keep shared saved width, keyboard and pointer reset/cancel behavior, first-frame restoration, and New Session placement alignment. Bound the composer to the actual transcript reading track with Details and Files open. Regenerate the boot manifest with optional idle warmups disabled during capture; application runtime and all budget ceilings remain unchanged. Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
Move drag, keyboard and double-click handling into a lazily loaded edge so the gestures stay out of Chat boot, keep a small eager column cap so a saved width applies from the first frame, and mount that cap only when a width is saved, never below the 48rem default. Unsaved composer geometry matches main. Width changes write through the existing settings owner. Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
…th-178226 # Conflicts: # ui/config/control-ui-boot-modules.json # ui/src/pages/new-session/composer.test.tsx
The height spec guarded that its PR added no width separator; the width edge now adds it intentionally and composer-layout covers it. Regenerate the boot manifest for the merged module graph. Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
openclaw#178226) * improve: let chat drafts grow and resize message width from the border * fix: share responsive composer width and owned pointer drag Use one CSS inset contract for the width clamp, keep pointer lifetime in createPointerDrag, and regenerate shared boot ownership to avoid importing New Session into Chat. Cover mobile no-op widening and gesture cancellation, and replace observer counts with behavioral cleanup assertions. * test(ui): treat ten lines as the New Session prompt floor * test(ui): name the New Session prompt test after its growth limit * test(ui): retain overflowing draft coverage after composer rebase * fix(ui): keep draft bottom and caret visible when the window shrinks * fix(ui): preserve wrapped caret and compact draft previews * fix: keep composer initialization and queued phone drafts usable * fix(ui): fit composer width drag within the CSS budget Preview drags through the shared --chat-thread-max-width token instead of a separate fallback in every width rule, use the global focus ring on the border, and drop rules the width cap made dead. * fix(ui): keep composer layout wiring within the view line limit * test(ui): cross the pane-derived composer cap in the overflow test * fix: keep composer width lazy and default geometry unchanged Move drag, keyboard and double-click handling into a lazily loaded edge so the gestures stay out of Chat boot, keep a small eager column cap so a saved width applies from the first frame, and mount that cap only when a width is saved, never below the 48rem default. Unsaved composer geometry matches main. Width changes write through the existing settings owner. Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * test: let height coverage coexist with the width edge The height spec guarded that its PR added no width separator; the width edge now adds it intentionally and composer-layout covers it. Regenerate the boot manifest for the merged module graph. Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> --------- Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
Related: #113270
Supersedes #145093. Width-only continuation of @Marvinthebored’s original PR, separated from height PR #186874 at @vyctorbrzezowski’s request. Original authorship, branch history and contributor evidence are preserved.
Work sessions
What Problem This Solves
Changing message width requires settings, and New Session does not consistently use the saved width or align its placement controls with the composer.
User Impact
Drag the left composer border or use its keyboard controls to resize Chat and New Session together. Double-click, Enter or Home restores the opening width. The composer stays inside the actual transcript reading column with Details or Files open, and a smaller viewport does not overwrite the saved width. Reload uses that saved width from the first visible frame.
This PR changes width only. Expanded draft height landed separately in #186874; this branch includes it from main. Unsaved composer geometry is unchanged from main: the reading-column cap mounts only when a width is saved and never shrinks the composer below the 48rem default. No new preference, migration or user action is required.
Why This Change Was Made
Solid owns the resize separator and the existing Message width preference remains authoritative. Shared pointer-drag and layout-measurement lifecycles handle cancellation, reset, responsive limits and disposal. Width is bounded by the transcript’s reading track, excluding docked Details and scrollbar gutters; floating Details retains its existing clearance above the composer.
Drag, keyboard and double-click handling load lazily (
chat-composer-width-edge.tsx, warmed at idle and on composer pointer/key intent) so they stay out of Chat boot. A small eager column cap keeps a saved width from the first frame. Width changes write through the existing settings owner (patchSettings), so no other chat settings are rewritten.The boot-manifest capture also disables optional idle warmups through Chromium’s Data Saver emulation. Unchanged main reproduced the previous capture pollution; the correction affects measurement only, not application runtime or budget ceilings. The manifest is regenerated with the official command.
Evidence
6fc01dc6): composer width/height/overflow browser and New Session unit suites pass (4 files); 12 E2E spec files pass, includingcomposer-layout(8 cases incl. first-visible-frame reload),composer-height, and the geometry specs that failed on the previous head (chat-loading-geometry,browser-panel-width,chat-composer-picker-layout,chat-model-controls,mobile-shell-geometry,chat-mobile-latest-clearance,chat-workspace-files,chat-message-actions,new-session-page.instant-thread). Those failures came from the previous head capping unsaved composers to the reading column (48 px narrower); the fix leaves unsaved geometry identical to main.composer-layoutcovers the separator.6fc01dc6is scoped-clean.ui:check-performance:base 6fc01dc6passes: Chat boot JS gzip +906 B (1,271,508 / 1,276,669 B), New Session boot JS +1,053 B (limit 797,395 B), total CSS gzip −1 B (308,502 / 308,526 B). No budget was changed.Current visual proof
Identical synthetic fixtures at 1440 × 900. New Session before/after uses the same saved 600px width: after honors it and aligns placement controls. The Files comparison shows the composer constrained to the transcript reading column after widening. Draft height behavior is unchanged.
Original contributor evidence, before the height/width split
This is retained historical evidence, not a claim that the former combined-height behavior or old performance measurements apply to the current width-only head.
Related: #113270
Supersedes #145093.
What Problem This Solves
Long Chat and New Session drafts stop growing too early, and changing message width requires opening settings.
User Impact
Drafts grow to the visible pane’s limit and then scroll internally. Drag the left composer border to change message and composer width; double-click or press Enter to restore the opening width. Shrinking the window preserves the draft bottom while keeping the caret visible; compact mobile previews return to the first line.
Why This Change Was Made
Both composers share settled-layout measurements and reuse the existing Message width preference. The layout reserves transcript and footer space, preserves New Session’s ten-line allowance, and keeps the invisible drag target outside controls.
The phone-width toolbar (560px/320px containers), shell gap and New Session scrollbar are unchanged; this PR adds only width/drag, growth limits and the New Session cap.
Evidence
The PR author tested the build by hand on desktop and on an iPhone: the draft grows line by line with the keyboard open, and the caret and send button stay in view.
19 composer Chromium cases, 6 production-bundle E2E cases (composer layout and agent config save), the UI typecheck project, and scoped lint and format pass.
The detached-textarea initialization crash and phone queue overflow were reproduced and fixed. The phone height budget now includes queue chrome.
pnpm ui:check-performance: total CSS 307,947 B gzip (limit 308,298) and 1,590,265 B raw (limit 1,597,676); startup CSS gzip 1 request, within its ceiling. No budget raised. To fit, a drag previews through the existing--chat-thread-max-widthtoken instead of a separate fallback in every width rule, and the border uses the app’s global focus ring.Window-shrink regression cases fail before the fix and pass afterward; built previews exercise drag, reset, viewport containment, and caret visibility.
Real stable 2026.10.7 → rebuilt candidate Gateway preserves the existing width setting and exact draft on the same origin and browser profile, without reseeding storage. This tests the pre-commit working-tree build of the published repairs.
Validation and screenshot context.
Upgrade identity and persistence receipt.
All seven composer captures below are at 50% scale, with synthetic text.
Empty Chat composer retains its compact height.
A short draft grows naturally with its content.
Dragging the border narrower increases wrapping and editor height.
Dragging wider reduces wrapping and editor height.
A long Chat draft reaches the pane allowance and scrolls internally.
The phone editor scrolls while its action row remains visible.
New Session stops at its containing pane allowance and scrolls internally.
The existing Message width setting survives the real stable-to-candidate upgrade.
The exact existing draft survives the same upgrade without storage reseeding.
AI-assisted.