Skip to content

fix: keep the New Session composer above the keyboard - #201268

Closed
roboclaw-bot wants to merge 5 commits into
mainfrom
openclaw/mellow-shell-4
Closed

roboclaw-bot wants to merge 5 commits into
mainfrom
openclaw/mellow-shell-4

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Related: #201165

What Problem This Solves

On a phone, opening the keyboard while writing a long first draft in New Session could push the bottom of the composer, including Send, past the visible edge. Since #201165 made the welcome heading taller, the draft could only shrink in very short viewports, not when the keyboard still leaves more than 500 px visible. main is red on the two New Session end-to-end tests that cover this, which blocks unrelated PRs.

User Impact

With the keyboard open, the composer and Send stay above it, and a long draft scrolls within the space that's left. The full-size welcome and the compact layout are unchanged. Plain workspaces still drop the unneeded checkout placeholder without moving the writing surface.

Why This Change Was Made

While the keyboard is open in a roomy viewport, the welcome and draft may now shrink, and the input row takes the remaining height. This mirrors the existing short-viewport rule without compacting the welcome. The early-submit test expected the frame to keep a checkout row that is supposed to disappear when a plain workspace resolves. It now allows only that row's measured height change and still checks that the writing surface doesn't move and nothing is submitted before an explicit retry.

Evidence

Both failing files reproduce on clean main (4e547ac). They pass on #201165's parent (096cf7c) and fail from e79905a onward. With this change, both pass twice, and the related seven-file bundled run (details-motion, workspace-validation, checkout-loading, projects-places, model-catalog and the two targets) passes all 52 tests. At 600 px of visible height, the composer now ends at 864 px instead of 876 px, restoring the 10 px gap above the keyboard. Send stays reachable at 380, 520 and 600 px of visible height. 120 focused unit and browser tests, lint, Stylelint and the UI typecheck passed. The keyboard was emulated with Chromium's visual viewport against a mocked Gateway; this was not checked on a physical iOS device.

Requested by @vyctorbrzezowski.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 18, 2026 14:45
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: c70a09a7-07ba-838f-9f54-d76efa85124e
@clawsweeper

clawsweeper Bot commented Nov 18, 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: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. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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 Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR lets long New Session drafts shrink above an open keyboard and adjusts the loading test for intentionally removed checkout placeholders.

Example: Write a long draft at 402 px width with a 600 px visual viewport ending at y=874.

  • Before: The reported composer bottom reaches y=876, beyond the visible area.
  • After: The reported composer bottom is y=864, leaving the intended 10 px gap.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Useful direction and focused behavioral coverage, with a concrete CSS-budget failure and no qualifying demonstration of the changed layout.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A long first draft can push the New Session composer and Send beyond the visible keyboard area.
Reason: The maintainer-authored direction restores an established reachability contract without adding settings, persistence, or another viewport owner.

Regression provenance

Regression provenance — verified: source commit e79905a180b2 by RoboClaw; canonical PR #201165 (blame-to-merge-commit).

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-authored PR addresses a current mobile layout regression, but its added CSS causes a required performance check to fail.

Priority: P2
Reviewed head: 267e054d3c6be84276c46fc260dff6eb959723c5

Before merge

  • Reduce the added CSS to pass the existing asset budget (P2) - This block duplicates the nearby compact-layout shrink rules and causes the exact-head control-ui-performance check to fail: total raw CSS grows from 1,749,783 B to 1,750,465 B (+682 B), while an already over-budget base permits only 64 B of variance. The aggregate CI gate fails for this check. Consolidate the shared layout declarations or make an equivalent focused reduction while preserving both viewport behaviors and the existing budget.

Findings

  • [P2] Reduce the added CSS to pass the existing asset budget — ui/src/styles/new-session.css:1085-1089

Tests

  • Missing end-to-end proof: Provide redacted before/after screenshots or a recording of this repair in the built Control UI with a long draft and a 520–600 px keyboard viewport, showing reachable Send and restoration after closing the keyboard; simulated viewport geometry is acceptable.
Agent review details

How this fits together

The Control UI shell translates VisualViewport measurements into keyboard state and height variables, which New Session CSS uses to size the welcome, placement tray, editor, and Send button.

flowchart TD
  A[Browser visual viewport] --> B[Shell viewport owner]
  B --> C[Keyboard state and height variables]
  C --> D[New Session layout]
  E[Draft and placement controls] --> D
  D --> F[Scrollable editor and reachable Send]
Loading

Technical review

Best possible solution:

