Skip to content

improve(ui): refine new-session context pickers - #197820

Merged
vyctorbrzezowski merged 11 commits into
mainfrom
brzezowski/composer-context-tray
Nov 13, 2026
Merged

vyctorbrzezowski merged 11 commits into
mainfrom
brzezowski/composer-context-tray

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

New-session machine, project, and checkout controls need to stay easy to reach without taking over the composer when opened.

User Impact

The controls sit together below the composer on desktop and above it on phones. Each opens a compact menu with searchable choices, usable folder navigation, and concise checkout fields.

Why This Change Was Made

Use the shared native Popover for anchoring, focus, and dismissal. Keep the refined grouped lists and pinned Browse folders action, remove the expanding tray panel, and reserve Back for actual folder navigation. Checkout keeps editable branch suggestions, optional naming, validation, and unavailable-state messages.

Evidence

  • Production Control UI build passed.
  • 31 focused tests passed: picker import recovery, dismissal/focus restoration, checkout choices and branch input, and browser project registration.
  • Canonical English verification, formatting, targeted lint, and stylesheet lint passed. Targeted lint retains the existing props.kind reactivity warning.
  • Independent review found no actionable P0–P2 findings.
  • The initial author run could not complete the full UI typecheck because of a dependency declaration guard. The maintainer run below subsequently passed the UI and E2E typechecks in the isolated checkout.
  • No new tests that freeze visual dimensions or colors.

Screenshots show the native Control UI with synthetic Gateway fixtures. After captures are from published commit ec5a50877fa2352c1c4decd70de5e659beecdfe9; the original native before captures are retained. The new phone captures use mobile/touch emulation with a coarse pointer; worktree inputs retain a 40px height.

Scenario Before After
Machine picker · 1440×900 · dark Machine picker before Machine picker after
Project picker · 1440×900 · dark Project picker before Project picker after
New worktree · 1440×900 · dark Checkout before Checkout after
Project picker · 390×900 · dark Mobile project picker before Mobile project picker after
New worktree · 390×900 · dark Mobile checkout before Mobile checkout after

Light-theme checkout and folder navigation:

Checkout · light Folder navigation · dark
Light checkout after Folder navigation after

Maintainer validation

The compact tray and popover design is preserved. A device-folder form could be taller than its fixed row at desktop and landscape widths, leaving the input partly behind the composer. That row now wraps and sizes to its content only when the form is present; the phone layout is unchanged.

Search keeps its native action buttons and keyboard focus. The active button is explicitly owned by the searchbox for accessible focus, and ordinary typing no longer scans or sorts all options. The existing selection and IME paths remain intact.

Validation on the repaired candidate:

  • Seven browser cases, four built-UI device-folder cases and 25 adjacent picker/checkout/registration cases passed.
  • UI typecheck, scoped lint, formatting, stylelint, i18n verification and independent P0–P2 review passed.
  • The existing device-folder E2E now verifies vertical containment at 1440, 844 and 390 pixels and preserves its successful creation payload assertions.
  • Obsolete full-width, exact-height and cosmetic assertions were removed; selection, viewport containment, composition and Escape/focus coverage remain.

These captures use the real Control UI with synthetic Gateway data. The separate isolated real-Gateway check also passed: project search and keyboard selection led to a real sessions.create, and the result plus a subsequent project/workspace-filtered read confirmed the correct project and directory. The /status command completed successfully with zero model-provider calls. Current-head CI is still in progress. Existing adjacent test fixtures emit Solid diagnostics; the actual UI reproduction reported no page errors.

Existing folder on device Before repair After repair
Desktop Device folder desktop before repair Device folder desktop after repair
Landscape Device folder landscape before repair Device folder landscape after repair

Current-main integration and keyboard viewport

The final repair is published at 9084f98831f9d3c9ef55da8dc266311a1264d714. With a long draft and the three phone control rows, the composer could extend 7 px past the keyboard's visible viewport. The existing viewport owner now exposes its visible height separately from its panned layout extent; the compact composer yields available space to the tray and Send button. No extra observer, timer, or application state was added, and a roomier viewport still permits the editor to grow.

