Skip to content

improve: render chat composer mentions inline - #192242

Merged
vyctorbrzezowski merged 13 commits into
mainfrom
roboclaw/composer-inline-mentions-20261103
Nov 13, 2026
Merged

vyctorbrzezowski merged 13 commits into
mainfrom
roboclaw/composer-inline-mentions-20261103

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Selected people should behave as whole inline mention chips, not an avatar followed by an independently editable name or a painted overlay. Earlier revisions also lost recipient identity during some editing/history operations.

User Impact

Chat and New Session show one atomic avatar-and-name chip using the sent-reference styling. The caret cannot enter its letters; selection and deletion respect the whole chip. The extra “Will notify” strip is removed. Raw messages and clipboard text remain canonical @Name text with selected recipient spans. No new dependency or configuration change.

Straight and curly possessives attach directly after selecting a person. Read-only/disabled composers reject rich paste and composition mutations. Undo/redo preserves recipient identity for repeated names and across the first native-to-editor handoff, including same-text selection.

Why This Change Was Made

The existing lazy CodeMirror editor owns layout, selection, history, clipboard, and composition. The hidden textarea is only the established raw-value/controller port; it is not a visible overlay. Current-main integration preserves the moved dictation owner and lazy reply preview, and routes remaining focus/selection callers through the shared editor bridge.

Requested by @Patrick-Erichsen, with @vyctorbrzezowski’s atomic-editing and manual-testing requirements. The possessive issue was reported by @vincentkoc.

Work sessions

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

Author response to the acceptance report

Current head: a7bb4e2d44ef41de71f8451f761ab7dcbe214973. The report below was run on 4ae188c3 and is unchanged. Two commits follow it: 005d8712 fixes the report's three findings, and a7bb4e2d applies an independent review. Neither has been retested in the macOS app, in Safari or on a phone.

The report's three findings

Finding Cause Fix
1. Backspace also navigates back (macOS app) The editor forwards each key to the hidden textarea as a copied event. Copying the whole event also copied WebKit's legacy keyIdentifier, and WebKit runs default actions for an untrusted keydown that carries it: Backspace goes back in history, Tab moves focus. Forwarded keys are built from named fields only.
2. Safari drag moves part of the selection WebKit delivers a fast first mousemove before dragstart. CodeMirror treats a move of 10 px or more as a new selection, so the drag started with a smaller selection. The editor remembers the selection that was grabbed and restores it at dragstart. A press that ends without a drag forgets it.
3. Long names clip at 320/390 px Chips were white-space: nowrap. A chip is one inline box. It moves to the next line whole, and a name wider than the composer wraps inside it.

Long name in a narrow composer, before and after:

Before: long mention name clipped at the composer edge

After: long mention name wraps inside its chip

Independent review

An isolated read-only reviewer agent read cda0b61a..005d8712, focused on the code changed since the earlier full review and on iOS and WKWebView risks. It ran nothing. Outcome: no P0, two P1 and eight P2. This was not a local ClawSweeper or autoreview run; a hosted ClawSweeper review is still due when the PR leaves draft.

Fixed in a7bb4e2d, each with a test that fails on 005d8712:

  • Backspace dead key. Backspace beside a separator the chip needs put the caret back where it was, so every further press did nothing. It now steps over the separator.
  • Unreadable selection. Selected text in the rich editor used CodeMirror's light default, which is light on light in the dark theme. It now uses the app selection color, focused and blurred.
  • Mobile resting capsule. After sending a message with a mention, the retained empty editor kept its full height in the one-line capsule. It now rests like the textarea.
  • Undo after send. A native snapshot from before the owner cleared a sent draft could seed undo history when the next mention was inserted without typing. A snapshot is now used only when the selection replaced it. Accepted edge: a sent draft ending in a plain @word still passes.
  • Stale grabbed selection. A tap inside a selection could leave a selection for a later touch drag to restore.
  • Dragged move reported as typing. A move now reports insertFromDrop.
  • Scrollbar. scrollbar-width: thin made Chromium ignore the app's 8 px scrollbar that the overflow padding assumes. With real scrollbars the old head measured a 10 px bar against 8 px of padding; the new head measures 8 against 8. This one has no automated test, because headless Chromium hides scrollbars.

Selection in the dark theme, before and after:

Before: selected text is light on a light highlight

After: selected text on the app selection color

Rejected, with reasons:

  • "Programmatic focus into the editor never sets mobile editing" (P1). The editor's content element carries contenteditable="true", which the existing check already matches. Confirmed in a browser.
  • "A paste replayed after the editor chunk loads can land in the next draft" (P2). This needs a first-ever recipient paste, a slow chunk load and a send in between. The result is visible and recoverable, and a guard would add always-loaded code.

Named by the review as worth checking on a device, not confirmed as bugs:

  • IME composition next to a chip on iOS keyboards.
  • Whether the software keyboard stays up when the first mention mounts the editor on iPhone.
  • Caret position in the macOS app, where each selection change also writes to the hidden textarea.

Proof on this head

  • 124/124 unit cases and 145/145 Chromium browser cases passed, with UI types, lint, CSS lint, format and the test-line ratchet.
  • WebKit 27.2 (Playwright's Linux build, not Safari or the macOS app), using the shipped editor module: Tab from the editor lands on the next stop (two stops away on 4ae188c3), and the reported drag moves the whole selection (A@Alice Morgan right-side-endBC on 4ae188c3). Finding 1 was not reproduced as back navigation, only through this shared Tab mechanism.
  • The repository's WebKit browser-test lane could not connect on this host, so the browser suites ran in Chromium only.

Asset size

  • Against the branch base cda0b61a, pnpm ui:check-performance:base passes: Chat boot JS +693 B, New boot JS +819 B, total CSS +40 B gzip and +50 B raw.
  • Against main 5cef30a3 it fails (local trial merge, not pushed):
    • Chat boot JS measures 1,303,841 B against a 1,303,711 B limit, 130 B over. This PR adds 882 B there.
    • New boot JS on main alone measures 806,388 B against its 805,886 B cap, so only 64 B of growth is allowed. This PR adds 623 B.
  • No thresholds were raised. This needs an owner budget decision or a reduction before the PR can pass that check. Local sizes can differ from CI by a few hundred bytes.

Other points from the report

  • Twelve-ID synthetic clipboard. Intended. The composer cannot hold more than 10 recipients, so it never writes such a clipboard. Foreign metadata that claims more than 10 is rejected as a whole and pastes as plain text. Pasting into a draft that would exceed 10 keeps the existing recipients and binds only up to the limit, which is the 10+2 case that passed. The original handoff wording for item 6 was wrong.
  • Attachment focus (item 15). Also on main, as the report says. Not changed here.

Inline composer mentions — full test report

Two editing regressions and one visual regression were confirmed against main. I would not consider the tested head ready to merge. No fixes were made during testing. These results apply to the exact revision below, not automatically to later changes.

Scope and environment

  • Candidate: 4ae188c349e1ba45e9ef7a9e5bfcdabd482e52eb, branch roboclaw/composer-inline-mentions-20261103.
  • Matched main: fb83d658cf3b6257a43b322c1e701ba757a0d546.
  • Real isolated Gateways, authentication, sends, durable history and authenticated recipient Inbox reads. Only the model was a local response stub. Provider/model behavior was not validated.
  • 24 synthetic profiles covered a crowded picker, duplicate display names, a long name, non-Latin names, photos/initials and a failed-photo fallback. Recipient IDs, not just display labels, were checked.
  • Chrome 157.0.8103.39 headless on macOS 27.0.1, plus Chrome 157.0.8103.79 with real OS keyboard/mouse in a disposable macOS 26.6.2 VM.
  • Firefox 160.0: headed native-OS lanes plus separate headless WebDriver lanes. Safari 26.6.2: actual Safari, native-OS and separate WebDriver observations.
  • Actual macOS app 2026.11.3, build 2611000390, built at candidate, on macOS 26.6.2. Native A/B held the executable constant while UI/Gateway switched between main and candidate. SHA-256: a1d2188e763cd2bdb3ed1708dd5e90b89173ac7396a05e0f3c446f199bb1ac89. No apps/macos source difference exists between the compared revisions.
  • The app's shared-password Owner fixture cannot send bound human mentions without a signed-in human. Main has the same policy. Native delivery items 1/2/21 remain unqualified; this does not excuse unrun editing/layout tests.

Coverage

92 rows: 23 handoff items × 4 surfaces, each with Chat and New Session results. These are coverage cells, not test-execution counts.

PASS: applicable subcases supported. FAIL: contrary result observed; notes identify pre-existing behavior. NT / partial: whole item remains not tested, but some subcases passed. NT: not qualified as a whole, including blocked setup. N/A: explicitly inapplicable. Partial coverage never becomes a whole-item pass.

Across 184 cells: 67 PASS, 7 FAIL, 110 not tested, including 6 N/A. Seven failing cells represent the three new findings and the pre-existing Chrome attachment-focus behavior in both contexts, not seven new defects.

New Session has no conversation prediction/history or pre-creation split-pane surface. No dedicated focus-composer shortcut was identified in the inspected catalog. Mention/slash/skill menus use composer-wide anchors; emoji uses the caret. These applicability/design facts are not failures.

The undo acceptance sequence was: type hi @al, select Alex, undo back to hi @al, then redo the same recipient chip; separately cut/undo a chip and verify that undo after sending does not resurrect the sent draft. Boundary checks used 's, ’s and an immediately following letter. Clipboard checks distinguish copied chip metadata from plain external @Name text. For IME, only observed marked composition and its committed result counted.

Chrome

# Handoff item Chat New Session Evidence boundary / remaining gap
1 Pick and send PASS PASS Correct recipients, durable sends and authenticated Inbox receipts.
2 Same-name recipients PASS PASS Both Alex IDs survive edits; each receives the same message.
3 Undo/redo, cut, post-send undo PASS PASS Undo/redo, native cut/undo and empty post-send undo verified.
4 Clipboard round trips PASS PASS Same composer, another Chat, New/second tab and TextEdit verified; plain return does not notify.
5 First paste after reload PASS PASS Empty reload followed by first OS paste restores IDs.
6 More than ten mentions NT / partial NT / partial Normal 10+2 paste retains 12 names / 10 bindings. Literal 12-ID clipboard remains separate; see diagnostic below.
7 Text and file drag-and-drop NT / partial PASS Chat: cross-split and Finder pass; internal Chat OS drag not repeated. New: internal drag and Finder pass; pre-creation split not applicable.
8 IME composition PASS PASS Real Japanese marked composition before/after chip and in restored draft passes.
9 Unavailable editor / recovery NT / partial PASS Chat: picker/recovery pass, blocked OS paste missing. New: unbound paste, negative Inbox receipt and explicit-reload recovery pass.
10 Atomic chip editing PASS PASS Arrows, Backspace and whole-chip selection verified.
11 Possessive / letter boundaries PASS PASS Straight/curly possessives attach; a following letter gets a space.
12 Send keys, prediction, history PASS PASS Send preferences and unindented newline pass; Chat prediction/history pass. Those two are not applicable to New.
13 Menus with a chip PASS PASS Keyboard operations preserve IDs. Mention/slash/skill anchor to composer; emoji anchors to caret.
14 OS text services NT NT Spellcheck/autocorrect, text replacement, OS emoji picker and dictation not fully exercised with chips.
15 Focus and tab order FAIL FAIL FAIL also on main: attachment removal focuses BODY; attachment-menu Escape focuses trigger. Click/type-to-focus and common tab order verified.
16 Growth and scrolling PASS PASS 80-line draft grows/scrolls; text x stays within 1 px; horizontal scroll stays zero.
17 Narrow / landscape / short panes FAIL FAIL Long names clip at 320/390 px (finding 3); landscape and short-pane observations retained.
18 Placeholder PASS PASS Hidden with chip, restored when empty.
19 Pending, locked, themes, Incognito NT / partial NT / partial Chat: real role downgrade disables edits and preserves ID; remote pending/Incognito incomplete. New: themes/Incognito observed, locked/pending missing.
20 Draft persistence PASS PASS Chat reload/switch/split preserve text/IDs. New reload/switch/send-to-Chat preserve IDs; no pre-creation split.
21 Queued mentions PASS NT Chat: hold model, queue, release, verify recipient receipt. No pre-creation New queue qualified.
22 Large drafts and paste PASS PASS 100,012-character OS paste and later typing preserve text/ID; no captured window errors. Not a benchmark.
23 macOS-only interactions N/A N/A Not applicable: item targets macOS app.

Safari

# Handoff item Chat New Session Evidence boundary / remaining gap
1 Pick and send PASS PASS Native send and authenticated recipient receipts verified.
2 Same-name recipients PASS PASS Both Alex IDs selected/edited; both recipients receive the message.
3 Undo/redo, cut, post-send undo NT NT / partial Chat: full sequence not run. New: selection undo/redo and cut/undo pass; post-send undo missing.
4 Clipboard round trips PASS PASS Native same/other-chat, New/second-tab and TextEdit round trips pass; plain return does not notify.
5 First paste after reload NT / partial PASS Chat: fresh-conversation paste observed, but empty-reload first input not qualified. New: empty-reload paste passes.
6 More than ten mentions NT / partial NT / partial 10+2 retains names / capped bindings. A single 12-mention clipboard was not qualified.
7 Text and file drag-and-drop FAIL NT / partial Chat: partial movement with matched gesture (finding 2); cross-split missing. Finder passes both; internal New drag incomplete.
8 IME composition NT NT Blocked qualification: Japanese sequence also fails in independent Safari textarea; no PR IME defect inferred.
9 Unavailable editor / recovery NT NT / partial Chat not run. New: genuine 404 gives visually plain paste and reload recovery; no negative-recipient proof for that paste. Picker send delivers correctly.
10 Atomic chip editing PASS PASS Generic arrow/delete plus native Shift+arrow/double-click clipboard proof.
11 Possessive / letter boundaries NT / partial NT / partial Possessives pass; immediate following letter not separately qualified.
12 Send keys, prediction, history PASS PASS Send preferences/newline pass; Chat prediction/recall pass. Those integrations are not applicable to New.
13 Menus with a chip NT / partial NT / partial Keyboard operations, including native /name activation, pass; complete visual positioning audit missing.
14 OS text services NT NT OS text-service set not exercised with chips.
15 Focus and tab order NT / partial NT / partial Type-to-focus preserves ID; full Tab/Shift+Tab and menu/attachment return incomplete.
16 Growth and scrolling NT / partial NT / partial Vertical growth/scroll passes; before/after text x-position not measured.
17 Narrow / landscape / short panes NT / partial NT / partial Native responsive mode at 320/390 and landscape observed; short pane and conclusive clipping audit not closed for this surface.
18 Placeholder PASS PASS Hidden with chip, restored when empty.
19 Pending, locked, themes, Incognito NT NT / partial Chat state set not run. New themes/Incognito observed; locked editor and genuinely pending session missing.
20 Draft persistence NT / partial NT / partial Reload passes. Chat switch/split missing; New switch/return and creation handoff not qualified as persistence tests.
21 Queued mentions NT NT Chat queue not run; no pre-creation New queue qualified.
22 Large drafts and paste NT / partial NT / partial 100,012-character native paste/readback and typing pass; console/window errors not instrumented.
23 macOS-only interactions N/A N/A Not applicable: item targets macOS app.

Firefox

# Handoff item Chat New Session Evidence boundary / remaining gap
1 Pick and send PASS PASS Native send and authenticated recipient receipts verified.
2 Same-name recipients PASS PASS Both same-name IDs survive edits and receive the message.
3 Undo/redo, cut, post-send undo PASS PASS Final native cut/undo plus initial undo/redo and post-send proof close both.
4 Clipboard round trips PASS PASS Final same/other-chat, New/second-tab and TextEdit passes close both; plain send has no mention/Inbox.
5 First paste after reload PASS PASS Empty reload followed by first native paste restores IDs.
6 More than ten mentions NT / partial NT / partial 10+2 retains names / capped bindings. Single 12-mention clipboard not qualified.
7 Text and file drag-and-drop NT NT Native internal/cross-split/file-drop set unqualified; unsuccessful driver drag is not a product verdict.
8 IME composition NT / partial PASS Chat: genuine before-chip Japanese passes; after/restored Chat missing. New: after-chip and restored-before-chip pass. Invalid later attempt excluded.
9 Unavailable editor / recovery NT NT / partial Chat unqualified. New healthy paste passes; cached rich editor survives server 404, so fallback/recovery unqualified.
10 Atomic chip editing PASS PASS Arrows/delete, Shift+arrow and explicit whole-chip double-click pass.
11 Possessive / letter boundaries PASS NT / partial Chat passes all. New possessives pass; immediate following letter missing.
12 Send keys, prediction, history PASS PASS Send preferences/newline pass; Chat prediction/history restoration pass. Prediction/history not applicable to New.
13 Menus with a chip NT / partial NT / partial Keyboard selection including /name preserves IDs; complete visual anchoring audit missing.
14 OS text services NT NT OS text-service set not exercised with chips.
15 Focus and tab order NT / partial NT / partial Type-to-focus preserves ID with correctly shifted offsets; full tab order and menu/attachment return missing.
16 Growth and scrolling PASS PASS Final height 26→252 px Chat /214 px New; firstTextX unchanged at 343 /397.2333 px.
17 Narrow / landscape / short panes NT NT Driver kept innerWidth 500 when asked for 320/390; target widths and short pane unqualified.
18 Placeholder PASS PASS Hidden with chip, restored when empty.
19 Pending, locked, themes, Incognito NT NT Pending/locked, themes and Incognito set not run.
20 Draft persistence NT / partial NT / partial Reload passes. Chat switch/split missing; New send handoff passes, switch/return missing.
21 Queued mentions NT NT Chat queue not run; no pre-creation New queue qualified.
22 Large drafts and paste PASS PASS Native 100,012-character paste, exact text/ID, suffix and no captured window errors verified; not a benchmark.
23 macOS-only interactions N/A N/A Not applicable: item targets macOS app.

macOS app

# Handoff item Chat New Session Evidence boundary / remaining gap
1 Pick and send NT NT / partial New visibly selects/renders chip. Bound delivery needs signed-in human; shared Owner blocks it on both revisions.
2 Same-name recipients NT NT Same-name delivery unqualified: shared Owner cannot send bound human mentions.
3 Undo/redo, cut, post-send undo NT / partial NT / partial Native undo/redo and cut/undo observed; undo after bound-chip send missing. Plain-send undo control stays empty.
4 Clipboard round trips NT / partial NT Chat: incoming chip and plain TextEdit round trip observed; remaining destinations and authenticated bound delivery missing. New set not run.
5 First paste after reload NT NT Empty reload followed by first chip paste not run.
6 More than ten mentions NT NT Normal overflow and literal 12-mention clipboard unqualified.
7 Text and file drag-and-drop NT NT Internal/cross-pane/external file/text drag set not run.
8 IME composition NT NT Before/after/restored marked composition unqualified.
9 Unavailable editor / recovery NT NT / partial Chat unqualified. New healthy chip observed; cache and pairing-dialog focus prevent qualified 404 fallback/recovery.
10 Atomic chip editing FAIL FAIL Backspace also navigates backward in both (finding 1). Arrow jump/whole-chip selection pass.
11 Possessive / letter boundaries PASS NT Chat possessives/following-letter space pass. New not run; final-new filenames actually identify Chat in AX.
12 Send keys, prediction, history NT NT Send-setting/newline set not run; Chat prediction/history not run, not applicable to New.
13 Menus with a chip NT NT Complete keyboard menu set not run.
14 OS text services NT NT / partial New spelling/substitution/speech menus and visible autocorrection observed; dictation, replacement and OS emoji picker missing. Chat not run.
15 Focus and tab order NT NT Click/type-to-focus, tab order and menu/attachment return incomplete; no dedicated focus-composer shortcut identified.
16 Growth and scrolling NT NT Growth/scroll/lateral movement not measured.
17 Narrow / landscape / short panes NT NT 320/390, landscape and very short pane not run.
18 Placeholder NT NT Hide/restore placeholder not run.
19 Pending, locked, themes, Incognito NT NT Pending/locked, themes and Incognito set not run.
20 Draft persistence NT NT / partial New reload retains chip/text; Forward restores draft after back navigation. Other transitions missing; Chat sequence not run.
21 Queued mentions NT NT Bound queued delivery unqualified: shared Owner needs signed-in human.
22 Large drafts and paste NT NT Large paste, later typing and error observations unqualified.
23 macOS-only interactions NT NT / partial New spelling menu and Cmd+Z/Shift+Cmd+Z observed; external text/file drag missing. Full Chat set not run.

Finding 1 — Backspace also navigates backward in the macOS app

Severity: major. Surface: actual macOS app; Chat and New Session. Versions and exact candidate/main heads are above. This is a navigation/editing regression, not demonstrated permanent text loss.

  1. Visit a Chat, then open New Session so Back has a previous destination.
  2. Type ab @Ali, choose Alice Morgan through the real picker, then append cd. Complete draft: ab @Alice Morgan cd.
  3. Focus the native accessible text area and put the caret immediately after the mention (exported AX caret [16,16]).
  4. Press native Backspace without modifiers. A control also used a CGEvent with empty modifier flags.
  5. Repeat in Chat with New Session as its preceding history entry. Use Forward to inspect the retained draft.

Expected: remove the whole mention and remain editing on the same screen.

Actual: the chip is removed and the app navigates to the previous page. Deleting an ordinary character with the rich mention editor active also reproduced navigation.

Frequency/control: candidate 2/2 New Session, 2/2 Chat. Main stayed in the current screen in both controls. Executable, shared-password setup and enabled prediction were held constant. Main's older text representation deletes a character rather than a chip; the matched invariant is no navigation, not identical token deletion.

Native state:

Before: ab @Alice Morgan cd
After Forward: ab  cd
New case AX label: "What should this session work on?" → "Chat composer".
Chat case: inverse navigation.

Forward recovered the edited draft. No send occurred. AX observations/screenshots support this result; no equivalent DOM dump or JavaScript console capture exists for this exact sequence. Cause was not isolated or fixed.

Receipt identity: native-backspace-ab/receipt.json, candidate/main before-and-after AX records, and matched images.

Native Backspace: matched main and candidate

Finding 2 — A native Safari drag moves only part of the selection

Severity: major. Safari 26.6.2 on macOS 26.6.2; Chat; real OS input and real Gateway. Candidate/main heads are above.

  1. Select Alice Morgan through the real picker and create exactly ABC @Alice Morgan right-side-end, with two spaces before right-side-end.
  2. Select exactly ABC @Alice Morgan, including the chip. Verify the selected string through the OS clipboard.
  3. Drag this selection to the end of the same composer without modifiers.
  4. The reproduced native gesture uses empty flags, clickState 1, an 800 ms mouse-down hold, then 35 straight-line movements 40 ms apart.
  5. Repeat on main, adjusting coordinates to the actual input position.

Expected: move the entire selected prefix. Matched main produced right-side-endABC @Alice Morgan.

Actual: candidate produces A@Alice Morgan right-side-endBC . Only BC moves. The full selection remains after mouse-down, then becomes BC in the early-drag AX sample.

Frequency: candidate 3/3 with this gesture; main 2/2 moves the complete prefix.

Before value:       ABC @Alice Morgan  right-side-end
SelectedClipboard: ABC @Alice Morgan
AXSelectedText:    ABC @Alice Morgan
Candidate result:  A@Alice Morgan  right-side-endBC [trailing space]

This is gesture-specific. Another native helper passed on candidate but differed in event fields as well as trajectory: no explicit flags/clickState and an initial 60 px horizontal segment. It does not invalidate the failing matched route. Chrome using the same failing-Safari helper passed in New Session; do not generalize this Safari defect to Chrome.

Recipient loss is not established as a new regression. Both revisions' later sends lacked humanMentions and matching Inbox items; main also crossed navigation before final send. Initial main picker/bound-recipient state was independently checked. This comparison establishes incorrect text movement, not candidate-only loss of notification. The specific drag sequence has AX/clipboard/image evidence, not a DOM metadata or console dump.

Receipt identities: 79-candidate-straight-result.json, 79-candidate-third-drag.json, 79-main-straight-result.json, 79-main-repeat-result.json and separate final-send receipts.

Safari drag: matched full-selection control and partial candidate movement

Finding 3 — Long names clip abruptly in narrow composers

Severity: minor, visual. Chrome 157.0.8103.39 on macOS 27.0.1; Chat and New Session;320 px and 390 px widths.

  1. Open Chat or New Session at 320 px or 390 px viewport width.
  2. Type @ and select Alexandra Beatriz de Albuquerque Monteiro-Silva.
  3. Inspect the name inside the composer; compare a fresh matched main page at the same width.

Expected: readable wrapping or deliberate truncation.

Actual: the chip exceeds the usable text region and the name is cut abruptly without ellipsis. Main wraps the complete text at 320 px and fits it at 390 px.

Frequency: confirmed in both contexts at both widths, with fresh main controls. The evidence does not record a repeated-trial denominator for all four combinations; no additional N/N rate is claimed.

Captured candidate state (synthetic profile):

{
  "value": "@Alexandra Beatriz de Albuquerque Monteiro-Silva ",
  "mentions": [
    {
      "profileId": "c79569c7-5552-4825-ace5-ecddcac62c75",
      "start": 0,
      "end": 48
    }
  ],
  "richEditor": true
}

Full text and recipient metadata remain in the draft. This is not text/recipient loss. Initial resize-transition captures were replaced by fresh controls; the visual defect does not imply a console exception.

Evidence: fresh long-name Chat/New images, long-name-before-after.png and matching draft/geometry records.

Long-name clipping: matched main and candidate

Important boundaries and excluded conclusions

Normal overflow versus a synthetic 12-ID clipboard. Copying ten real mentions and pasting into two existing mentions retained twelve names with ten bindings. This is not one clipboard containing twelve distinct bindings pasted into an empty editor. The UI does not itself produce a twelve-binding clipboard. A separate synthetic OS-clipboard producer supplied twelve valid IDs: text survived but all bindings were rejected; its ten-ID control was accepted. Keep this literal-handoff discrepancy separate from normal UI copy/paste. It is not established as a new regression, and the synthetic diagnostic was not repeated in every surface/context.

Unavailable editor: picker selection and paste are different. The fault target was composer-editor-mentions-*.js, including identity/gzip/Brotli representations. Cache hits do not qualify as induced load failures.

  • Chrome New qualified the source clipboard, empty prestate, blocked load, plain paste with no binding, normal send with no humanMentions/matching Inbox, and same-payload recovery after unblocking/reload. Chrome Chat lacks its own blocked-native-paste subcase.
  • Safari New case 83 showed visually plain paste during genuine 404 and a chip after exact restoration plus same-tab reload. No metadata read or send receipt proves absence of a recipient for that paste; item 9 remains partial.
  • Safari case 84 chose a person through the picker while the asset was missing. Its send retained Alice[17,30] and generated one authenticated Alice Inbox receipt. A plain-looking fallback does not imply missing recipient metadata. This positive picker receipt cannot substitute for a negative paste receipt.
  • Firefox hard reload retained cached rich editor during server 404, and later recovery paste was unqualified. The native app likewise retained its rich chip and a pairing dialog interfered with focus. Neither has a qualified fallback/recovery transition or a product-failure verdict.
  • Initial fault setup still served gzip from memory and was aborted; only verified 404 windows counted. Exact hashes and HTTP 200 were restored afterward. These recovery claims require explicit reload, not automatic recovery.

Other controls and invalidated attempts:

  • Initial headless partial-drag and unsuccessful mouse-transfer observations were not treated as native OS regressions. Safari's later matched OS gesture is the separate confirmed finding above.
  • An early paste copied the address-bar URL rather than the intended selection and was excluded. The later empty-prestate/clipboard-controlled result is counted.
  • Initial queue probes had empty draft/unsettled handoff. Only final hold→queue→release→recipient receipt counts.
  • Early skill probes expected a hyphenated raw slug. Canonical normalization produces mention_fixture_skill; corrected keyboard selection passed.
  • Immediate-reload suffix loss did not reproduce in three controlled blocked-chunk trials. Initial main-only-selector mistakes and a session-switch probe that stayed in the same logical session were excluded.
  • Attachment removal focusing BODY and attachment-menu Escape focusing its trigger also occur on main. They are reported in coverage, not attributed to this PR.
  • Bound mentions prevent Incognito sending on main too; this restriction is not new.
  • IME required real marked composition, not merely a Japanese input source producing Latin letters. Safari's independent textarea failed qualification. A later invalid Firefox attempt does not erase earlier genuine composition evidence.
  • Delaying a real local sessions.create request showed Starting and a new composer, not a remotely pending placement lock. No UI property was altered to fabricate this state. The real users.setRole read-only result applies only to the Chrome run that executed it.
  • Large-paste checks prove preservation and continued input with error/geometry observations where stated. They are not comparative latency benchmarks or a blanket performance guarantee.

Actionable retest list

  1. Investigate native Backspace navigation and Safari partial drag, then repeat these exact gestures on the proposed new head and main. Hold executable, focus, selection, modifier/event fields and page-history prerequisites constant. Cover chip deletion and ordinary-character deletion, and inspect Forward-restored text.
  2. Recheck long names at 320/390 px in both contexts using settled layout/fresh controls; inspect full draft text and ID.
  3. Qualify native bound delivery/queueing with an authenticated synthetic human, not shared Owner. Verify durable message IDs and intended recipients' authenticated Inbox records, including duplicate names.
  4. Close remaining item 9 cells with verified cache eviction/404, empty prestate and known clipboard contents. Prove paste metadata/negative recipient receipt separately from picker selection. Restore exact assets and show same-origin/same-payload recovery.
  5. Resolve intended behavior for the twelve-ID synthetic clipboard before treating it as a natural UI regression; keep the ten-ID control and normal 10+2 case.
  6. Complete remaining OS text services, internal Chrome Chat drag, other drag contexts, Safari post-send undo, focus/tab/attachment-return sequences, immediate-letter boundaries, remote pending placement, persistence transitions and true narrow/short-pane cells. Reuse valid passes rather than rerunning them only because another lane did not duplicate them.

Evidence retention and closeout

The three comparison images are the visual evidence for the findings. Raw JSONs retain exact draft/selection/geometry and authenticated receipts where stated; AX limitations are explicit. The privately retained raw archive contains 1,069 files / 351,623,607 bytes, SHA-256 c26739c11c098dabc449eb0cc05fade92cabc6b61b948ff02d7f52bb79edf939. No public archive-download availability is implied.

Native evidence manifest SHA-256: 4516f5dc2f3b19c57beebec22da263156ccdef7fae4ec0ddb31080eb4a0d171f. Invalidated attempts remain distinguishable from counted proof. Disposable test services, checkouts and VM were cleaned up after preservation; shared resources were preserved. No fixes, commits, pushes or merge were performed during the test campaign.

Public comparison images use synthetic profiles. The device name is redacted in the native comparison; no product behavior is altered.

Author-supplied evidence before the acceptance pass

Current head: 4ae188c349e1ba45e9ef7a9e5bfcdabd482e52eb. It merges main cda0b61ac4d23fb0a5fa5530e37f9e74ce3face5 (two conflicts, in the boot-module manifest and its generator script) and adds one commit with the fixes from a whole-code review. Ancestry is preserved; nothing was force-pushed.

Changed in this update:

  • Pasting more than 10 recipients keeps the first 10 and leaves the rest as plain text. Previously all were dropped.
  • Enter and Shift+Enter insert a plain newline, without code-style auto-indent.
  • Spellcheck, autocorrect and autocapitalize stay on once a mention exists.
  • Undo can no longer bring back a draft that was already sent.
  • Fixed a lazy-load race that kept chips from mounting, separators inserted on owner sync, and mobile composer rules that never reached the rich editor.
  • Recipient paste and drop have one owner, the rich editor. If the editor cannot load, the transfer lands as plain text and binds no recipient.
  • The editor is listed in the textarea's existing geometry selectors, and editor-only rules live in its lazy theme. Unrelated transcript CSS from earlier revisions is back to main.

Local proof on this head:

  • 124/124 unit cases in 4 files and 139/139 Chromium browser cases in 11 files passed, covering the editor, production callers, native drag-and-drop, mobile gestures and overflow. Composition events test the editor transaction contract, not an OS IME.
  • UI types, CSS lint, format, whitespace and the test-line ratchet passed. Targeted lint reported 0 errors and 5 Solid reactivity warnings.
  • Not rerun on this head: the production-UI E2E suites, WebKit and Firefox, a native OS IME, real devices, and live notification delivery.
  • The last round of changes (paste/drop ownership, CSS consolidation, the eager bridge trim) has not had an independent review yet. An earlier independent review of the full diff found the issues listed above, which are fixed.
  • CI for this head has not been observed. Main has advanced since cda0b61a; a trial merge with current main was clean.

Startup gate — passing locally

pnpm ui:check-performance:base cda0b61ac4d23fb0a5fa5530e37f9e74ce3face5 exited 0 on Node 26.12.1 / Vite 8.3.5. This measures shipped asset counts and bytes, not live latency.

Metric Base This head Delta
Startup JS gzip 92,209 B 92,156 B −53 B
Chat boot JS gzip / requests 1,302,904 B / 20 1,303,597 B / 20 +693 B / 0
New boot JS gzip / requests 804,259 B / 15 805,078 B / 15 +819 B / 0
Chat / New boot CSS requests 3 / 3 3 / 3 0 / 0
Total CSS gzip 331,131 B 331,167 B +36 B
Total CSS raw 1,705,358 B 1,705,386 B +28 B

Chat boot JS is 114 B under its 1,303,711 B limit, so growth on main can still push it over. Base CSS already exceeds its absolute ceiling; this head stays inside the 64 B growth allowance. No thresholds were raised.

UI (captured on an earlier head)

Desktop:

Repaired atomic mention and attached possessive in New Session

Mobile:

Repaired atomic mention on a 390px New Session viewport

Earlier matched before/after layout evidence remains available for that earlier avatar-layout revision.

Limitations and Scope

Keep this PR draft. The maintainer acceptance report above found two editing regressions and one visual regression on 4ae188c3. Head a7bb4e2d fixes them and applies an independent review (see the author response). It awaits a retest, including on a phone, together with the coverage gaps the report lists. The asset-size check against current main is also open. The evidence below this report remains historical author-supplied context.

The screenshots above were captured on an earlier head with the real production UI and synthetic Gateway profiles. They were not recaptured for this update.

Accepted edge: the composer focus frame also shows while keyboard focus is on a suggestion button inside the input area, not only while the text field has focus.

An earlier renderer CPU comparison on a prior candidate showed typing in a 64 KiB draft about 5% faster at the median and a 256 KiB paste about 3% slower. It was not rerun on this head.

Against main cda0b61a, UI production source adds 2,073 and removes 323 lines, and tests add 2,007 and remove 170. Net test-line growth is allocated explicitly (1,965 lines on the current head) rather than raising the shared ceiling. The existing CodeMirror dependency is reused; manifests and the lockfile are unchanged.

Maintainer integration repair

Current head: 6628c6bec069f9b314aaef85616483ba61b53564. The input component remains a separate, draft-keyed component but now lives in its parent module, eliminating the static import cycle. Its function body is unchanged. The existing composer options type lives in a type-only leaf module, and the boot inventory was regenerated. The editor cleanup method explicitly declares its existing this-free contract.

CI fixes complete the existing test doubles, use native Command/Control history shortcuts, and make the loader-refresh fixture retain the same requested draft. Duplicate test setup was consolidated without dropping the first/second-person, undo/redo or read-count scenarios. No new tests, product behavior changes, or budget increases were added.

Validation: 106 editor/lifecycle tests, 135 view/paste tests, and five route tests passed; the final consolidated caller file passed all 27 cases. UI and UI-chat types, scoped type-aware lint/formatting, the import-cycle guard and the test-line budget passed. The UI build succeeded with asset-size warnings. Independent review of the complete repair found no actionable P0–P2 findings. The history tests now emit uppercase Z with Shift for redo and test apostrophe normalization as one atomic edit, without assuming two keystrokes arrive within the history grouping interval. The stale exact-padding assertion was removed; the complete selected production-build E2E case still checks text, avatars, overflow and scrolling and passes. All 83 affected history/editor cases pass locally. The explicitly requested CI rerun completed. Its remaining asset-size and fixture-setup conditions are assessed below; this test-only patch does not claim to alter Gateway fixture startup.

The iPhone captures below are from a7bb4e2d; the integration repair preserves that markup and editing behavior.

Maintainer iPhone Safari verification

Tested head a7bb4e2d44ef41de71f8451f761ab7dcbe214973 in actual Safari on an iPhone 18 Pro simulator running iOS 27.2. The unchanged PR UI was served through the repository mock-Gateway development server with synthetic people; these are native-browser editing checks, not live message-delivery evidence.

  • Chat and New Session: insert a person, continue typing, and preserve the mention.
  • Backspace beside the separator removes the separator and then the chip; surrounding text survives, and Safari does not navigate away. Undo restores the chip.
  • Selected text remains readable in light and dark themes. A long name wraps inside the phone composer.
  • Chat send clears the draft. Inserting another mention and undoing does not restore the previously sent message. An outside tap returns the empty composer to its one-line capsule.
  • The native Done accessory leaves the empty editor expanded in this simulator, but the same gesture also does that on base cda0b61ac4d23fb0a5fa5530e37f9e74ce3face5; it is not introduced here.

Limits: this simulator did not expose its software keyboard. CJK IME, predictive-keyboard behavior, dictation, software-keyboard persistence, touch selection dragging, and the native macOS app were not qualified by this run.

All 44 focused mention-ownership tests passed on this head. Fresh complete-diff independent review found no actionable P0–P2 findings. The synthetic fixture was restored and the task-only simulator/server were removed or stopped after testing.

Light selection Dark selection
iPhone Safari light selection iPhone Safari dark selection

iPhone Safari long mention

CI rerun and setup-boundary assessment

The user-requested second attempt of CI run 43273739723 completed. The other previously timed-out shard passed. The remaining red jobs are the approved asset-size budget and E2E shard 2, plus their aggregate gate.

The shard 2 log establishes a fixture-setup boundary: PID 29364 began setup at 19:56:47 UTC; the UI build completed at 19:58:33; the 180-second hook deadline skipped all 3 fresh-visit cases at 19:59:47. Shared worker preparation completed at 20:00:32 and setup settled at 20:01:16. This process recorded no browser-context setup or test callback, so the changed UI was not exercised in the failing fixture. The exact backend sub-await is not recorded. The fixture, suite owner, state factory, HTTP harness and cleanup owner have identical blobs in the incoming source, published head, actual CI merge 7f0d10d, and live main c4ec183.

The 20-minute job deadline later interrupted settings-loading-skeletons at its first case. All 13 cases passed on the exact published tree in 13.93 seconds. The other two files not completed in attempt 2, chat-loading-geometry and pinned-snooze, had already passed all 4 cases in attempt 1 of the same head/merge. The fresh-visit suite previously passed 3/3 on the published source in 65.97 seconds; these isolated passes are supporting evidence, not a claim that replay fixed CI.

The maintainer accepted this documented pre-UI setup-infrastructure/suite-interruption attribution and the existing CSS/JS budget exception. No identical failing baseline run is claimed, no further CI rerun was requested, and no source change was made for this attribution. The iPhone proof limits above remain unchanged.

@clawsweeper

clawsweeper Bot commented Nov 3, 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.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Passing candidate — inline composer mention proof

Source: c130877998911c0b87ad9132759b7ddb7ae2530e (base 8cbcd68642e9d16bba68bd768965700213cba23f).

Captured from the real Control UI source in Chromium at http://127.0.0.1:41455/chat and /new (capture server now stopped). The Gateway responses, Holger profile, assistant message, and H avatar are synthetic fixtures. The actual mention picker, native textarea, rendering, and responsive layout are exercised; this is not an HTML mockup. No live notification delivery is claimed.

Verified

  • Desktop 1280×900 and mobile 390×844: highlighted inline name/avatar; no separate “Will notify” strip. Screenshots below show existing chat and New Session.
  • Mobile document width 390px / 390px: no horizontal overflow.
  • Long draft: native textarea and mirror scroll heights 411px / 411px.
  • Compact conversation fixture (150px pane): native and mirror top padding 2px / 2px. This is a resized real conversation container, not a different composer implementation.
  • 95 unit tests passed across 6 files; formatting passed. Focused lint has zero errors and two reviewed warnings for custom primitive callbacks (elementRef, liveValue).
  • No browser page errors during the final capture. Every attached screenshot was inspected before upload.

Unit command:

pnpm --dir ui exec vitest run src/pages/chat/chat-composer-inline-mentions.test.ts src/pages/chat/chat-composer-mentions.test.ts src/pages/chat/chat-composer-queue.test.ts src/pages/chat/chat-send-mentions.test.ts src/pages/chat/chat-composer-mentions-cache.test.ts src/components/solid/person-reference.test.tsx --project unit --maxWorkers 1

Remaining broad-gate gaps

This is deliberately a draft. The full local pnpm ui:build did not complete cleanly (startup-budget output plus ENOENT in Vitest cache bookkeeping), and UI-wide tsc --noEmit reported generated DB/type dependency errors. No clean-base comparison was performed, so these are not being labeled pre-existing. Full build/typecheck need exact-head verification before this is marked ready.

Passing candidate: chat composer with inline mention and avatar, no notification strip

Passing candidate: 390px mobile chat composer

Passing candidate: New Session composer using the same inline mention treatment

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. 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 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR renders selected people as atomic inline chips in Chat and New Session while preserving raw message text and recipient identities.

Example: Select Alice Morgan in New Session, then type 's notes.

  • Before: The composer shows @alice Morgan 's notes with a separate notification strip.
  • After: The composer shows an atomic Alice Morgan chip followed immediately by 's notes.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful and demonstrated through the shipped UI, with one unresolved accessibility regression and a low-value generic-editor test.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after images and newer iPhone Safari screenshots demonstrate selection visibility and long-name wrapping; the full body records real-Gateway editing and recipient delivery plus subsequent WebKit and simulator checks, and the final integration repair preserves the tested UI.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Selected people should behave as whole mention chips while editing, deleting, copying, and restoring drafts.
Reason: The maintainer-authored direction and member-led acceptance work establish the product choice, and the shared implementation addresses both composers.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-backed improvement has meaningful browser evidence, but the previously reported loss of accessible selected-recipient feedback remains unresolved.

Priority: P2
Reviewed head: 2c855ae509477f32cd2fd67fbdf6eb01992c5e1e

Before merge

  • Preserve accessible selected-recipient feedback (P2) - Selecting Alice Morgan closes the picker and now removes the only status region identifying her as someone who will be notified. The replacement chip exposes her name, while the remaining live regions announce menu options, predictions, and run state; none distinguishes a bound recipient from ordinary @name text. This affects both Chat and New Session, including restored and pasted recipients. Retain a screen-reader-visible selected-recipient summary driven by the existing mention spans, and restore the behavioral assertion removed from chat-composer-mentions.test.ts. This carries forward the earlier review's unresolved accessibility finding.

Findings

  • [P2] Preserve accessible selected-recipient feedback — ui/src/pages/chat/components/chat-composer-view.tsx:479-482

Tests

  • Low-value test ui/src/pages/chat/composer-editor.browser.test.ts: Remove the 'hosts an ordinary non-atomic decoration without the mention feature' case: it exercises generic helper extensibility without a production consumer and repeats typing/undo coverage already exercised through mentions.
Agent review details

How this fits together

The Control UI composer converts draft text and selected recipient spans into editable browser content, then passes canonical text and identities to the existing submission owners.

flowchart LR
  A[People picker] --> B[Draft and recipient owner]
  B --> C[Composer binding]
  C --> D[Lazy CodeMirror editor]
  D --> E[Raw textarea port]
  E --> B
  B --> F[Existing submission owner]
Loading

Technical review

Best possible solution:

Keep the shared atomic editor and restore an accessible notification-recipient summary through the existing draft owners without restoring the visual strip.

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

Current-main source confirms the separate recipient strip; the introduced removals and replacement markup establish the accessible-feedback regression without executing target code.

Is this the best way to solve the issue?

A single document-aware editor fits atomic mentions and avoids overlay geometry drift, provided selected notification identities remain accessible.

Full review comments:

  • [P2] Preserve accessible selected-recipient feedback — ui/src/pages/chat/components/chat-composer-view.tsx:479-482
    Selecting Alice Morgan closes the picker and now removes the only status region identifying her as someone who will be notified. The replacement chip exposes her name, while the remaining live regions announce menu options, predictions, and run state; none distinguishes a bound recipient from ordinary @name text. This affects both Chat and New Session, including restored and pasted recipients. Retain a screen-reader-visible selected-recipient summary driven by the existing mention spans, and restore the behavioral assertion removed from chat-composer-mentions.test.ts. This carries forward the earlier review's unresolved accessibility finding.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Explicit recipient identities keeps the original intent (516fbb2: Only selected profiles bound to visible text spans create notification recipients; ordinary names do not.)
  • Native composer presentation changes intended behavior with a stated reason (74c7b3d: The Solid migration preserved native draft, focus, selection, attachment, and submission contracts.)
  • Selected-recipient strip changes intended behavior with a stated reason (516fbb2: The strip confirms who will be notified and offers removal without rewriting the draft.)
  • Synchronous draft ownership keeps the original intent (4ad6f7a: Draft owners publish completed mutations synchronously while Solid consumes projections and owns presentation lifecycle.)
  • Shared person-reference appearance keeps the original intent (57d4e77: Identity components retain shared appearance, accessible labels, avatar fallbacks, and lifecycle ownership.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui exec vitest run src/pages/chat/chat-composer-mentions.test.ts --project unit --maxWorkers 1
  • pnpm --dir ui exec vitest run src/pages/chat/composer-editor-callers.browser.test.ts
  • pnpm tsgo:ui
  • git diff --check
  • Verify both composers expose notification-recipient status after picker selection, recipient paste, undo/redo, and removal, while literal @name text remains unbound.

What I checked:

PR surface

Source +1847, Tests +1983, Other +2. Total +3832 across 71 files. Added test files: 7.

View PR surface stats
Area Files Added Removed Net
Source 48 2207 360 +1847
Tests 22 2159 176 +1983
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 71 4368 536 +3832

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.

Review metrics

Metric Value Why it matters
Production versus regression growth Production +2202/-358; tests and test support +2159/-176 Most growth supports distinct atomic-editing, history, composition, clipboard, and caller boundaries; the generic-decoration test adds avoidable scope.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The composer improvement has clear value, with a focused accessibility regression remaining before merge.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-03T20:49:13.538Z sha c130877 :: blocked before merge. :: [P2] [P2] Make the mirror reset win regardless of stylesheet order | [P2] [P2] Preserve accessible selected-recipient feedback | [P2] [P2] Match the browser assertion to the selected fixture person

Reviewed November 12, 2026, 12:29 PM ET / 17:29 UTC (Revision 2).

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Spacing correction — AFTER passes / BEFORE reproduces the overlap

Updated head: f2dba33ea6769db314a91fdfb6fafe07cebec2ed. Before baseline: c130877998911c0b87ad9132759b7ddb7ae2530e. The before stylesheet was fetched from that exact PR head and byte-compared with the running baseline source before capture.

The avatar previously overlapped the first letter. It now fits inside the native @ glyph slot with breathing room, without adding inline padding that would desynchronize the textarea caret, selection, or wrapping. Its vertical center is unchanged.

Measured result

Check BEFORE — expected failure AFTER — passing candidate
Avatar-to-name gap, 14px text −2.1875px (overlap) 2.015625px clear gap
Long-draft native / mirror scroll heights 411 / 411px 411 / 411px
Compact-pane native / mirror top padding 2 / 2px 2 / 2px
Mobile document / viewport width 390 / 390px 390 / 390px
Browser page errors 0 0

Added a browser regression requiring at least a 2px avatar/name gap alongside the existing native/mirror metric checks. 95 focused unit tests passed again, both changed files pass formatting, and focused lint of the E2E test passes. The earlier broad build/typecheck gaps remain; this PR stays draft.

Matched real-browser proof

Both phases use the actual Control UI source in Chromium, dark theme, desktop 1280×900 / mobile 390×844, identical text and synthetic Holger profile/H avatar, and the same mention-picker interaction. Gateway/profile data are mocked; this does not claim live notification delivery. Capture URLs were http://127.0.0.1:34733/ (before) and http://127.0.0.1:38935/ (after); both capture servers are stopped.

The images below are real browser locator crops, not composed mockups. The passing AFTER detail leads, followed by the explicitly labeled BEFORE baseline and matched full-composer crops. All final captures were visually inspected.

AFTER - passing candidate: clear avatar-to-name gap

BEFORE - expected failure: avatar overlaps the name

AFTER - passing candidate in the real chat composer

BEFORE - crowded avatar at the previous PR head

Use the existing lazy document-aware editor to reserve real avatar width while retaining raw mention text, editable names, and controller offsets.

Co-authored-by: Patrick-Erichsen <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Passing candidate — full-size avatar with real inline spacing

Current source: b2d87aec0f07a05778bdd25b0f8561b38f21d713. BEFORE baseline: f2dba33ea6769db314a91fdfb6fafe07cebec2ed (the rejected small-avatar version).

Measured in the real app BEFORE AFTER
Name font size 14px 14px
Avatar width 9.796875px (0.7em) 14px (1em)
Avatar/name gap 2.015625px 2px
Mobile document / viewport width 390 / 390px 390 / 390px

The avatar is no longer shrunk to fit a textarea glyph. A shared, lazy CodeMirror view reserves the real avatar width plus gap; only the raw @ character becomes a widget. The name is editable text, and the avatar/name share the sent-message highlight styling. No new dependencies, injected wire-text spaces, or native metric overrides.

Actual visible-editor verification

  • Both Chat and New Session measured 14px font, 14 × 14px avatar, 2px gap.
  • Interacted with the visible editor, not the hidden raw-value/event port. Typing before/after the mention and undo/redo preserve the draft.
  • An overflowing draft kept its caret inside the actual scrollport: caret 759–777px within 653–779px. After a compact 150px conversation pane resize, caret 125–143px remained within the 122–143px scrollport.
  • Clicked Send against the mocked Gateway: all 765 raw characters matched exactly; selected recipient retained UTF-16 offsets 26–44 for @Holger Gruenhagen. No synthetic spacing entered the document or payload.
  • No browser page errors. The real supplied profile-avatar fixture loaded rather than a context-less fallback.

Checks on this exact source

  • 18/18 real Chromium editor/caller tests (visible editor: geometry, caret/wrap, typing, deletion, undo/redo, clipboard events, picker insertion, focus, compact scrolling).
  • 37/37 composer controller tests and 23/23 chat-pane lifecycle tests, including explicit focus routing to the visible editor.
  • Formatting passed; focused oxlint has 0 errors (4 reviewed custom-primitive reactivity warnings); Control UI controller guard passed; pnpm --dir ui build passed with the editor kept in a lazy chunk.
  • Independent local review found one focus-routing issue (explicit focus and boot selection restore still targeted the hidden textarea); both callers were fixed and covered.
  • Not clean: UI-wide tsc --noEmit still reports generated DB/type diagnostics outside the changed files (none in changed files), and the updated full-app E2E file could not run locally because the E2E runner failed to resolve @openclaw/workboard-contract during setup. The standalone real-app capture above exercises the same New Session/Chat flow.

Matched before/after captures

Real Chromium running the actual Control UI source, with identical text, dark theme, desktop 1280×900 / mobile 390×844, synthetic Holger profile/H SVG avatar, and the same mention-picker interaction. Gateway/profile data are mocked; no live notification delivery or OS IME candidate-window proof is claimed. Before URL: http://127.0.0.1:45991/; after URL: http://127.0.0.1:37971/; capture servers are stopped.

The passing AFTER detail leads below; the explicitly labeled BEFORE shows the too-small avatar. The full-composer pair and mobile candidate provide context. Every attached image was inspected. These are actual browser crops, not composed mockups.

Remaining qualification

The PR remains draft for the broader TypeScript/CI qualification described in the body. Chromium-only editor tests cover actual visible input/selection/history and ClipboardEvents/DataTransfer; composition tests exercise DOM/event forwarding, not a real OS IME session. WebKit/Safari and OS clipboard UI were not exercised.

AFTER - passing candidate: 14px avatar beside 14px name with 2px gap

BEFORE - rejected: avatar shrunk to 9.8px

AFTER - real chat composer

BEFORE - previous PR head chat composer

AFTER - 390px mobile chat composer

@clawsweeper clawsweeper Bot removed 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. labels Nov 5, 2026
Render selected mentions as whole widgets and preserve protocol boundaries
across clipboard, mounted history, and IME composition.

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: Patrick-Erichsen <[email protected]>
roboclaw-bot and others added 3 commits November 9, 2026 16:52
Resolve current-main conflicts and retain one document-aware editor. Repair repeated-name recipient restoration, locked paste/composition, first-selection undo, possessive typing, and mobile focus. Browser and owner regression coverage includes exact identity restoration; the scoped 729-line allocation protects these distinct editor and controller boundaries.

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

Co-authored-by: vincentkoc <[email protected]>
Preserve empty-recipient callbacks, reuse picker avatars, update affected consumers, and keep responsive editor layout with its frame owner. Regenerate boot grouping using deep-route import-map anchoring.

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

Co-authored-by: vincentkoc <[email protected]>
Exclude hidden raw-value inputs at the existing placeholder visibility owner and remove the competing theme rule. The production UI regression fails before the repair and passes afterward.

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

Co-authored-by: vincentkoc <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Manual acceptance pass and placeholder correction

Recorded from the actual Control UI at 1adfa3dd78e9d3ab82e53ffa26e751c007970940, using native mouse/keyboard input and a synthetic Gateway/profile roster. No live notification delivery is claimed. The 90-second recording is 3× playback with explanatory captions and zooms.

The pass covers person-picker selection, typing the possessive, whole-chip Delete/Undo, cutting to an empty New Session draft, and pasting into Home chat with Undo/Redo. It caught a duplicate empty-state placeholder: the hidden raw-value textarea still matched :placeholder-shown. The correction excludes hidden controls at the existing visibility rule and removes the competing editor-theme rule. The production-UI regression fails before the correction and passes afterward.

Before — duplicate empty placeholder at 5482562

Before: overlapping native and rich-editor placeholders

After — one placeholder at 1adfa3d

After: one visible placeholder in the active editor

The matching recording follows. Chromium manual input and automated composition-event tests do not establish native OS IME or WebKit behavior. Startup-asset/CI qualification remains a separate landing gate.

manual-proof.mp4

roboclaw-bot and others added 4 commits November 12, 2026 03:17
Conflicts in the boot-module manifest and its generator script take
main's script and a regenerated manifest.

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Integrates the branch with main and applies the whole-code review:

- Keep the first 10 pasted recipients instead of dropping all of them.
- Enter and Shift+Enter insert a plain newline; no code-style auto-indent.
- Keep spellcheck, autocorrect and autocapitalize once a mention exists.
- Owner clears (send) are not undoable; undo cannot restore a sent draft.
- Fix the lazy-load race that kept chips from mounting, separator inserts
  on owner sync, and mobile composer rules not reaching the rich editor.
- Recipient paste and drop have one owner, the rich editor. If it cannot
  load, the transfer lands as plain text and binds no recipient.
- The editor shares the textarea's geometry selectors; editor-only rules
  live in its lazy theme. Unrelated transcript CSS is back to main.
- Trim the eager textarea/editor bridge.

Accepted edge: the composer focus frame also shows while focus is on a
suggestion button inside the input area.

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Fixes the three findings from the acceptance pass on 4ae188c.

- Forward key events to the textarea port with named fields only. A cloned
  event also copied WebKit's legacy keyIdentifier, so WebKit ran default
  actions for the untrusted copy: Backspace navigated back in the macOS
  app and Tab skipped a focus stop.
- Drag the selection the user grabbed. WebKit delivers a fast first
  mousemove before dragstart, so CodeMirror had already replaced the
  selection and only part of it moved.
- A mention chip is one inline box. It moves to the next line whole, and a
  name wider than the composer wraps inside it instead of being clipped.

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
- Backspace beside a separator the chip needs steps over it instead of
  repeating a no-op, so the next press deletes the chip or the word.
- Selected text in the rich editor uses the app selection color. The
  CodeMirror light default won on specificity and was unreadable on dark.
- The editor uses the app's 8px scrollbar, which its overflow padding
  already assumed; text no longer shifts when a draft starts to scroll.
- A retained empty editor rests in the same one-line mobile capsule as
  the textarea.
- A native snapshot is used as undo history only when the selection
  replaced it, so undo cannot restore a draft that was already sent.
- A press that ends without a drag forgets its grabbed selection.
- A dragged move reports insertFromDrop like any other drop.

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

Copy link
Copy Markdown
Member

The iPhone Safari simulator check and screenshots are now in the PR body. The integration repair is pushed as 2c855ae5094: it removes the import cycle and repairs the existing test contracts without changing the tested UI. Focused checks and the test-line budget pass; fresh hosted CI is pending.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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 author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 12, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit ee46550 into main Nov 13, 2026
168 of 176 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the roboclaw/composer-inline-mentions-20261103 branch November 13, 2026 01:59
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 13, 2026
Render inline human mentions through the existing lazy composer editor, preserving recipient identity, selection, clipboard and undo/redo behavior. Retain the shared editor bridge and corrected lifecycle/type boundaries.

Validated with focused editor, history, paste and route checks and actual iPhone Safari Simulator editing proof. Software-keyboard, CJK and dictation limitations remain documented in the PR.

The maintainer accepted the asset-size budget and the documented fixture-setup interruption before the changed UI executed. No identical failing baseline run is claimed.

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: Patrick-Erichsen <[email protected]>
Co-authored-by: vincentkoc <[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 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

2 participants