From a97204f12cde0d5d62e6066f6dc9120aa417a4d3 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Fri, 30 Oct 2026 18:57:47 -0700 Subject: [PATCH 1/2] fix(docs): simplify selection and verify media interactions --- apps/docs/components/docs/navigation.tsx | 3 +-- apps/docs/components/docs/tokens.css | 2 -- apps/docs/migration/design-system.md | 2 +- apps/docs/scripts/test-navigation-e2e.ts | 14 +++++++++++++- apps/docs/scripts/test-search-postgres-e2e.ts | 13 ++++++++----- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/apps/docs/components/docs/navigation.tsx b/apps/docs/components/docs/navigation.tsx index 5e591564cbe..73d5eb4f693 100644 --- a/apps/docs/components/docs/navigation.tsx +++ b/apps/docs/components/docs/navigation.tsx @@ -68,8 +68,7 @@ function NavigationItem({ node, pathname, onNavigate }: NavigationItemProps) {
{ + const citations = await sql< + Array<{ chunk_id: string; source_link: string; embedding: string }> + >`SELECT chunk_id, source_link, embedding::text FROM docs_embeddings WHERE source_document = ${page.sourcePath} ORDER BY chunk_id` + assert(citations.length > 0) await sql`UPDATE docs_embeddings SET source_link = 'https://old.example/introduction' WHERE source_document = ${page.sourcePath}` assert.equal((await index('check', 'citation-stale', ['/introduction'])).exitCode, 1) const repaired = await index('publish', 'citation-repaired', ['/introduction']) assert.equal(repaired.exitCode, 0) assert.deepEqual(await fingerprint(), fresh) - const [row] = await sql< - Array<{ source_link: string; embedding: string }> - >`SELECT source_link, embedding::text FROM docs_embeddings WHERE source_document = ${page.sourcePath}` - assert.equal(row?.source_link, 'https://docs.sim.ai/introduction') - assert.equal(row?.embedding, vector) + const repairedCitations = await sql< + Array<{ chunk_id: string; source_link: string; embedding: string }> + >`SELECT chunk_id, source_link, embedding::text FROM docs_embeddings WHERE source_document = ${page.sourcePath} ORDER BY chunk_id` + assert.deepEqual(repairedCitations, citations) assert.equal((await index('check', 'citation-fresh', ['/introduction'])).exitCode, 0) } ) From 66fb724d01de997d7314796788eab38b6689abe8 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Fri, 30 Oct 2026 19:13:01 -0700 Subject: [PATCH 2/2] fix(docs): wait for actionable lightbox backdrop in e2e --- apps/docs/scripts/test-navigation-e2e.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/docs/scripts/test-navigation-e2e.ts b/apps/docs/scripts/test-navigation-e2e.ts index c488242d522..005ee37baf3 100644 --- a/apps/docs/scripts/test-navigation-e2e.ts +++ b/apps/docs/scripts/test-navigation-e2e.ts @@ -593,7 +593,9 @@ try { await expect(trigger).toBeFocused() await trigger.press('Enter') await expect(viewer).toBeVisible() - await page.mouse.click(1, 1) + await page + .locator('.docs-portal[data-state="open"][aria-hidden="true"]') + .click({ position: { x: 1, y: 1 } }) await expect(viewer).toHaveCount(0) await expect(trigger).toBeFocused() await trigger.press('Enter')