The integrated build also uses the existing Solid element type for the new composer slot and updates only affected test consumers of the approved picker layout. Selection, creation payloads, validation, focus, composition and viewport containment remain covered; obsolete exact row-count and cosmetic geometry checks were removed.

  • The affected E2E run passed 63 of 65 cases; the two failures were old responsive-layout expectations. After correcting those expectations, all 8 keyboard/responsive cases passed.
  • Six short/long-draft and viewport-pan combinations fit within the visible area. A separate 600 px visible-height case confirmed editor growth and an unobscured, hittable Send button.
  • All 12 viewport-owner tests passed, including cleanup on zoom and disposal.
  • UI and E2E typechecks, scoped lint, formatting, stylesheet lint and the test-line gate passed.
  • A fresh high-effort independent review of the integrated repair found no actionable P0–P2 issues.
  • The earlier real-Gateway project-selection/create/readback proof remains applicable: the later repair changes layout and a type annotation, not the creation path.

The pair below is the actual Control UI with synthetic test data and a simulated keyboard viewport, cropped to its 380 px visible area. It is browser evidence, not a physical iPhone capture.

Keyboard open, long draft Before repair After repair
Visible composer and controls Keyboard viewport before repair Keyboard viewport after repair

Full CI on the final head is still pending. The approved size-budget exception is separate from the passing behavioral checks above.

@clawsweeper

clawsweeper Bot commented Nov 12, 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. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR moves New Session placement controls below the composer and restyles their pickers.

Example: Open New Session at 1440×900 with project openclaw and branch main selected.

  • Before: Machine, project, and checkout controls appear above the composer.
  • After: The controls appear in an attached tray below the composer, with desktop pickers expanding from it.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Strong visual evidence supports the intended design, but two source-verifiable layout regressions block merge.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after desktop screenshots and linked desktop and phone picker screenshots show the rendered New Session tray, selected project, search header, grouped inventory, and pinned Browse action.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Placement controls and their menus feel visually separate from the prompt they configure.
Reason: The maintainer-authored direction groups session context with the composer while retaining existing selection operations, and inspected screenshots demonstrate the intended visual result.

Merge readiness

⛔ Needs changes before merge - 3 items remain

Keep this maintainer-authored draft open. The tray direction is supported by visual evidence, but two introduced layout regressions need correction before merge.

Priority: P2
Reviewed head: df42f5f97ba4ca1a8858e351efbb33aa22ee7631

Before merge

  • Preserve upward placement for docked landscape screens (P2) - At 844×390, the existing short-landscape media query docks the composer near the bottom, but this min-width:769px rule also applies. It anchors the picker to the tray's top, disables every placement fallback, and removes the surface height limit. Consequently the project or machine picker expands below the viewport rather than flipping above, leaving its choices and footer inaccessible. Exclude the existing short-landscape docked range from desktop tray positioning and retain a viewport-constrained surface.
  • Allow the device-folder path form to occupy another row (P2) - Selecting Existing folder on device still renders the path label, input, and explanatory text as a direct child of this row. On phones, the existing .new-session-page__triggers > .new-session-page__menu-field rule gives that form flex:1 0 100%. With flex-wrap:nowrap, it must now sit beside the machine and workspace controls instead of below them, overflowing the available width; height:36px also fails to reserve room for its multiline content. Preserve wrapping and content-driven height for this specialized form while keeping ordinary picker chips inline.
  • Explain or restore the original intent of Device-folder form layout - 2c87e33: Provide an editable existing-folder path with explanatory text on a dedicated full-width row.

Findings

  • [P2] Preserve upward placement for docked landscape screens — ui/src/styles/new-session.css:1880-1887
  • [P2] Allow the device-folder path form to occupy another row — ui/src/styles/new-session.css:1574-1579

Provenance

  • Device-folder form layout changes intended behavior without addressing why it exists (2c87e33: Provide an editable existing-folder path with explanatory text on a dedicated full-width row.)
Agent review details

How this fits together

The Control UI renders placement choices from the existing draft-place owner; picker selections update that owner before session creation.

flowchart TD
  A[New Session page] --> B[Composer and context tray]
  B --> C[Shared session picker]
  C --> D[Machine project and checkout content]
  D --> E[Draft place owner]
  E --> F[Session creation]
Loading

Technical review

Best possible solution:

Keep the existing placement and overlay owners, align tray positioning with the docked-layout breakpoint, and let specialized path forms expand onto their own row.

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

Source establishes both failing paths: an 844×390 landscape viewport matches docked and desktop-tray rules simultaneously, and a 390px device-folder form retains a nonshrinking full-row flex basis inside the new non-wrapping row; no target code was run.

Is this the best way to solve the issue?

Reusing the existing composer, placement owner, shared picker, and scroll observer is appropriate; the smallest complete implementation also preserves viewport containment and full-width specialized forms.

Full review comments:

  • [P2] Preserve upward placement for docked landscape screens — ui/src/styles/new-session.css:1880-1887
    At 844×390, the existing short-landscape media query docks the composer near the bottom, but this min-width:769px rule also applies. It anchors the picker to the tray's top, disables every placement fallback, and removes the surface height limit. Consequently the project or machine picker expands below the viewport rather than flipping above, leaving its choices and footer inaccessible. Exclude the existing short-landscape docked range from desktop tray positioning and retain a viewport-constrained surface.
    Confidence: 0.98
  • [P2] Allow the device-folder path form to occupy another row — ui/src/styles/new-session.css:1574-1579
    Selecting Existing folder on device still renders the path label, input, and explanatory text as a direct child of this row. On phones, the existing .new-session-page__triggers > .new-session-page__menu-field rule gives that form flex:1 0 100%. With flex-wrap:nowrap, it must now sit beside the machine and workspace controls instead of below them, overflowing the available width; height:36px also fails to reserve room for its multiline content. Preserve wrapping and content-driven height for this specialized form while keeping ordinary picker chips inline.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Composer placement and workspace grouping changes intended behavior with a stated reason (93a965f: Group repository and checkout without changing independent pickers or specialized placement behavior, as documented in improve: group New Session agent and workspace controls #175255.)
  • Shared picker lifecycle and lazy content keeps the original intent (d52b6a7: Consolidate trigger and popover wiring while preserving selection-before-dismissal and focus behavior; later lazy loading deferred picker bodies.)
  • Project grouping and shared headings changes intended behavior with a stated reason (f33f9c1: Make saved repositories distinguishable and searchable while retaining the search header above the scrolling inventory; the PR explains its revised grouping and pinned Browse action.)
  • Constrained viewport placement changes intended behavior with a stated reason (0044f25: Reject cramped space below a mobile trigger so the picker can flip above, documented in fix(ui): open the mobile Where picker above when space below is short #194374.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm exec vitest run --config ui/vitest.config.ts ui/src/pages/new-session/placement-controls.browser.test.ts
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/mobile-new-conversation.e2e.test.ts ui/src/e2e/new-session-page.device-folder.e2e.test.ts
  • pnpm tsgo:ui
  • pnpm lint:ui:styles
  • git diff --check

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 4a29006 adds ui/src/pages/new-session/where-picker-content.tsx:66 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4a29006e89e7; files: ui/src/pages/new-session/where-picker-content.tsx)
  • Peter Steinberger: Raw commit d52b6a7 adds ui/src/pages/new-session/picker.tsx:33 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d52b6a796eaf; files: ui/src/pages/new-session/picker.tsx)
  • Ayaan Zaidi: Raw commit 2c87e33 adds ui/src/pages/new-session/target-controls-view.tsx:343 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2c87e3339901; files: ui/src/pages/new-session/target-controls-view.tsx)

PR surface

Source +441, Tests +22. Total +463 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 611 170 +441
Tests 1 39 17 +22
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 650 187 +463

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:

No label changes.

Label justifications:

  • P2: The introduced layout defects affect short landscape screens and specialized device-folder placement, with limited blast radius.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • 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.

Reviewed November 12, 2026, 11:25 AM ET / 16:25 UTC.

@vyctorbrzezowski vyctorbrzezowski changed the title improve(ui): move new-session context pickers into a tray below the composer improve(ui): refine new-session context pickers Nov 13, 2026
Fit the device-folder form beneath the compact controls, connect active-descendant ownership, avoid option scans for ordinary typing, and retain behavioral coverage without freezing the replaced layout.

Co-authored-by: vyctorbrzezowski <[email protected]>
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review November 13, 2026 21:05
vyctorbrzezowski and others added 2 commits November 13, 2026 18:16
Project visible height from the existing viewport owner, let the compact editor yield to its controls, and reconcile current-main types and behavioral test consumers without changing the approved tray design.

Co-authored-by: vyctorbrzezowski <[email protected]>
@vyctorbrzezowski
vyctorbrzezowski merged commit e80a6dd into main Nov 13, 2026
102 of 104 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/composer-context-tray branch November 13, 2026 21:37
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
Group machine, project and checkout controls into compact searchable menus. Preserve native keyboard ownership, device-folder containment, and usable composer controls while the software keyboard is open.

Co-authored-by: vyctorbrzezowski <[email protected]>
daniel-lxs added a commit to daniel-lxs/openclaw that referenced this pull request Nov 16, 2026
openclaw#197820 removed the project search status line and the browser list
loading line from the new-session pickers, but their styles stayed.
Removing them pays for the narrow dashboard layout in the CSS budget.
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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL 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