Skip to content

feat(app-sdk): collapse long pastes in ChatEmbed like the dashboard chat - #21100

Merged
dodgeblaster merged 2 commits into
mainfrom
feat/chatembed-long-paste
Oct 20, 2026
Merged

dodgeblaster merged 2 commits into
mainfrom
feat/chatembed-long-paste

Conversation

@buluoray

@buluoray buluoray commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A long paste into an app's embedded chat (ChatEmbed) collapses into the same [ Paste #N · M lines ] chip the dashboard chat uses, and is sent with the same wire shape, instead of flooding the composer.

Today a 40-line log pasted into Spec Builder's or Ops Mission Control's chat lands in the small embed textarea as raw text: the box fills, the draft is hard to edit around, and the message goes out with no meta.pastes, so the transcript shows the full text too. The dashboard chat has collapsed long pastes for a long time; the embed never got it.

Why it matters

ChatEmbed is the recommended chat for apps (chat-core RFC, P4). Every app that embeds chat hits this the first time a user pastes a stack trace or a file. Fixing it once in the shared Paste atom also removes one more place where the embed and the dashboard chat behave differently, which is what the chat-core extraction exists to stop.

Not a goal

  • The @ file/folder, / slash and $ skill pickers in the embed composer (a separate item, in flight in parallel).
  • Moving the Lexical editor's paste handling, or any other ChatInput behaviour, into chat-core.
  • Changing the collapse thresholds, the chip's look, or the "Show pasted text in full" setting.
  • Rendering pasted chips inside the embed's transcript differently from today's UserMessage (it already reads meta.pastes).

What changed (motivation → approach → change)

Goal: one implementation of long-paste collapse that both composers mount, store-free so an app with no Redux Provider can use it.

