From d1da119389e32147a135c2e695d43a1e5a4874a3 Mon Sep 17 00:00:00 2001 From: Coracle-Bot Date: Wed, 9 Sep 2026 20:50:11 +0000 Subject: [PATCH] Parse content seeded into the editor so it contributes tags --- e2e/specs/articles-threads.spec.ts | 4 +++- src/app/components/RoomItemMenu.svelte | 1 - src/app/components/RoomItemMenuMobile.svelte | 1 - src/app/components/ThreadCreate.svelte | 8 +------- src/app/editor/index.ts | 9 ++++++++- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/e2e/specs/articles-threads.spec.ts b/e2e/specs/articles-threads.spec.ts index be883664..6effa6a4 100644 --- a/e2e/specs/articles-threads.spec.ts +++ b/e2e/specs/articles-threads.spec.ts @@ -959,7 +959,9 @@ test("US-045 turn a chat message into a thread", async ({seed, as}) => { const composer = modal(page, "Create a Thread") const nevent = nip19.neventEncode({id: promoted.id, kind: MESSAGE, relays: [url]}) - await expect(editorOf(composer)).toContainText(`nostr:${nevent}`) + // The seeded entity is parsed, so the composer shows the editor's chip for it rather than + // the raw uri — which is also what makes the thread carry a q tag for the message. + await expect(editorOf(composer)).toContainText(`${nevent.slice(0, 16)}...`) await composer.getByPlaceholder("What is this thread about?").fill("Deploy failures") await composer.getByRole("button", {name: "Create Thread"}).click() diff --git a/src/app/components/RoomItemMenu.svelte b/src/app/components/RoomItemMenu.svelte index 0ea25a76..e1558b08 100644 --- a/src/app/components/RoomItemMenu.svelte +++ b/src/app/components/RoomItemMenu.svelte @@ -60,7 +60,6 @@ pushModal(ThreadCreate, { url, h, - quote: event, initialValues: {content: toNostrURI(nip19.neventEncode({...event, relays: [url]}))}, }) } diff --git a/src/app/components/RoomItemMenuMobile.svelte b/src/app/components/RoomItemMenuMobile.svelte index 031211dd..66adec2a 100644 --- a/src/app/components/RoomItemMenuMobile.svelte +++ b/src/app/components/RoomItemMenuMobile.svelte @@ -69,7 +69,6 @@ { url, h, - quote: event, initialValues: {content: toNostrURI(nip19.neventEncode({...event, relays: [url]}))}, }, {replaceState: true}, diff --git a/src/app/components/ThreadCreate.svelte b/src/app/components/ThreadCreate.svelte index ac51e3e0..7f0fe4d0 100644 --- a/src/app/components/ThreadCreate.svelte +++ b/src/app/components/ThreadCreate.svelte @@ -1,6 +1,5 @@