Skip to content

improve: grow desktop chat drafts up to twelve lines - #186874

Merged
roboclaw-bot merged 4 commits into
openclaw:mainfrom
Marvinthebored:improve/composer-vertical-expansion
Oct 30, 2026
Merged

roboclaw-bot merged 4 commits into
openclaw:mainfrom
Marvinthebored:improve/composer-vertical-expansion

Conversation

@Marvinthebored

@Marvinthebored Marvinthebored commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Related: #113270

Height-only alternative to #178226, requested by @vyctorbrzezowski. Preserves @Marvinthebored’s original PR and implementation.

Work sessions

What Problem This Solves

Long Chat drafts start scrolling after six lines even when there is room to show more, while unconstrained pane-based growth can obscure too much of the conversation. A restored long draft also changes height after its first paint.

User Impact

Desktop Chat grows automatically to 12 lines, mobile Chat stays at 6, and shorter panes can constrain the editor further. New Session grows to 12 desktop lines while retaining its existing 10-line floor and mobile behavior. Longer drafts scroll internally; deleting text shrinks the editor again. Embedded composers keep their existing limits.

Why This Change Was Made

CSS owns the line cap from the first paint. The existing textarea overflow observer now measures the pane-owned editor limit on its first connected pass, accounting for controls, context and short panes, and attaches only in Chat footers or New Session scroll panes; no separate layout module, class or frame queue is added. The redundant JavaScript 80% limits are removed. New Session’s twelve-line allowance keeps its existing ten-line floor.

Accepted edge cases, kept out to fit the boot budget: a keyboard that overlays without resizing the layout (iPad-sized New Session) can cover up to two extra lines, and a caret already scrolled below a shrinking cap is not pulled back into view. Pane resize observers cover window and resizing keyboards.

There are no resize handles, width changes, new preferences, or changes to the existing compact mobile composition model. Width dragging remains in #178226.

Evidence

  • 86 browser/unit tests pass across composer height, overflow, New Session lifecycle and mounted Chat pane behavior; 24 full-page E2E tests pass on current main merged with this head.
  • Cap, saved-draft reload and mounted embedded-composer regressions fail before their fixes and pass afterward. Reload samples 30 frames from document start.
  • A separate populated-chat stress run passes at 1280, 1440, 1920 and 390px: incremental growth, 5–200-line pastes, typing at the cap and clearing. Frame samples found no height reversals; the transcript stayed at the bottom.
  • Production and affected test type checks, lint including pinned-Bun parity, CSS lint, controller guard and line-cap ratchet pass. Performance: against main 20121545966a5212dc3783a0375333fb6cd29eeb, ui:check-performance:base passes with Chat boot JS gzip +309 B (1,276,344 / 1,276,669 B) and total CSS gzip +78 B (308,515 / 308,526 B). No budget was raised.
  • Independent autoreview (Codex, P0–P2) of the budget simplification commit is clean; earlier full-candidate P0–P2 passes were also clean after the embedded-sizing and New Session padding findings were fixed.
  • Prior-head CI E2E failures had matching signatures on ancestral main. Fresh CI assesses the final head.

Same draft and conversation, 1440 × 900

Before is current main (2e4ae4432bd48fba9157b521a313a29341282a05); after is this height-only change. Both use the same synthetic conversation and twelve-line draft. The images below are identically cropped from full-page captures and retain the latest reply above the composer.

Before: current main shows six lines of the same draft

After: the height-only PR shows all twelve lines

@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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR lets desktop Chat and New Session drafts grow to twelve lines while preserving mobile and embedded-composer limits.

Example: Compose a twelve-line Chat draft at 1440 × 900.

  • Before: The editor shows about six lines and scrolls internally.
  • After: The editor can show all twelve lines when the pane has room.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Source review found no definite introduced defect, but the supplied visual proof is currently unusable and product approval remains outstanding.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: Long drafts require internal scrolling while desktop space remains available.
Reason: The previous pane-growth proposal is now bounded and excludes width dragging, but the prior owner-decision request remains unresolved in accessible discussion.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep this PR open: it contributes distinct height-only behavior, has composer-owner engagement, and introduces no definite correctness finding; the twelve-line design still needs a recorded owner decision.

Priority: P3
Reviewed head: 6e0ec18ee05bf5bad2d7f7e58d03d6112b759759
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should desktop Chat and New Session adopt this twelve-line automatic cap?
  • Recommendation: Accept capped desktop growth: Approve twelve desktop lines while retaining mobile and embedded limits.
  • Why: This changes intentional composer presentation; the body cites an owner request, but the accessible discussion contains no written approval of the revised cap, and self-assignment does not settle that choice.

Before merge

  • Add real behavior proof - The changed composer sizing is covered by browser and full-page test claims, but both linked screenshots return HTTP 404 and fallback retrieval also failed, so the claimed built-UI before/after result could not be inspected. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

None.

Tests

  • Missing end-to-end proof: Restore inspectable before/after captures of the built Control UI with the same twelve-line draft at 1440 × 900, redacting private endpoints and credentials.
