From 61080d46f086966aaf0a19177ea053584feebcd6 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 9 Jul 2026 03:57:05 +0000 Subject: [PATCH 1/2] fix(answer): remove duplicate cross-mode links strip on main Delete the footer CrossModeLinksSection in answer mode so the library strip renders once inside StagedAnswerResultSurface. Lock the contract with a Playwright assertion that exactly one cross-mode-links test id exists on the page. Co-authored-by: BigSimmo --- src/components/ClinicalDashboard.tsx | 3 --- tests/ui-smoke.spec.ts | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/ClinicalDashboard.tsx b/src/components/ClinicalDashboard.tsx index 46c9f3b1f..5ee16227c 100644 --- a/src/components/ClinicalDashboard.tsx +++ b/src/components/ClinicalDashboard.tsx @@ -3502,9 +3502,6 @@ export function ClinicalDashboard({ {showSystemNotice && answer ? renderSystemNotice("sm:hidden") : null} - {activeModeResultKind === "answer" && answer && ( - - )} {activeModeResultKind === "answer" && answer && ( { await page.goto(`/?mode=answer&q=${encodeURIComponent(question)}&run=1`, { waitUntil: "domcontentloaded", }); - await expect(page.getByTestId("plain-answer-response")).toBeVisible({ timeout: uiAssertionTimeoutMs }); + await expect(page.getByTestId("plain-answer-response")).toBeVisible({ timeout: 15_000 }); + + await expect(page.getByTestId("cross-mode-links")).toHaveCount(1, { timeout: 15_000 }); const answerSurface = page.locator('[data-dashboard-stage="answer-surface"]'); const strip = answerSurface.getByTestId("cross-mode-links"); From 8ccd2b6f90efdd4e118cf5085bccbce56827edd8 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 9 Jul 2026 04:13:33 +0000 Subject: [PATCH 2/2] test(ui-smoke): retry mobile table fullscreen open to reduce flake Co-authored-by: BigSimmo --- tests/ui-smoke.spec.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/ui-smoke.spec.ts b/tests/ui-smoke.spec.ts index be9a582ea..9a1561c15 100644 --- a/tests/ui-smoke.spec.ts +++ b/tests/ui-smoke.spec.ts @@ -589,9 +589,12 @@ async function scrollMobileTableExpandClearOfFooter(page: Page, clinicalTable: L async function openMobileTableFullscreen(page: Page, clinicalTable: Locator) { await scrollMobileTableExpandClearOfFooter(page, clinicalTable); const tableSurface = clinicalTable.getByTestId("accessible-table-surface"); - await tableSurface.click({ force: true }); const tableDialog = page.getByTestId("table-fullscreen-dialog"); - await expect(tableDialog).toBeVisible({ timeout: 10_000 }); + await expect(async () => { + if (await tableDialog.isVisible().catch(() => false)) return; + await tableSurface.click({ force: true }); + await expect(tableDialog).toBeVisible({ timeout: 2_000 }); + }).toPass({ timeout: 15_000 }); return tableDialog; }