Skip to content

improve(ui): unify new-session and chat composer behavior - #133011

Draft
roboclaw-bot wants to merge 1 commit into
mainfrom
roboclaw/issue-132845-composer-parity-v2
Draft

roboclaw-bot wants to merge 1 commit into
mainfrom
roboclaw/issue-132845-composer-parity-v2

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #132845

What Problem This Solves

New Session and active Chat exposed equivalent composer surfaces but applied different editor behavior. New Session could rewrite the controlled textarea during native editing, omitted bidi and keyboard metadata, handled IME/focus/picker interactions differently, and presented Draft/Incognito through separate responsive controls.

Why This Change Was Made

This change gives both hosts one shared composer-editor owner for value synchronization, text direction, IME lifecycle, selection/focus events, keyboard metadata, autosizing, shell focus, and competing-picker dismissal. Chat run/queue behavior and New Session creation/target behavior remain host-owned. New Session visibility now uses one closed Default/Draft/Incognito selector per breakpoint.

The shared owner absorbs the duplicated paths: production code is +348/-389 (net -41). Tests/support are +152/-113, the generated boot manifest is +7, and the assertion baseline shrinks by 2.

User Impact

First-turn drafting now matches active Chat for native undo/redo, IME Enter handling, RTL direction, keyboard accessibility metadata, whole-composer focus, and picker dismissal. Desktop and compact layouts expose one understandable session-mode control without duplicating Draft and Incognito affordances.

Evidence

  • Mocked Chromium: 51 focused Control UI E2E cases pass across the shared editor contract and affected New Session flows.
  • Real Chromium: 4 native undo/redo browser cases pass for both active Chat and New Session.
  • Unit: 36 New Session composer cases pass.
  • Gates: tracked 22-file check:changed, assertion-safety ratchet, boot-manifest regeneration, and full pnpm build pass on current main (6f3ac104995).
  • Autoreview: scoped clean; no accepted/actionable findings (patch is correct, 0.99 confidence).

Mock observation trace:

New Session behavior Before After
Programmatic value writes after typing 16 0
Text direction missing rtl
Keyboard metadata missing Enter
Shell click focuses textarea no yes
Capability menu dismisses slash menu no yes
IME Enter submissions not owned 0

Desktop mode control

Before After
Draft mode shown inside the desktop composer Draft mode shown in the canonical desktop mode selector

Compact mode control

Before After
Separate compact visibility controls before the change One compact Default mode selector after the change

Incognito mode

Before After
Separate desktop Incognito control before the change Incognito in the canonical desktop mode selector

Interaction recordings

New Session desktop — IME handling, picker dismissal, and mode changes:

composer-after-desktop.webm

New Session compact mode:

composer-after-mobile.webm

Active Chat parity:

composer-after-active-chat.webm

@clawsweeper

clawsweeper Bot commented Aug 30, 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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Aug 30, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review August 30, 2026 02:19
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 30, 2026
@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 7, 2026, 6:23 AM ET / 10:23 UTC (Revision 4).

ClawSweeper review

What this changes

The PR shares textarea editing and picker interactions between New Session and active Chat, and replaces separate Draft and Incognito controls with one session-mode selector.

Merge readiness

⛔ Blocked before merge - 4 items remain

Meaningful shared-editor work remains beyond the merged menu and IME fixes. No blocking introduced code defect was established; the protected maintainer item remains valuable.

Priority: P2
Reviewed head: 76903a79d9ffbccf79f87c5186e8444782443be2
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent, net-negative consolidation with useful browser coverage and inspected visual evidence; presentation acceptance and conflict resolution remain separate landing blockers.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The bot-authored PR is exempt from ordinary external-contributor proof requirements. Inspected desktop and compact screenshots demonstrate mode placement; browser test reports supplement editor coverage, while linked recordings were absent from the prepared manifest and were not independently assessed. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The bot-authored PR is exempt from ordinary external-contributor proof requirements. Inspected desktop and compact screenshots demonstrate mode placement; browser test reports supplement editor coverage, while linked recordings were absent from the prepared manifest and were not independently assessed. No stored-data contract changes.
Evidence reviewed 10 items Pinned introduction and owner boundary: The merge-base-to-head delta introduces the shared editor and adopts it in both hosts. Chat retains draft staging, queueing, goals, and sending; New Session retains creation and target selection. This is browser-editor work, with no affirmative dependency on the Codex runtime or protocol.
Current main still has separate editors: Current main renders New Session’s textarea directly and retains separate visibility switches. It already includes guarded value synchronization, keyboard metadata, richer completion handling, and the composition-end guard, but has not adopted this shared editor or selector.
Related merged work is partial: #140633 merged suggestion-menu consolidation and explicitly leaves shared textarea behavior and New Session placement to this PR. #165919 merged the later compositionend-to-confirming-Enter repair; neither replaces the full proposal.
Findings None None.
Security None None.

How this fits together

The Control UI composers turn typed text, attachments, and mode selections into session creation or chat submission. Shared editing behavior sits beneath each host’s separate submission and run lifecycle.

flowchart TD
  A[Text and attachments] --> B[Shared composer editor]
  C[Session mode selector] --> D[New Session host]
  B --> D
  B --> E[Active Chat host]
  D --> F[Create session]
  E --> G[Send or queue message]
Loading

Decision needed

Question Recommendation
Should this editor consolidation also replace the separate Draft and Incognito controls with the proposed Default/Draft/Incognito selector? Keep the unified selector: Adopt one labeled session-mode entry point on desktop and compact layouts while preserving existing privacy and submission semantics.

Why: The screenshots establish the presentation change, but source and tests cannot settle its discoverability tradeoff; no human decision in the supplied discussion resolves it.

Before merge

  • Resolve merge risk (P1) - Replacing exposed Draft and Incognito controls with a selector changes discoverability; no recorded human acceptance resolves the prior presentation question.
  • Resolve merge risk (P1) - The branch has merge conflicts. The resolved candidate needs validation in both hosts while retaining current-main IME event-order protection, completion behavior, and submission controls.
  • Complete next step (P2) - Settle selector presentation, resolve the merge conflicts while preserving current-main composer behavior, and validate both hosts on the refreshed candidate.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source -34, Tests +39, Other -2. Total +3 across 22 files.

View PR surface stats
Area Files Added Removed Net
Source 11 355 389 -34
Tests 10 152 113 +39
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 2 -2
Total 22 507 504 +3

Review metrics

Metric Value Why it matters
Production versus test LOC production +348/-389, net -41; tests/support +152/-113, net +39; generated manifest +7; assertion baseline -2 The shared owner absorbs duplicate production paths while extending browser coverage to both hosts.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #132845
Summary: This PR is the explicit implementation candidate for the linked editor-parity and mode-presentation request; merged neighboring repairs cover only parts of that scope.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Adopt the selector deliberately (recommended)
    Record the presentation choice, resolve conflicts onto current main, and verify both composers on the resulting candidate.
  2. Separate presentation from editing
    Retain existing mode placement and carry forward only the shared-editor consolidation.

Technical review

Best possible solution:

Use one narrow editor owner atop current main, retain host-specific lifecycle behavior, and present session modes through the accepted UI design.

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

Not applicable as one bug reproduction: this combines editor consolidation and a presentation change. The browser regressions were inspected but not run during this read-only review.

Is this the best way to solve the issue?

Yes for the narrow shared-editor boundary: it reuses existing primitives without merging host lifecycles. The selector is a reasonable presentation option whose acceptance remains a product choice.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded composer consistency and editing improvement with meaningful remaining scope.
  • merge-risk: 🚨 other: The introduced selector changes mode discoverability and still needs a presentation decision.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The bot-authored PR is exempt from ordinary external-contributor proof requirements. Inspected desktop and compact screenshots demonstrate mode placement; browser test reports supplement editor coverage, while linked recordings were absent from the prepared manifest and were not independently assessed. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The bot-authored PR is exempt from ordinary external-contributor proof requirements. Inspected desktop and compact screenshots demonstrate mode placement; browser test reports supplement editor coverage, while linked recordings were absent from the prepared manifest and were not independently assessed. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduction and owner boundary: The merge-base-to-head delta introduces the shared editor and adopts it in both hosts. Chat retains draft staging, queueing, goals, and sending; New Session retains creation and target selection. This is browser-editor work, with no affirmative dependency on the Codex runtime or protocol. (ui/src/pages/chat/components/composer-editor.ts:47, 76903a79d9ff)
  • Current main still has separate editors: Current main renders New Session’s textarea directly and retains separate visibility switches. It already includes guarded value synchronization, keyboard metadata, richer completion handling, and the composition-end guard, but has not adopted this shared editor or selector. (ui/src/pages/new-session/composer.ts, 8f436000418b)
  • Related merged work is partial: refactor(ui): share composer suggestion menu behavior #140633 merged suggestion-menu consolidation and explicitly leaves shared textarea behavior and New Session placement to this PR. fix(ui): stop IME confirmation from starting a new session #165919 merged the later compositionend-to-confirming-Enter repair; neither replaces the full proposal. (ui/src/pages/new-session/composer.ts, 9eb998b7d1b0)
  • Rendered regression coverage: The shared editor suite exercises RTL direction, shortcut metadata, composition-time Enter suppression, picker dismissal, and shell focus in both hosts. The native Chromium suite extends undo/redo and value-write checks to New Session. Tests were inspected, not executed during this read-only review. (ui/src/e2e/composer-editor-contract.e2e.test.ts:25, 76903a79d9ff)
  • Lit value-binding contract: Direct upstream inspection confirms guard skips updates for unchanged dependency values and live skips property writes when the DOM already holds the requested value. The PR moves Chat’s existing combination into the shared editor; no dependency version changes. (packages/lit-html/src/directives/guard.ts:26, 01dbc6673cdc)
  • Inspected visual evidence: Opened all four prepared images: before/after desktop Draft placement and before/after compact controls visibly demonstrate the selector change. The manifest contains no prepared recordings or contact sheets, so keyboard and IME recording claims were not independently inspected. This is a reviewer coverage limit, not missing contributor evidence inferred from omission. (76903a79d9ff)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vyctor H. Brzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record acceptance of the selector presentation or retain existing mode placement.
  • Resolve conflicts while preserving current-main composer features, then validate editing, IME confirmation, picker behavior, and submission in both hosts.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-30T02:25:04.900Z sha 76903a7 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-30T03:14:48.881Z sha 76903a7 :: needs maintainer review before merge. :: none
  • reviewed September 22, 2026, 9:49 AM ET / 13:49 UTC (Revision 3) sha unknown :: blocked before merge. :: none

This branch has not been deployed

No deployments
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 merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Unify New Session and active chat composer interaction contracts

1 participant