Skip to content

fix(ui): keep new-session identity anchored as the composer grows - #122242

Merged
vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/new-session-top-anchor
Aug 11, 2026
Merged

vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/new-session-top-anchor

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Closes #122226

What Problem This Solves

Fixes an issue where users drafting a new session would see the assistant identity and workspace picker jump upward when pasted or long text made the composer grow.

Why This Change Was Made

The /new composition now uses upper-third gravity and stays top-anchored inside its existing scroll region. The identity, hint, workspace picker, and composer top remain fixed; the existing textarea grows downward to its ten-line cap and then scrolls internally.

Recent chats remain visible below the composer. Once growth is one-directional, they no longer move anything above the draft, and preserving them avoids removing useful navigation merely because the composer is non-empty.

User Impact

Typing or pasting a long first prompt no longer repositions the new-session identity or target controls. The empty screen starts higher, long drafts remain bounded, and Recent chats stay available in both light and dark themes.

Evidence

Captured with the real Control UI mock-Gateway surface in Chromium at 1440×900. Before ref: 32a43960c66bd1568712ca8d8c7e432932813271. After ref: f8e744af7d4c0517c1f129b24327bb6ca50493c8.

Light theme — before

Empty composer 18-line paste
Light theme before, empty composer: vertically centered new-session composition Light theme before, long composer: identity and workspace controls shifted upward

Light theme — after

Empty composer 18-line paste
Light theme after, empty composer: upper-third top-anchored composition Light theme after, long composer: identity stays fixed while the composer grows downward

Dark theme — before

Empty composer 18-line paste
Dark theme before, empty composer: vertically centered new-session composition Dark theme before, long composer: identity and workspace controls shifted upward

Dark theme — after

Empty composer 18-line paste
Dark theme after, empty composer: upper-third top-anchored composition Dark theme after, long composer: identity stays fixed while the composer grows downward

The browser geometry check measures the full growth sequence:

before identity top: 161.046875px -> 81px      (-80.046875px)
after identity top:   81px -> 81px             (0px)
after picker top:     288.328125px -> 288.328125px (0px)
after composer top:   322.328125px -> 322.328125px (0px)
long textarea:        212px client / 369px scroll height
page scroll top:      0px

Focused red/green regression proof:

# With the old auto-margin behavior
new-session-page.prompt-attachments.e2e.test.ts
expected 151.1875 to be close to 239.15625 (difference 87.96875)

# With this PR
Test Files  1 passed (1)
Tests       11 passed (11)

Commands:

nice -n 19 ./node_modules/.bin/stylelint ui/src/styles/new-session.css --config config/stylelint.config.mjs
nice -n 19 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/new-session-page.prompt-attachments.e2e.test.ts

Testbox lease tbx_01kzs5g8nzwafbdebvxzr7zk0k / run https://github.com/openclaw/openclaw/actions/runs/31529124663 passed the full changed gate plus the focused Chromium suite on the patch-identical pre-rebase head. The final rebase adopted only unrelated main changes; the focused suite and all screenshots were rerun on the final head.

Production delta: +5/-8 (net -3). Test delta: +23/-1 (net +22). Exact-head PR CI is green: https://github.com/openclaw/openclaw/actions/runs/31532017749.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Aug 11, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Pre-merge record for f8e744af7d4c0517c1f129b24327bb6ca50493c8:

  • Exact-head CI is green: https://github.com/openclaw/openclaw/actions/runs/31532017749 (openclaw/ci-gate succeeded).
  • ClawSweeper's latest comment is the pickup acknowledgement; no review findings or Rank-up moves: list has been published, so there are no moves to apply or skip. The pending publisher is not a landing blocker under the current review policy.
  • Sequential review pass 1: SHA-bound native review artifacts validated READY FOR /prepare-pr with 0 findings.
  • Sequential review pass 2: the frozen branch autoreview completed clean with 0 accepted/actionable findings.
  • Root cause and owner: the /new override retained the shared welcome's vertical auto margins, so the whole composition re-centered as the textarea grew. The owner-specific CSS now consumes spare space below the composition; shared empty-chat centering remains unchanged.
  • Browser proof covers empty → 18-line paste in light and dark themes. Identity, workspace row, and composer top remain fixed while the textarea grows downward, caps at ten lines, and scrolls internally.
  • Production delta: +5/-8 (net -3). Test delta: +23/-1 (net +22). Recent chats remain in normal flow below the composer and do not move content above it.

@vyctorbrzezowski
vyctorbrzezowski merged commit 7d99f9f into main Aug 11, 2026
88 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/new-session-top-anchor branch August 11, 2026 20:30
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit to tangtaizong666/openclaw that referenced this pull request Aug 11, 2026
…-prep

* commit 'edb7a1692e58d78ff7e196db39ea8eff297b2e19': (1351 commits)
  fix(telegram): expose live location updates to hooks (openclaw#122185)
  fix(ui): remove the pre-creation session row (openclaw#122259)
  fix(openai): surface failed realtime response outcomes (openclaw#121177)
  fix(logging): publish diagnostics ZIP through staged atomic overwrite (openclaw#122130)
  test(cli): trim duplicate MCP probe process cases (openclaw#122260)
  feat(agents): replay persisted native video (openclaw#122257)
  fix(test): serialize default e2e runner (openclaw#122203)
  fix(ui): always show full assistant responses (openclaw#122207)
  feat(mcp): per-requester OAuth for MCP servers (openclaw#122166)
  fix(ui): preserve focus on composer accessory clicks (openclaw#122243)
  fix(backup): exclude state temp files (openclaw#122250)
  fix(browser): let attached workers exit after CDP use (openclaw#122103)
  test(cli): trim duplicate Claw authoring process cases (openclaw#122248)
  refactor(outbound): inline delivery diagnostics (openclaw#122219)
  refactor: eliminate final wrapper-shadowing hazards (openclaw#122157)
  fix(ui): keep new-session identity anchored (openclaw#122242)
  test(cli): trim duplicate gateway process cases (openclaw#122240)
  fix(media): decode local file URLs safely (openclaw#122192)
  refactor(agents): centralize typed activity event emission (openclaw#122188)
  fix(ui): effort slider matches selected level after model switches (openclaw#122125)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 12, 2026
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 maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ui): keep new-session identity anchored while composer grows

1 participant