Consolidate the existing shrink rules, retain compact-only welcome styling, and satisfy the unchanged CSS budget.

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

Current main retains the 44 px heading reservation and limits shrink rules to heights at or below 500 px; the body reports failure at 600 px and passing results before the heading change, but no target code was executed during this review.

Is this the best way to solve the issue?

The existing CSS and viewport owners are the right boundary, and the test adjustment preserves explicit retry and writing-surface stability while honoring intentional placeholder removal.

Full review comments:

  • [P2] Reduce the added CSS to pass the existing asset budget — ui/src/styles/new-session.css:1085-1089
    This block duplicates the nearby compact-layout shrink rules and causes the exact-head control-ui-performance check to fail: total raw CSS grows from 1,749,783 B to 1,750,465 B (+682 B), while an already over-budget base permits only 64 B of variance. The aggregate CI gate fails for this check. Consolidate the shared layout declarations or make an equivalent focused reduction while preserving both viewport behaviors and the existing budget.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3e0d3687c5da.

Provenance checked

  • Keyboard viewport layout keeps the original intent (ac1bfac: Use actual available canvas height rather than Safari's unchanged layout-viewport height; the later picker repair retained that owner and added visible-height containment.)
  • Early-submit layout assertion changes intended behavior with a stated reason (279015b: Readiness feedback must preserve the draft and composer geometry; this PR explains the narrower exception for the checkout row intentionally removed after a plain workspace resolves.)
  • Roomy-keyboard regression coverage keeps the original intent (e80a6dd: Keep long drafts and Send inside the visual viewport while allowing editor growth when more height is available.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test:ui:e2e ui/src/e2e/new-session-page.keyboard.e2e.test.ts ui/src/e2e/new-session-page.early-submit.e2e.test.ts
  • pnpm lint:ui:styles
  • pnpm ui:check-performance:base --base e43b146
  • git diff --check

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit e80a6dd adds ui/src/styles/new-session.css:1081 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e80a6dd9fdb4; files: ui/src/styles/new-session.css)
  • Peter Steinberger: Raw commit 279015b adds ui/src/e2e/new-session-page.early-submit.e2e.test.ts:61 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 279015b0578e; files: ui/src/e2e/new-session-page.early-submit.e2e.test.ts)
  • RoboClaw: Raw commit e79905a adds ui/src/styles/new-session.css:149 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e79905a180b2; files: ui/src/styles/new-session.css)

PR surface

Source +31, Tests +30. Total +61 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 31 0 +31
Tests 2 53 23 +30
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 84 23 +61

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: The regression affects long first drafts on mobile while the keyboard is open, with a focused layout repair.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The regression affects long first drafts on mobile while the keyboard is open, with a focused layout repair.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

Reviewed November 18, 2026, 10:02 AM ET / 15:02 UTC.

roboclaw-bot and others added 3 commits November 18, 2026 15:21
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 45c801a2-f1a1-8841-8587-d18957d3ef17
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Verification: closing as superseded by #201291

The keyboard regression was real, but #201291 already fixed it on main (merged 15:59 UTC) with a smaller keyboard-only draft-height cap. With a long first draft at visible heights of 380, 520 and 600 px, current main and this head behave the same: Send stays reachable with a 10 px gap above the keyboard, and a touch tap submits the exact draft. This PR's second layout rule is therefore unnecessary, and the exact-head review also reported a CSS-budget failure.

Long draft, visible height Pre-fix main 2a3e3b03 Current main ce9db430 and this head 474b6df0
380 px Send reachable Same
520 px With a 48 px pan, Send is clipped; the composer overruns by 88 px Send reachable, 10 px gap
600 px Without a pan, Send is fully clipped; the composer overruns by 56 px Send reachable, 10 px gap

On a desktop without a keyboard, the composer geometry is identical on both.

Pre-fix main (600 px) Current main (600 px) This PR (600 px)
Pre-fix main: Send hidden under the keyboard Current main: Send visible above the keyboard This PR: Send visible above the keyboard

These were captured in bundled Control UI on Chromium with touch emulation and the E2E's visualViewport height/offset overrides, using a synthetic Gateway and workspace. No physical keyboard, Safari or native WebView was tested. The videos appended below are, in order: pre-fix main (phone, desktop), current main (phone, desktop), and this PR (phone, desktop).

cc @vyctorbrzezowski

before-regression-mobile.mp4
before-regression-desktop.mp4
before-mobile.mp4
before-desktop.mp4
after-mobile.mp4
after-desktop.mp4

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 P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant