You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Selecting an excerpt from an assistant message, copying it, and pasting it into the composer can insert several blank lines after the visible text. The clipboard should contain only the text the user can see selected.
Versions and environment
bb 0.40.0, reproduced from source at 31a190ddb5f0ffb86cb8dcd80482497663de2685 (origin/main)
Arch Linux, kernel 7.1.8-arch1-3, x86_64
Node.js v26.7.0
Chromium 152.0.0.0
Clean development data directory and detached checkout of origin/main
Provider-independent after the assistant message exists; Codex was used only to create the fixture message
Steps to reproduce
Start bb from main with pnpm dev and open any thread containing an assistant paragraph followed by another timeline row.
In the assistant paragraph, double-click and drag from a word near the start through the visually final word of the paragraph.
Press Ctrl+C.
Click the composer and press Ctrl+V.
Observe the blank lines inserted after the selected sentence.
A deterministic DevTools-console helper can create the same cross-row selection before steps 3-4:
(()=>{constprose=[...document.querySelectorAll("[data-sidebar-swipe-selectable]")].find((node)=>node.textContent?.trim());consttextNode=prose?.querySelector("p")?.firstChild;constrow=prose?.closest("[data-timeline-row-id]");constfollowingRow=row?.nextElementSibling;if(!(textNodeinstanceofText)||!(followingRowinstanceofElement)){thrownewError("Need an assistant paragraph followed by another timeline row.");}constrange=document.createRange();range.setStart(textNode,Math.min(3,textNode.length));range.setEnd(followingRow,0);constselection=window.getSelection();selection?.removeAllRanges();selection?.addRange(range);consttext=selection?.toString()??"";console.log({text: JSON.stringify(text),trailingWhitespace: text.length-text.trimEnd().length,});})();
Browser security requires Ctrl+C and Ctrl+V to remain trusted user actions, so a fully self-contained console script cannot perform the final clipboard steps.
Expected vs actual
Expected:
The composer contains the visibly selected sentence and no trailing blank lines.
Actual:
The native selection and text/plain clipboard payload contain the sentence followed by seven newline characters. Pasting expands the composer with seven blank lines after the sentence. Submitting the message strips those trailing newlines, so the sent message is unaffected.
Evidence
Reproduced on main at 31a190ddb5f0ffb86cb8dcd80482497663de2685.
The visible selection contained one sentence, while the native selection and text/plain clipboard payload ended with seven newline characters.
The selection controller trims text for its floating action payload but does not change the browser's live Range:
Visible selection: one assistant sentence
Native selection / clipboard suffix: \n\n\n\n\n\n\n
Anchor: assistant paragraph
Focus: a following timeline row
What you ruled out
Still reproduces on main at 31a190ddb5f0ffb86cb8dcd80482497663de2685 with a clean development data directory.
Does not reproduce when both native Range endpoints remain inside the assistant prose wrapper.
Does not depend on the provider after the assistant message has rendered.
Pressing Enter strips the trailing newlines before submission; the problem is limited to the draft's visual state.
Searches for copy paste newlines text selection, clipboard selection, and newlines paste chat found no matching open or closed issue. Clipboard copy actions fail on plain-HTTP LAN origins #1590 concerns clipboard permission failures on plain-HTTP origins, not extra newlines from selection serialization.
Suggested priority and effort
Low priority: this is a visual-quality issue in the draft composer. It does not change the submitted message, lose data, or block the workflow.
Checks
Reproduced on main.
Searched open and closed issues for duplicates.
Included exact environment, steps, observed clipboard contents, and commit permalinks.
Summary
Selecting an excerpt from an assistant message, copying it, and pasting it into the composer can insert several blank lines after the visible text. The clipboard should contain only the text the user can see selected.
Versions and environment
31a190ddb5f0ffb86cb8dcd80482497663de2685(origin/main)origin/mainSteps to reproduce
mainwithpnpm devand open any thread containing an assistant paragraph followed by another timeline row.A deterministic DevTools-console helper can create the same cross-row selection before steps 3-4:
Browser security requires Ctrl+C and Ctrl+V to remain trusted user actions, so a fully self-contained console script cannot perform the final clipboard steps.
Expected vs actual
Evidence
mainat31a190ddb5f0ffb86cb8dcd80482497663de2685.text/plainclipboard payload ended with seven newline characters.bb/apps/app/src/components/thread/timeline/SelectableMessageProse.tsx
Lines 169 to 198 in 31a190d
bb/apps/app/src/components/promptbox/PromptBoxInternal.tsx
Lines 1849 to 1896 in 31a190d
Observed selection state during reproduction:
What you ruled out
mainat31a190ddb5f0ffb86cb8dcd80482497663de2685with a clean development data directory.copy paste newlines text selection,clipboard selection, andnewlines paste chatfound no matching open or closed issue. Clipboard copy actions fail on plain-HTTP LAN origins #1590 concerns clipboard permission failures on plain-HTTP origins, not extra newlines from selection serialization.Suggested priority and effort
Low priority: this is a visual-quality issue in the draft composer. It does not change the submitted message, lose data, or block the workflow.
Checks
main.