From cd11ada26d9ada781e1152890203a8cca1e6dcbe Mon Sep 17 00:00:00 2001 From: Gabriel Birman <25272206+gbirman@users.noreply.github.com> Date: Mon, 15 Jun 2026 11:02:32 -0400 Subject: [PATCH 1/2] fix(lexical): collapse nested block paragraphs in single-line editors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Snippet insertion replaces an inline await placeholder with block paragraph nodes nested inside the single root paragraph, which the single-line plugin's root-child check missed — so a snippet's trailing newline rendered as an extra row in the search bar. Unwrap nested block paragraphs onto the one line. --- .../plugins/single-line/singleLinePlugin.ts | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/single-line/singleLinePlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/single-line/singleLinePlugin.ts index 8cfdf75d15..27ea5e63d5 100644 --- a/js/app/packages/core/component/LexicalMarkdown/plugins/single-line/singleLinePlugin.ts +++ b/js/app/packages/core/component/LexicalMarkdown/plugins/single-line/singleLinePlugin.ts @@ -2,7 +2,13 @@ * @file A plugin to enforce a single line only. */ import { mergeRegister } from '@lexical/utils'; -import { type LexicalEditor, LineBreakNode, RootNode } from 'lexical'; +import { + $isRootNode, + type LexicalEditor, + LineBreakNode, + ParagraphNode, + RootNode, +} from 'lexical'; export function singleLinePlugin() { return (editor: LexicalEditor) => { @@ -15,6 +21,19 @@ export function singleLinePlugin() { editor.registerNodeTransform(LineBreakNode, (node) => { node.remove(); + }), + + // Programmatic inserts (snippets, paste) can nest block paragraphs inside + // the single root paragraph, which the root-child check above doesn't + // catch. Unwrap them so a nested block's inline content collapses onto the + // one line instead of rendering as extra rows. + editor.registerNodeTransform(ParagraphNode, (node) => { + const parent = node.getParent(); + if (!parent || $isRootNode(parent)) return; + for (const child of node.getChildren()) { + node.insertBefore(child); + } + node.remove(); }) ); }; From 4fc3971bfe85d22166e72021aff137ea81911a90 Mon Sep 17 00:00:00 2001 From: Gabriel Birman <25272206+gbirman@users.noreply.github.com> Date: Mon, 15 Jun 2026 11:37:17 -0400 Subject: [PATCH 2/2] fix(search): clip long search values instead of overflowing the header contain:inline-size keeps the search field's width independent of its text, so a long paste/snippet truncates within the bar instead of growing the header and pushing the title and nav controls off-screen. --- js/app/packages/app/component/next-soup/soup-view/soup-view.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx index 792dbea5fe..b3834af65f 100644 --- a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx +++ b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx @@ -629,7 +629,7 @@ export const SoupView = (props: SoupViewProps) => { when={!isComponentListView('search')} fallback={ -
+