From 5520b851de2395916cb3885ad92d11e21ef04b23 Mon Sep 17 00:00:00 2001 From: Coracle-Bot Date: Fri, 11 Sep 2026 00:47:26 +0000 Subject: [PATCH] Keep a profile pinned note out of the feed store so it renders once (#499) --- e2e/specs/people.spec.ts | 5 ++++- src/app/components/ProfilePageNotes.svelte | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/e2e/specs/people.spec.ts b/e2e/specs/people.spec.ts index b5035a16..f84c798c 100644 --- a/e2e/specs/people.spec.ts +++ b/e2e/specs/people.spec.ts @@ -465,9 +465,11 @@ test("US-079 read a person's notes", async ({seed, as}) => { makeEvent(NOTE, {content: "Anyone seen the tide charts?", created_at: at(4, HOUR)}), ) + // Older than the feed's first window, so the pin is fetched by id while the feed only + // reaches it by paging — the order in which one note arrives down both routes. pinned = space.event( user.alice, - makeEvent(NOTE, {content: "PINNED how to read a tide chart", created_at: at(3, HOUR)}), + makeEvent(NOTE, {content: "PINNED how to read a tide chart", created_at: at(2, MONTH)}), ) space.event( @@ -521,6 +523,7 @@ test("US-079 read a person's notes", async ({seed, as}) => { // The pin outranks the newer notes; the rest are newest first. await expect(list.first()).toContainText("PINNED") + await expect(list.filter({hasText: "PINNED"})).toHaveCount(1) await expect(list.nth(1)).toContainText("NEWEST") await expect(list.nth(2)).toContainText("MIDDLE") diff --git a/src/app/components/ProfilePageNotes.svelte b/src/app/components/ProfilePageNotes.svelte index 2f0791d2..2b129e61 100644 --- a/src/app/components/ProfilePageNotes.svelte +++ b/src/app/components/ProfilePageNotes.svelte @@ -1,7 +1,7 @@