Approach: the dashboard's paste-token hook already took only state and refs; it imported no store. So it moves rather than being copied:

  • components/chat-input/paste.ts → chat-core/composer/pasteEditor.ts (usePasteTokens, unchanged logic). Its ime parameter is narrowed to the one method it reads (isComposing), so useComposerDraft's IME guard can supply it. ChatInput imports the same hook from the new path; nothing else in the dashboard composer changes.
  • ChatEmbed keeps its blocks in the existing chat-core Paste atom (useComposerPastes), hands them to the Composer root (pastes), and binds its textarea to usePasteTokens: paste, token keys (atomic delete / caret step), click-to-expand (a click selects the chip, a double-click expands it in place, a tap on touch expands directly), selection snap, copy/cut expansion, the Cmd/Ctrl+Shift+V raw chord, and the user's showFullPastes setting. A file paste still goes to the attach path first; only a paste it leaves alone can collapse.
  • The chip background is the shared PasteHighlightLayer mirror behind a transparent textarea, and the hover/caret preview is the shared PasteHoverLayer. PasteHighlightLayer gains an optional typo prop so the embed passes its own box classes (default unchanged: INPUT_TYPO).
  • Send: buildOutgoingTurn now runs as a 'send' turn (the main chat's shape) whenever files or pastes are staged, so each live token expands on the wire and the block rides meta.pastes; storeSentPastes writes the side table. A new keepFolderTokens input keeps the embed's existing rule that @rel/ folder tokens stay as typed (no project root, no meta.dirs) — previously that was done by using the text-only 'steer' channel, which would have dropped meta.pastes.
  • Undo/redo: ChatInput's snapshot history (useUndoHistory) moves from components/chat-input/draftHistory.ts to chat-core/composer/undoHistory.ts (logic unchanged; its ime parameter narrowed to isComposing, as for the paste hook), and ChatEmbed mounts it before the token keys. Each snapshot carries the blocks, so Cmd/Ctrl+Z after deleting a selected chip brings back its content and the send never carries a bare token. draftHistory.ts keeps the ↑/↓ prompt recall.
  • The optimistic row carries meta.pastes, so the user's bubble shows the chip until the server row lands. A host onSend receives the blocks as meta.pastes; its optimistic row is retired by the stored user row compared on trimmed text, because a host endpoint may strip what it stores (a paste ending in whitespace otherwise showed twice). Whether the stored row keeps the chip is up to the host: Spec Builder's message endpoint stores the expanded text only, so its bubble shows the full text once the server row lands.
  • "Show pasted text in full" is re-read on mc-config-changed / focus, like the font size, so a changed setting applies to the next paste without a remount.
  • Recovery: a refused / unconfirmed send hands the blocks back with the text (restorePastes on the parked receipt), through useComposerPastes().carry, so a block whose number the composer already uses is renumbered, as in the panes.

Backwards compatibility

Compatible: ChatEmbedSendMeta only gains an optional pastes field; onSend(message) is still called with no meta when nothing is staged, and a send with neither files nor a collapsed paste produces exactly the old wire text. The dashboard chat's paste behaviour is the same hook at a new path.

Removes nothing: the moved module keeps every export (usePasteTokens, isKeyboardRepaste, REPASTE_KEY_WINDOW_MS, LastPaste) and its two importers were updated in this diff; no behaviour, key or record is taken away.

Tests

  • website/src/test/ChatEmbed.longPaste.test.tsx (new): a large paste becomes the token and the mirror draws its chip; the send expands it on the wire with the block on meta.pastes; the optimistic row carries the block; a refused send hands the chip back with its block and the retry still sends the full text; Backspace deletes the whole token; "Show pasted text in full" keeps the text; a host onSend gets the blocks and its stripped stored row retires the optimistic one (one user row); turning the setting on elsewhere applies to the next paste. Undo after deleting a selected chip restores the chip with its block, and the send carries the full text. Mutation-checked one at a time against ChatEmbed.tsx: removing the handlePaste wiring reddens 4 tests, dropping pastes from the turn 2, dropping restorePastes 1, removing handleTokenKey 1, forcing showFullPastes: false 1, dropping the optimistic meta.pastes 1, comparing untrimmed text 1, not reloading showFullPastes 1, skipping handleUndoKey 1, not restoring blocks on undo 1.
  • website/src/chat-core/composer/outgoingTurn.test.ts: a row for keepFolderTokens (folder token stays, no meta.dirs, files and pastes keep the send shape). Reddens when the flag is ignored; the existing ChatEmbed.attachments folder-token tests also redden if the embed drops the flag.
  • website/src/test/ChatEmbed.composerStoreFree.test.tsx: pins that the embed uses pasteEditor + composerPastes + undoHistory, that ChatInput imports the same hook and the old file is gone, and adds pasteEditor.ts, undoHistory.ts, composerPastes.ts, PasteHighlightLayer.tsx and PasteHoverLayer.tsx to the no-Redux import-graph check.
  • Dashboard unchanged: the existing ChatInput.paste, ChatInput.iosRepaste, PasteHoverLayer, ChatPane.pasteSidecar, SideChat.pasteSidecar, pasteTokens suites and every ChatEmbed* / ChatInput* / ChatPane* / SideChat* / chat-core composer suite pass: 160 files, 1978 tests.

Manual verification

Pod from this worktree, Spec Builder app, real paste of a 40-line log via the clipboard: the draft holds Please review this log: + the chip + thanks, the chip background sits on its token text in light, dark and a 390px phone width, and hovering the chip opens the preview. tsc -p tsconfig.app.json, eslint on the touched files, jscpd (0 clones) and the docs/feature-map/focus-cue/comment-history gates pass.

Not verified: a real touch device (tap-to-expand runs through the same hook as the dashboard, untested here) and IME composition on the embed textarea beyond the unit-level guard.

Screenshots / video

Desktop, light:

Embed composer with a collapsed paste chip, light

Hover preview:

Hover preview of the collapsed paste

Dark and phone width

Dark

390px

Expanding a chip in the composer (Spec Builder, this head's build). Before:

Composer with the collapsed chip before a click

One click selects the whole chip; a double-click puts the full 40 lines back in the composer as editable text:

Composer after a double-click on the chip: the full text is back

After sending (Spec Builder, the send held 5s on the wire so the optimistic row is visible): the bubble shows the chip.

Sent bubble with the paste chip before the server row lands

After the server row lands: one user bubble (Spec Builder stores the expanded text, so the full log shows), and the agent answered from the full 40 lines.

One user bubble after the server row lands

A refused send (409 simulated on Spec Builder's message endpoint for this one POST): the text and the chip are back in the composer, with the "Delivery not confirmed" notice. The red "slot is busy" banner is the simulated error.

Refused send with the chip restored

Review dispositions

  • UX "missing sent message / refused send": screenshots above.
  • GPT "native undo restores paste tokens without their backing content": fixed in code (undo history above), with a test that reddens without it.
  • UX "missing click-to-expand": before/after screenshots above, from the rebased head 3ee1374.
  • UX watch "does the AI get the 40 lines or the label": the reply to the sent message ("Line 40.") shows the full text went out. A footer line in the shared hover preview would change the dashboard chat too, which this PR keeps unchanged; not taken here.
  • UX watch "preview line count": the preview and its "… N more lines" count are the shared PasteHoverLayer, unchanged by this PR and identical in the dashboard chat. Not taken here, to keep the dashboard unchanged.

Related Issues

Refs #19994

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (docs/app-kit/api-reference.md "Long pastes", docs/system-specs/modules/app-kit-platform.md, the chat-core RFC P3-c row, the feature map)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners October 16, 2026 06:18
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of ed130467729e6debbf655b8f2e110942e5f95e64 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Before merge, check that a send with files and no paste produces the same wire text as before, now that it runs as a 'send' turn instead of 'steer'.

[DESIGN-REVIEWED] ed13046

Description read

[DESCRIPTION-READ] 6c2a7c0dd3b38e9d7bba2094fffbcd052e1af0330e474a00a8e8b71617646c9e

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of ed130467729e6debbf655b8f2e110942e5f95e64 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Check before merge: in every embed, Cmd/Ctrl+Z now runs the composer's own undo history instead of the browser's, even when the draft has no chip.

What this change ships

Inventory (10 items) — 10 justified

Intent: an app user who pastes a long log into an embedded chat gets the main chat's collapsed chip, and the same wire shape on send, instead of a flooded composer. ADDITION.

  1. A long paste in ChatEmbed collapses into a [ Paste #N · M lines ] chip, and the user's "Show pasted text in full" setting is honoured — justified
  2. Chip editing in the embed: delete and caret step as one unit, double-click or tap to expand, copy and cut give the full text, raw-paste chord, hover preview — justified
  3. Send expands chips on the wire with meta.pastes; file sends move from 'steer' to 'send' plus keepFolderTokens, with the same wire text — justified
  4. A host onSend receives meta.pastes — justified
  5. The optimistic bubble shows the chip until the server row lands — justified
  6. A refused or unconfirmed send hands the chip back with its block, renumbered if needed — justified
  7. Cmd/Ctrl+Z and redo in the embed run the snapshot history, so an undone chip delete brings its block back — justified
  8. Host-send delivery proof compares text with edge whitespace trimmed — justified
  9. Changing "Show pasted text in full" applies without a remount — justified
  10. The paste hook and undo history move into chat-core/composer/; PasteHighlightLayer gets a typo prop and buildOutgoingTurn gets keepFolderTokens, each with one consumer and in singular form — justified

[FIRST-PRINCIPLES-REVIEWED] ed13046

Description read

[DESCRIPTION-READ] c63f06b119e13caebbbf1d3b67f2e6bc0755d4839191e81339c1b9d8bd950172

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

UX-level review of ed130467729e6debbf655b8f2e110942e5f95e64 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

In Spec Builder, the user's sent paste starts as a folded chip and then opens into the full 40 lines when the server row arrives. The blind reader found this inconsistent.

Watch

  • The sent bubble changes form after send. The optimistic row carries meta.pastes, but Spec Builder's endpoint "stores the expanded text only". When the server row replaces the optimistic one, the chip becomes a wall of text. The blind reader, on shot 7: "The earlier paste is shown fully opened in the chat, and the new one is folded. The same kind of thing looks different in two places." This happens on every long paste in Spec Builder, so the transcript stays inconsistent. Smallest fix: have the host store meta.pastes, or keep the optimistic row's chip rendering once it is retired.
  • The chip is the main control here, and the reader only guessed how it opens. On [ Paste #1 · 40 lines ] the reader wrote "clicking or hovering might show what I pasted -> a guess". On the expanded draft in shot 6: "I don't know what I did to cause this (clicked it? undo?)". The double-click to expand gives no visible hint. This costs friction on first use only. Smallest fix: add one line to the hover preview, such as "Double-click to expand".
  • The preview's numbers don't add up in the embed. The tooltip shows 6 lines, then "… 28 more lines", while the chip says 40 lines (shot 2). PastePreviewTooltip computes moreCount from PREVIEW_MAX_LINES, but maxHeight clips the <pre> to fewer visible lines. The reader: "That's 34, not 40." Every hover on a long paste shows a count that looks wrong, which undermines trust in the preview. Smallest fix: count from the lines actually rendered, or size the clip to fit PREVIEW_MAX_LINES.

[UX-REVIEWED] ed13046

Description read

[DESCRIPTION-READ] 845b300bdfdacfbf08125dcd190b9184920b006375dfa9aa353967fe70b5fe98

That sha256 names everything this verdict read: the PR description, plus the 12 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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed ed130467729e6debbf655b8f2e110942e5f95e64 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] ed13046

Verdict parsed from the review's SHA-scoped output markers for commit ed130467729e6debbf655b8f2e110942e5f95e64.

False positive or not applicable? A repository writer can comment:
/ai-review override fable ed130467729e6debbf655b8f2e110942e5f95e64: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of ed130467729e6debbf655b8f2e110942e5f95e64 and found no blocking issues.

This comment is updated in place on each push.

Review details

FINDING -- docs/app-kit/api-reference.md:376 -- four lines and over 200 characters misstate the thresholds: ChatEmbed collapses three-line pastes and exactly 200-character pastes -> Fix: say “three or more lines, or 200 or more characters.”
[GPT-REVIEWED] ed13046

False positive or not applicable? A repository writer can comment:
/ai-review override gpt ed130467729e6debbf655b8f2e110942e5f95e64: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 16, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

UX review on b30ac35, both watch items:

  1. Chip bubble turns into full text in Spec Builder. Real, and the fix is on the host side, not here. Spec Builder's message endpoint posts and stores { text } only, so the stored row has no blocks. Copying the optimistic row's meta.pastes onto the stored row would only last until the next reload, and then the same message would look different again. The lasting fix is for Spec Builder to forward meta.pastes and store it like POST /api/chat does. That widens this PR into an app's backend, so it is follow-up Spec Builder: keep the paste chip on the stored user message #21147. Embeds that use the default send path keep the chip in the stored row already.
  2. Recovery notice after a refused send. The notice text ("Delivery not confirmed — your text is back in the composer; check the conversation above before sending again") is the embed's existing copy for a parked receipt. This PR doesn't change it; it only puts the chip back with the text. Changing that copy is out of this PR's scope.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 16, 2026
@buluoray
buluoray force-pushed the feat/chatembed-long-paste branch from b30ac35 to 3ee1374 Compare October 16, 2026 08:45
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 16, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

UX review on 3ee1374:

  1. Evidence gap: click-to-expand. Added to the description: before, and after a double-click on the chip (full 40 lines back as editable text), shot from this head's build on a pod. A single click selects the whole chip; a double-click expands it; a tap on touch expands directly. That is the dashboard composer's rule, from the same shared hook.
  2. Watch: Spec Builder's sent bubble changes shape. Same item as on b30ac35, answered there: Spec Builder's message endpoint stores { text } only. The lasting fix is for that endpoint to store meta.pastes, tracked in Spec Builder: keep the paste chip on the stored user message #21147. Folding a host row back through the side table would change how the embed transcript renders a row, which this PR lists under "Not a goal". Embeds on the default send path keep the chip in the stored row already.
  3. Suggestion: no space after the chip. The screenshot draft was typed with no space after the paste. The token is inserted exactly as in the dashboard composer. Adding a space automatically would change the shared hook for both composers, so not taken here.

@buluoray
buluoray force-pushed the feat/chatembed-long-paste branch from 3ee1374 to 0a07aea Compare October 16, 2026 09:57
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 16, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

UX review on 0a07aea, the three watch items:

  1. Sent bubble changes form in Spec Builder. The fix belongs to Spec Builder's message endpoint, which posts and stores { text } only. That is follow-up Spec Builder: keep the paste chip on the stored user message #21147 (store meta.pastes there). It is acceptable for now because the message is sent once, with its full text, and shows once: the stored row replaces the optimistic one (pinned by the host onSend test in ChatEmbed.longPaste.test.tsx). Embeds on the default send path keep the chip in the stored row.
  2. Nothing says a double-click expands the chip. The hint would go in the shared PastePreviewTooltip, which the dashboard chat uses too. This PR keeps the dashboard unchanged, so it is not taken here.
  3. Preview count. PastePreviewTooltip lists up to PREVIEW_MAX_LINES (12) lines and counts the rest (moreCount = lines - 12), so 12 + 28 = 40 matches the chip. The 6 visible lines are the tooltip's height limit clipping wrapped lines in a narrow box. That is shared tooltip code this PR does not touch (no hover or tooltip file in the diff), and the dashboard chat behaves the same.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Oct 16, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 16, 2026
@buluoray
buluoray force-pushed the feat/chatembed-long-paste branch from 0a07aea to b041c43 Compare October 18, 2026 06:02
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 18, 2026
@buluoray
buluoray force-pushed the feat/chatembed-long-paste branch from b041c43 to c8aecfe Compare October 18, 2026 06:58
@buluoray

Copy link
Copy Markdown
Contributor Author

Rebased onto main 9d088c8 (now includes #21152 pickers and #21066 layout-effect undo recording). New head c8aecfe. Conflicts kept both sides: picker docs and long-paste docs side by side, closePickers() and pastes.install([]) both run on send, onEdit opens pickers on the paste-chip textarea, and the store-free import-graph list covers the picker and paste modules. The moved useUndoHistory carries #21066's useLayoutEffect.

Review dispositions for b041c43:

  • Opus (non-blocking finding): fixed. Typed edits, chip delete/expand and picker inserts now go through setDraftFromUser, which marks the change as the user's own before setDraft. New test the first edit after a slot switch is undoable fails without the fix and passes with it. Spec updated in the same commit.
  • First Principles (CONCERNS, meta.pastes on host onSend has no consumer) and UX watch test: validate CI workflows on KiroCrew #1 (Spec Builder bubble flips from chip to full text): same root. Spec Builder's onSend takes only the text, so the stored row loses the block. Fixing it means either dropping pastes from ChatEmbedSendMeta and the optimistic row for host sends, or having Spec Builder forward meta. That is a public App SDK surface choice, left for the owner; not changed here.
  • UX watch refactor: rename project KiroClaw to KiroCrew #2 and footer suggestion (no expand hint, "… N more lines" count): both live in the shared PasteHoverLayer the main chat already uses; this PR does not change it.
  • Design (PASS): noted the file-token wire shape note; no change.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 18, 2026
@buluoray
buluoray force-pushed the feat/chatembed-long-paste branch from c8aecfe to 7e43c8b Compare October 18, 2026 07:31
@buluoray

Copy link
Copy Markdown
Contributor Author

Conflict-free rebase onto 943a4e5 (#21792) to pick up main's fix for test_history_bindings::test_the_member_set_is_the_frozen_inventory, which failed Backend Tests on c8aecfe and on main 9d088c8 alike. git range-diff shows both commits unchanged (=). New head 7e43c8b.

Lane note on c8aecfe: Opus and GPT found nothing; Design PASS. First Principles now asks whether rfc-chat-core-extraction.md covers paste collapse in ChatEmbed, and UX repeats the Spec Builder chip-to-full-text flip. Both are owner calls on the App SDK surface and are left as they are.

@buluoray

Copy link
Copy Markdown
Contributor Author

UX lane on 7e43c8b: the hint, footer-count and expand items are all in the shared PastePreviewTooltip/PasteHoverLayer, which the main chat uses today and this PR does not change. Filed as #21813 with acceptance criteria. The Spec Builder chip-to-full-text item is the host meta.pastes choice I flagged above, and it stays with the owner.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Oct 18, 2026
…ws retire on trimmed text

Move useUndoHistory into chat-core/composer/undoHistory.ts and mount it in
ChatEmbed as ChatInput does, so Cmd/Ctrl+Z after deleting a selected chip
brings back its block and the send carries the full text, not the token.
A host onSend endpoint may strip the text it stores, so retire the
optimistic row on trimmed text. Reload showFullPastes on
mc-config-changed/focus. Pin the flex-item guarantee on the textarea wrapper.
@buluoray
buluoray force-pushed the feat/chatembed-long-paste branch from 7e43c8b to ed13046 Compare October 20, 2026 15:54
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 20, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

Rebased onto main a5c1e85 (picks up #22042 host-send proof, #14761 Tab indent, #18263 mention range). New head ed13046, still 2 commits. Conflicts in ChatEmbed.tsx, pasteEditor.ts and keyboard.ts kept both sides; git range-diff shows only those splices plus one change: sendTailProof (new on main in #22042) now compares host rows with edge whitespace trimmed, the same rule this PR's second commit gives isPendingAcked, with a test in embedSendTails.test.ts that goes red when the trim is reverted and one line in app-kit-platform.md.

Lane dispositions on ed13046:

  • UX CONCERNS: the same three items as on 7e43c8b. The hint and preview count live in the shared PastePreviewTooltip/PasteHoverLayer and are tracked in Paste preview footer miscounts hidden lines and never names the chip gestures #21813; the Spec Builder chip-to-full-text change is the host's meta.pastes storage choice, as answered earlier. Advisory, no change here.
  • GPT 6.1 (non-blocking): correct. PASTE_THRESHOLD_LINES = 3 and PASTE_THRESHOLD_CHARS = 200 with >=, so the long-paste section in docs/app-kit/api-reference.md should read "three lines or more, or 200 characters or more". The one-line doc fix is ready locally and held so this green head is not restarted for a doc-only change; it will ride the next push.

@dodgeblaster
dodgeblaster merged commit 1a0e7f1 into main Oct 20, 2026
104 checks passed
@dodgeblaster
dodgeblaster deleted the feat/chatembed-long-paste branch October 20, 2026 18:10
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants