Repository navigation
Conversation
Design Review (Opus 5.5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS The pill composer becomes the default on the busiest input path in this PR, and the decision rests on an RFC that is still Watch
[DESIGN-REVIEWED] ace7f51 Description read[DESCRIPTION-READ] 2d63383e5b0ea555ab05afb4a13bd761a18c62aaf5ef9179c0a643fbc418a473 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5, fork) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK product-shape change without accepted RFC: the Lexical pill composer becomes the default chat input, and the RFC it cites isn't on the base list. Not justified as shipped
What this change shipsInventory (8 items) — 7 justifiedIntent: let a person see, edit, reorder and remove a collapsed paste before sending. This is an ADDITION.
Blockers
[FIRST-PRINCIPLES-REVIEWED] ace7f51 Description read[DESCRIPTION-READ] c4ee43eaad833ebbcafa3c524edff38b1ad5158315e0e23bde69423c5be623f1 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS No first-time reader has looked at the new pill or its editor; the 26 stills and one recording cover the main path but no blind read was run. Watch
Suggestions
[UX-REVIEWED] ace7f51 Description read[DESCRIPTION-READ] 2122fe068d721647471311579d79f153c3b1a3d7bd6c4de4bcad19d5fdb1f42a That sha256 names everything this verdict read: the PR description, plus the 29 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review (fork) — 🔴 changes requested (blocking)Reviewed 1 of 2 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands. BLOCKING -- website/src/composer/plugins/PasteSeqInvariantPlugin.tsx:72 -- Literal-collision repair defeats failed-send deduplication BLOCKING -- website/src/test/helpers.tsx:122 -- Lazy-composer readiness uses the default one-second deadline [BLOCK-MERGE] ace7f51 Adjudication (Opus 5.5) — is blocking on each finding proportionate?F2 is anchored to F1 is fenced. The repair at patch line 3960 does mint a new id for every colliding pill whenever a literal carries the same seq (patch lines 3952-3960). I did not open the ChatPane failed-send recovery path this run, so I can't record a FLAG. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
51d5337 to
ebaee4d
Compare
Dispositions — GPT 5.6 Review of
|
Dispositions — Opus 4.8 Review of
|
Disposition — First Principles Review of
|
Disposition — Design Review of
|
Dispositions — UX Review of
|
ebaee4d to
9be89d1
Compare
Dispositions — UX Review of
|
Disposition — GPT 5.6 Review of
|
Dispositions — Design Review of
|
|
|
|
|
|
self-added: yes
|
|
Round note — Two changes folded into the production commit, nothing else (18 files, +77/−13): (1) Verification on Every whole-design item on |
|
Infra note — head
Both PRs merge cleanly onto the current Update 06:45Z — the approval landed inside the rate-limited window, so the fork lanes died too. Run 36531160630 reports |
|
Rebase note — GitHub flagged the PR CONFLICTING at ~17:10Z after main landed #14227 (
One follow-on fix, folded into the production commit: this PR's host ratchet ( Local gates on Lanes: all prior dispositions were judged on |
|
Open-PR triage (2026-10-05): OVERLAPPING. Needs a rebase and a merge discussion. I checked head Rebase needed.
Not superseded. On Overlaps to settle before either PR lands:
Smaller point: the evidence commit adds 4 PNGs under a top-level Breaking change / P0: I found no API or contract break. The value stays marker text plus the |
|
|
|
|
|
|
Builds on the inline paste-token composer shell from kirodotdev#8310 (Lexical 0.50, `ComposerControl`, `composerPastePolicy`, IME latch, lazy load + textarea fallback) and replaces its read-only `PasteTokenNode` with a richer pill: - `PasteBlockNode` carries the block itself (id/seq/lines/content) so undo, copy-expansion and the preview never depend on the host's block list; it is inline, atomic and not keyboard-selectable (arrows step over it, typing next to it never replaces it, Backspace/Delete remove it in one keystroke). - The pill label is the paste's first line (CSS-truncated) + line count. The accessible name leads with that snippet (voice control can say what it sees) and the hover title carries the WHOLE first line plus the two hidden actions, "Click to edit · drag to reorder", which is also the pill's accessible description; a small decorative pencil glyph beside the ✕ makes editability visible without hovering. - Click / Enter opens an EDITABLE preview anchored above the pill (below when there is no room): scrolls both axes, sized to content and clamped to the viewport, its own corner resize handle, Save writes the edit back into the block (token line count and snippet update), Cancel/Escape return the caret right after the pill. Dismissal never destroys an edit in one gesture: a click outside SAVES unsaved edits, Escape with unsaved edits shows a hint and only a second Escape (or Cancel) discards, Escape the IME owns is claimed by the shared latch, and every other key stops at the panel so the page's Ctrl+digit / Settings chords cannot unmount it mid-edit (the same boundary Modal and ui/dialog draw). - Pills drag to reorder: a live gap node opens in the text under the pointer, the source pill dims, a translucent drag image hangs below the cursor so the drop point stays visible; drop moves the node, the gap is cleaned up on drop/dragend/leave and by a watchdog, and a pill can never nest in another. - The `/`, `$` and `@` pickers anchor to whichever composer surface is live. - `lexicalComposer` is turned on for ChatPage, ChatPane and SideChat; the flag and the textarea fallback stay in place for the chunk-load-failure path. The page-level composer probes follow: `queryComposer()` and the keyboard-switch release resolve `[data-composer-input]` on either element (the Lexical root is a contenteditable div, so the textarea-only selector made Alt+Enter, `/`, quote-to-compose, widget prefill, post-create focus and search-close silent no-ops), and SideChat's Select-to-Ask seed places the caret through the root's `ComposerRootHandle` (`composerHandleOf`), the typed seam the test drivers already used. A source ratchet (`test/chatInputHosts.lexicalComposer.test.ts`) makes every product `<ChatInput>` mount name the prop, so a future host cannot fall back to the textarea by omission. Shell fixes found while porting: a composition abandoned without `compositionend` left Lexical's own composition key set and the editor deaf to every keydown (recovered on focusout alongside the shared IME latch); the test hook's `insertText` now appends when the editor was never focused and clears the selection for an empty string. Tests: the page-level suites that drove the `<textarea>` directly (`.value`, `fireEvent.change`, `getByPlaceholderText`) now go through the `composer*` drivers in `test/helpers.tsx`, which exercise the real editor via the `__composer` hook on its root and wait for the lazy chunk (`awaitComposer`). New unit suites cover the node, chip, preview editor and drag plugin; `scripts/capture-composer-pills.mjs` drives the real ChatInput in Chromium through 27 checks (paste, caret/arrow semantics, undo, keyboard focus, preview edit/save/cancel/resize, dirty-Escape guard, click-away save, IME-owned Escape, below-the-pill placement, drag reorder, IME, send, history, pickers, copy expansion) and records the screenshots + video. The Playwright E2E specs locate the composer through a shared helper (`playwright/helpers/composer.ts`: the `[data-composer-input]` hook plus a text reader that works on the Lexical root and the textarea) instead of `getByPlaceholder`/`toHaveValue`, which the contenteditable root never satisfied; `PillKeyboardPlugin` gets its own unit suite; the dev-only harness page is excluded from coverage like the Storybook fixtures.
…e description names The UX lane on 3475128 is BLOCK "cannot evaluate": the description names three frames only in HTML comments, and a fork author has no CLI path to a description attachment (`gh pr edit --attach` answers read permission with 404, cli/cli#14302). The repository's other route is the committed one: media under temp-screenshots/ is read by the fork UX lane and both design lanes straight from the object store at HEAD (pr-committed-evidence.sh), so the three frames land here with `git add -f` (the directory is gitignored for everyone else's capture runs). 36-cli-mode-placeholder.png data-ui="cli": accent `>` prompt left of the 24px-indented placeholder (acceptance step 30) 37-cli-mode-pill.png same mode, typed text and a pill start right of the prompt (step 30) 38-min-width-unsaved-hint.png 280px minimum panel width: the two-exit hint wraps onto three lines inside its own column, Cancel and Save clear of it and inside the panel, grip clear of Save (step 31) Provenance: recorded from 3475128 (this branch, clean tree) by `website/scripts/capture-composer-pills.mjs` against the real ChatInput harness on a local `vite --port 5199` dev server, headless Chromium 145.0.7632.6 via Playwright 1.58.2; the walk passed 33/33 with 0 page errors, and steps 30 and 31 asserted the measurements the frames show (input and placeholder padding 24px, pill left of 94px at a 24px text start; hint 3 lines at width 280, no overlap with Save or Cancel, Save inside the panel). No fixtures beyond the harness's own seeded blocks; no production code changes in this commit. CI scope: temp-screenshots/** is excluded from every bucket (ci.yml kirodotdev#8027, pr-scope.yml, scripts/local-gate.py), so this commit changes no test selection.
|
self-added: no
|
|
Round 48 — rebased onto What the rebase had to absorb, beyond the usual 13 locale and two Playwright unions:
Dispositions: all seven lane items on |
|
Re: triage 2026-10-05 (@bolichen97) — rebased; overlap analysis below. Head
|
cruisercohen
left a comment
There was a problem hiding this comment.
Requesting changes on head ace7f51c2. main has moved about 540 commits since the round-48 rebase and the branch now conflicts again, mostly across the composer split (ChatInput.tsx, LexicalComposerInput.tsx, PasteTokenNode.tsx, the chat-input/ owners, pasteTokens.ts) plus docs/feature-map/README.md and about a dozen frontend tests. On this head, Frontend Tests shard 2 fails three cases in ChatPage.followUpBusySend.test.tsx ("chip sends while a turn runs": the quick-send toggle and both ↑ steer cases), and the offline E2E run fails composer-paste-highlight.spec.ts:60 in chat and cli UI, which is this PR's own surface. Coverage Gate, the GPT and First Principles lanes are also red here. Please rebase, get those suites green on the new head, and I'll review that head.
|
Steward review for #8309 (T1-2 sweep). Reviewed as a fork PR — I cannot push to the branch or merge it, so this is a review only. Relationship to #8309. The specific defect #8309 reports — the collapsed-paste chip highlight detaching from the marker text on the textarea+mirror path — was already fixed on Current state (head
Verdict: not mergeable as-is, and the gating question is a maintainer decision, not a code defect I can resolve. The central change — making the Lexical pill composer the default chat input on fine-pointer devices — is a product-shape call that two maintainers already flagged as What a maintainer would need to do to land it: (1) decide and accept the default-flip via #12627; (2) the author rebases onto current |
|
Thanks for this PR. It now conflicts with main. Could you rebase onto the latest main and resolve the conflicts? We will review it again once it is rebased and CI is green. |
Problem / Motivation
Goal: a paste marker you can read, edit, reorder and remove in place — a real pill in the composer that is on by default on fine-pointer devices — while the host keeps the exact value contract it already speaks (marker text plus paste blocks) and a send expands each pasted block exactly once.
A large paste into the chat composer collapses to a marker such as
[ Paste #1 · 18 lines ]. Today that marker is opaque: you cannot see what landed, trim it before sending, or move it — only keep it blind or delete and re-paste. On the<textarea>path its highlight is a mirrored<div>that drifted off the text (#8309; #14002 fixed the drift, the marker is still not editable, movable or atomic). #8310 landed a Lexical paste-token composer that makes the marker a real node, but behind thelexicalComposerprop no host passes, and its pill is read-only.Why it matters
Pasting logs, stack traces and code is the dominant way context enters a prompt. Every paste that cannot be verified or corrected before Send goes out slightly wrong, and every delete-and-re-paste to reorder is friction on the hottest input path in the product.
Not a goal
<textarea>path.What changed (motivation → approach → change)
Approach: keep #8310's shell —
LexicalComposerInput,ComposerControl, the paste policy, the shared IME latch, the lazy chunk +<textarea>fallback — and replace its read-onlyPasteTokenNode(deleted;main's later #14798 hover-preview touch guard has no counterpart, the pill opens on click / Enter / Space only) with a node + plugin set underwebsite/src/composer/. The value stays the marker string plus thePasteBlocksidecar, so drafts, history and the backend expansion are untouched.PasteBlockNode+PasteBlockChip(src/composer/)#N, spelled by the catalog (pasteBlockChip.seq,pasteBlockChip.seq_name—№2in Russian), so twins stay distinguishable and AT never disagrees with the tooltip. Arrows step over it; Backspace removes exactly one pill; undo brings it back. Markdown list continuation reads pill positions fromPasteBlockNode.PastePreviewEditor+PillsPluginPillDragPlugin+DropGapNodehistorictag, so undo never lands on a stranded gap.PillKeyboardPluginComposerControl.replaceTextand the history invariantmain'sPromptHistoryCursor(#14756) and brings both back past the newest message, soexpandAllnever sends a marker where a body belongs. Every host-originated value change is an undo step (slash command, quote-to-compose, prefill, chip removal, dictation splice, send-clear — RFC Q6); history is cleared only whenhistoryKey(the slot) changes. Onmain's splitChatInput(#15284) the engine (chat-input/engine.tsx) ownsreplaceLexicalText, thecomposerReadygate and the load-failure marker;ChatInputhands onereplaceInSlotwriter tochat-input/pickers.ts,attach.tsx,PickerMenus.tsxandoptimizer.ts;+→/,@,$and Optimize are disabled while the lazy chunk loads; the offline guard inchat-input/busySend.tsx'sfireComposermakes an offline Enter leave the draft untouched, and the mid-turn Queue / split-send controls read disabled rather than swallowing the press.splitDuplicateMarkers(src/utils/pasteTokens.ts) inChatInput, plusPasteSeqInvariantPluginallocateSeq/nextSeqInand the reservation incarryPastescarryPastesrequires the destination text: the chat-core Paste atom'scarry(chat-core/composer/composerPastes.ts, wrapped byChatPane),chat-core/composer/sideChatDrafts.ts,utils/chatPaneDrafts.ts, the send/create-failure recoveries inChatPage, and the create-carry (moved by #17101 intopages/chat/page/composerDrafts.ts), which reserves against both candidate destinations — stored draft and launcher prefill. Hand-typed marker text stays inert; one block backs exactly one marker (the first occurrence). On the<textarea>path the paste event is the boundary:chat-input/paste.ts(repairTextareaPasteCollision) re-sequences an existing block whose seq the pasted text carries before the literal is inserted.ChatPage,ChatPane,SideChatpasslexicalComposer={!touchDevice}(pointer: coarse)nor(hover: none)matches (utils/isTouchDevice.ts) the host gets the pill composer; touch, stylus-only and a failed chunk load keep the<textarea>. Read once at mount (useTouchDeviceAtMount,hooks/useIsTouchDevice.ts). A source ratchet (test/chatInputHosts.lexicalComposer.test.ts) requires every product mount — includingmain'sStableChatInputwrapper — to name the prop and bind its gate from the mount-latched hook; a reactiveuseIsTouchDevice()read elsewhere (ChatPage'ssendOnEnter, #16585) stays gated.pages/chat/composerFocus.tsmain's per-panequeryComposerForSlot(#16537), resolve[data-composer-input]on either element, so Alt+Enter, quote-to-compose, widget prefill, palette focus and the macOS keyboard-switch chain work on the default composer.Product-shape decision. The default flip is recorded in RFC #12627 (
rfc-inline-paste-composer.md,in-progress; amendsrfc-chat-core-extraction§3). Splitting the flip out remains available — the diff is reachable behind the existing prop.Also: ChatPane and SideChat carry the sidecar (#12915) and honour
showFullPastes.styles/cli-mode.cssindents the input, its placeholder overlay and the textarea's chip mirror (#14002) by the same 24px. Shell fixes: a composition abandoned withoutcompositionendleft Lexical deaf (recovered on focusout via the IME latch). Strings:pasteBlockChip.*/pastePreviewEditor.*in all 13 catalogs underwebsite/src/i18n/locales/pluspluralKeys.json. Feature map:docs/feature-map/README.mdstates the composer default and the pill row. Deps:@lexical/headlessdevDependency, lockfile updated;vite.config.tsexcludes the dev harness (src/composer/__harness__/) from coverage. Bundle budget: unchanged (+7.3 KB in theallcatalog chunk).Backwards compatibility
Compatible: value string, block sidecar, drafts, history and send payload unchanged; a persisted draft with a duplicate seq or id is repaired on load.
lexicalComposer={false}remains a supported per-host decision. Test drivers change shape (__composerhook and[data-composer-input]replacetextareareads); no assertion is weakened.Tests
website/src/test/composer.*):PasteBlockNode/DropGapNode,PasteBlockChip(label, remove, keyboard, catalog-spelled#Nin the name — red on the literal template underru),chatInputHosts.lexicalComposerand.touchGuard,PillKeyboardPlugin,PastePreviewEditor,PillDragPlugin,splitDuplicateMarkers,allocateSeq/nextSeqIn,PasteSeqInvariantPlugin,ChatInput.canonicalPaste,ChatInput.textareaPasteSeqInvariant(before / after / over-the-marker / two copies — the before and over cases fail without the paste-event repair),ChatInput.lexical(host writes undo; offline Enter keeps the draft),ChatInput.lexicalReadyGate;pasteTokenspins the create-carry reservation,chatPaneDraftsandChatPane.pasteSidecarthe recovery and batched cases.LexicalComposerInput.test.tsx: feat(chat): add inline paste token composer #8310's tests on click-opens-preview semantics; ↑/↓ round-trip restores the draft with its block; a slot switch or host value change ends browsing; twins survive ✕ and Save; write-through, Cancel, second Escape, one-step Save, resize follow; plusmain's six cases (cursor recall surviving a list change, ending on scope change or edit; ⌘↑/Ctrl+↑ edit-last).main's two hover-preview cases (fix(website): keep touch taps from opening InstantTip hints #14798) are not carried: they exercise the deleted node's hover-opened preview.<textarea>directly goes through thecomposer*drivers intest/helpers.tsx, including the suitesmainadded through each rebase (file-chip parity, memory chip, follow-ups, draft carry, chip undo, palette pane focus, drop offsets, draft recovery, scroll chrome). Two expectations changed on purpose: a recovered queued message is re-sequenced to#2by the one-seq-per-marker invariant, andTerminalRegistryCoverageasserts the snippet-first label instead ofPaste #1 · 3 lines.website/playwright/): chat, fork, navigation, member-memory, voice-recovery and new-session-draft-carry specs locate the composer throughplaywright/helpers/composer.ts; the offline driver passes.6a80dc7c4(base334335182):tsc, eslint at 0 warnings,i18n:checkwith the base ref, phantom-class / restyle / theme ratchets, focus-cue, decision-ledger,docs_lint.py,check_feature_map.pyall green; every suite touching a composer surface — 1770 files / 9418 tests — passes.Manual verification
website/scripts/capture-composer-pills.mjsdrives the realChatInput(via the dev-only harness) through 32 checks: paste → pill; arrows cross it; Backspace / undo; Tab focus; preview open / edit / save / cancel / resize; drag reorder; ✕; Chinese IME commit lands after the pill; Shift+Enter vs Enter; ↑ recall;/,$,@pickers; copy expands; dirty Escape hint then discard; click-away saves; below-pill placement; live write-through; re-anchor on resize; whitespace-only paste; dark theme from computed colours. Chromium 145: 32/32 (0 page errors); Firefox 146: 30/31, 1 skipped (the IME step is CDP-only). WebKit could not be provisioned on the author's host; RFC #12627 Q5 asks the maintainers to run it or record it out of scope.Screenshots / video
Full flow (captions per step):
4e1515b0ae8b39ad8e02d62d6a2c9f4e.webm
CLI mode, the 280px minimum panel width and the narrow-pane one-line hint (committed under
temp-screenshots/composer-pills/; a fork account cannot attach through the CLI, cli/cli#14302):Frames recorded from
783c65341(unchanged since; the evidence commit adds only these PNGs on top of the production commit), headless Chromium 145 / Playwright 1.58.2, 32/32 checks, real ChatInput harness on a local vite dev server.More Chromium and Firefox frames
Related Issues
Related to #8309 — resolved on mouse and trackpad surfaces, where the pill composer replaces the mirrored-
<div>overlay; touch devices keep the<textarea>path, so the issue stays open for the touch follow-up.no linked issue: #8309 closes with the touch follow-up, not with this PR; no other issue is resolved here.
Related: #8513 (the preview lets you read and trim a paste before sending). Builds on #8310. Decision record: #12627. Follow-up: #11122 (keyboard reorder). #11337 landed as #12915 and is absorbed by the rebase.
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)