Agent review details

How this fits together

Control UI composers receive draft text and available pane geometry, then size the editor while preserving caret visibility, internal scrolling, and conversation space.

flowchart TD
  A[Draft text] --> B[Chat or New Session composer]
  C[Pane and context geometry] --> D[Shared layout measurement]
  D --> E[CSS editor limit]
  B --> F[Textarea sizing owner]
  E --> F
  F --> G[Visible draft and internal scrolling]
Loading

Technical review

Best possible solution:

Let the composer owner select the desktop cap, retaining CSS-owned limits and shared short-pane measurement if twelve-line growth is accepted.

Do we have a high-confidence way to reproduce the issue?

Current-main CSS directly establishes the six-line limit; no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

The revised bounded approach preserves mobile, embedded, and short-pane behavior and reuses the textarea sizing owner, but choosing twelve lines remains a product preference.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 30aeaa050a96.

Provenance checked

  • Chat editor cap changes intended behavior with a stated reason (debc712: This extraction carried forward the six-line and 25dvh limits; the earlier multiline redesign explicitly described six-line behavior, while older blob searches did not establish the original introduction.)
  • New Session allowance changes intended behavior with a stated reason (f4d454c: The merged repair made first prompts grow to ten lines before scrolling; this PR explains the desktop extension and retains that floor.)
  • Native sizing and scrollbar behavior keeps the original intent (d51f360: Native field sizing avoids synchronous typing layout work; the patch retains that path and the later Safari scrollbar-gutter repair.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit b22e014 adds ui/src/styles/chat/composer-surface.css:395 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b22e014dfa7d; files: ui/src/styles/chat/composer-surface.css)

PR surface

Source +298, Tests +487. Total +785 across 14 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 8 316 18 +298
Tests 6 506 19 +487
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 822 37 +785

Review metrics

Metric Value Why it matters
Production versus test changes Production/styles +314/-18; tests +506/-19 Growth covers shared pane measurement, caret preservation, and distinct cap, reload, embedded, and lifecycle regressions; the generated boot manifest adds two entries separately.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.
  • remove proof: sufficient: Current real behavior proof status is insufficient, not sufficient.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.
  • remove status: ⏳ waiting on maintainer: Current PR status label is status: 📣 needs proof.

Label justifications:

  • P3: This improves long-draft editing ergonomics without repairing a blocked messaging workflow.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-28T16:14:58.901Z sha c66071b :: blocked before merge. :: none

Reviewed October 29, 2026, 11:06 AM ET / 15:06 UTC (Revision 2).

Keep mobile Chat at six lines and retain the New Session ten-line floor.
Apply the line limit before measurement to avoid a restored-draft reload jump,
constrain only pane-owned composers, and preserve embedded composer limits.
Add cap, embedded-composer and first-paint regressions plus populated-chat
paste/typing coverage.

Co-authored-by: Marvinthebored <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
@roboclaw-bot roboclaw-bot changed the title improve: let long chat drafts grow within the pane improve: grow desktop chat drafts up to twelve lines Oct 29, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 29, 2026
@vyctorbrzezowski vyctorbrzezowski self-assigned this Oct 29, 2026
Use the shared layout measurement lifecycle instead of a second class and
frame queue. Preserve twelve-line desktop caps, mobile and embedded limits,
short-pane budgeting, scroll anchoring and first-paint restoration.

Co-authored-by: Marvinthebored <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
Measure the pane-owned editor limit from the textarea observer both
composers already use, removing the separate layout modules so the height
change fits the Chat boot and CSS budgets. Visual-viewport-only keyboard
overlays and a caret already scrolled below a shrinking cap are accepted
edge cases; pane resize observers cover window and resizing keyboards.

Co-authored-by: Marvinthebored <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
@roboclaw-bot
roboclaw-bot merged commit 402e7f4 into openclaw:main Oct 30, 2026
95 checks passed
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 30, 2026
* improve: let long chat drafts grow within the pane

* improve: cap chat draft growth at twelve desktop lines

Keep mobile Chat at six lines and retain the New Session ten-line floor.
Apply the line limit before measurement to avoid a restored-draft reload jump,
constrain only pane-owned composers, and preserve embedded composer limits.
Add cap, embedded-composer and first-paint regressions plus populated-chat
paste/typing coverage.

Co-authored-by: Marvinthebored <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>

* refactor: simplify pane-owned composer height measurement

Use the shared layout measurement lifecycle instead of a second class and
frame queue. Preserve twelve-line desktop caps, mobile and embedded limits,
short-pane budgeting, scroll anchoring and first-paint restoration.

Co-authored-by: Marvinthebored <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>

* refactor: fold composer pane height into textarea observer

Measure the pane-owned editor limit from the textarea observer both
composers already use, removing the separate layout modules so the height
change fits the Chat boot and CSS budgets. Visual-viewport-only keyboard
overlays and a caret already scrolled below a shrinking cap are accepted
edge cases; pane resize observers cover window and resizing keyboards.

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]>
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:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants