From 6318c93ae3c69f7bc86b7fed4bc9c68c1abc19ef Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 5 Jul 2026 18:47:10 +0000 Subject: [PATCH 1/2] Remove example chips from home search composer Examples belong on answer follow-ups, not the empty home search surface. Drop the ContextHintRow above the composer and the answer-mode Examples dropdown section; keep typed suggestions and mode actions intact. Co-authored-by: BigSimmo --- .../universal-search-command-surface.tsx | 61 ------------------- tests/ui-tools.spec.ts | 4 +- 2 files changed, 2 insertions(+), 63 deletions(-) diff --git a/src/components/clinical-dashboard/universal-search-command-surface.tsx b/src/components/clinical-dashboard/universal-search-command-surface.tsx index e9b37518e8..180cfa2e6e 100644 --- a/src/components/clinical-dashboard/universal-search-command-surface.tsx +++ b/src/components/clinical-dashboard/universal-search-command-surface.tsx @@ -8,7 +8,6 @@ import { type ModeActionId, type ModeActionSetId, } from "@/components/clinical-dashboard/mode-action-popup"; -import { AnswerSuggestionChips } from "@/components/clinical-dashboard/answer-suggestion-chips"; import { cn } from "@/components/ui-primitives"; import { appModeDefinition, type AppModeId } from "@/lib/app-modes"; import { appModeIcons } from "@/lib/app-mode-icons"; @@ -54,29 +53,6 @@ function OptionShell({ active, children, hint }: { active: boolean; children: Re export type CommandSurfacePlacement = "bottom-dock" | "inline"; -function ContextHintRow({ - examples, - onPickExample, - placement, -}: { - modeId: AppModeId; - examples: string[]; - onPickExample: (example: string) => void; - placement: CommandSurfacePlacement; -}) { - const visibilityClass = placement === "bottom-dock" ? "flex" : "hidden lg:flex"; - - return ( - - ); -} - function ScopeChipRow({ scopes, activeScopes, @@ -349,32 +325,6 @@ export function UniversalSearchCommandSurface({ ), })), }); - } else if (modeId === "answer" && config.examples.length) { - built.push({ - key: "examples", - heading: "Examples", - layout: "chips", - items: config.examples.map((example) => ({ - id: nextId(), - label: example, - onSelect: () => { - onDropdownOpenChange(false); - onQueryChange(example); - onFocusSearchInput?.(); - }, - render: (active) => ( - - {example} - - ), - })), - }); } } else { const suggestions = filteredSuggestions(config, trimmedQuery); @@ -492,7 +442,6 @@ export function UniversalSearchCommandSurface({ modeId, onCrossMode, onDropdownOpenChange, - onFocusSearchInput, onPickRecent, onQueryChange, onRunModeAction, @@ -582,16 +531,6 @@ export function UniversalSearchCommandSurface({ placement === "bottom-dock" ? "gap-1" : "gap-2", )} > - { - onQueryChange(example); - onDropdownOpenChange(true); - onFocusSearchInput?.(); - }} - />
{ diff --git a/tests/ui-tools.spec.ts b/tests/ui-tools.spec.ts index 66b6548dab..f110df06f7 100644 --- a/tests/ui-tools.spec.ts +++ b/tests/ui-tools.spec.ts @@ -90,7 +90,7 @@ async function commandSurfaceOpensAbovePill(page: Page) { await expect(input).toBeVisible(); // Phone footer-dock placement is applied after the header's media-query effect. // Opening the command surface before that settles leaves the dropdown on the - // inline placement (hidden below lg) even though the hint row is already visible. + // inline placement (hidden below lg) even though the footer composer is visible. await page.waitForFunction( () => Boolean(document.querySelector("form.answer-footer-search-dock, form.answer-footer-search-edge")), undefined, @@ -99,7 +99,7 @@ async function commandSurfaceOpensAbovePill(page: Page) { await input.click(); await expect(async () => { await input.press("ArrowDown"); - await expect(page.getByText("Examples", { exact: true }).first()).toBeVisible(); + await expect(page.getByText("Answer actions", { exact: true }).first()).toBeVisible(); await expect(page.getByRole("listbox").first()).toBeVisible(); }).toPass({ timeout: 15_000 }); From 902076f83352105d2c54aaf8907ebd0a68634476 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 5 Jul 2026 23:54:28 +0000 Subject: [PATCH 2/2] Fix UI smoke tests after removing home search examples Drop the lithium example-chip assertion from dashboard smoke coverage and assert the command dropdown exposes options instead of mode-specific action headings. Co-authored-by: BigSimmo --- tests/ui-smoke.spec.ts | 1 - tests/ui-tools.spec.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/ui-smoke.spec.ts b/tests/ui-smoke.spec.ts index 0d11ce21b4..54b7d95206 100644 --- a/tests/ui-smoke.spec.ts +++ b/tests/ui-smoke.spec.ts @@ -719,7 +719,6 @@ test.describe("Clinical KB UI smoke coverage", () => { await expect(page.getByTestId("scope-command-popover")).toBeHidden(); await expect(page.getByTestId("scope-prompts-drawer")).toHaveCount(0); await expect(page.getByTestId("mobile-scope-popover")).toHaveCount(0); - await expect(page.getByRole("button", { name: "lithium level timing" })).toBeVisible(); await expect(page.getByRole("button", { name: "Search documents" })).toBeVisible(); await expect(page.getByRole("button", { name: "Upload document" })).toBeVisible(); await expectDomIntegrity(page, { mobileNav: viewport.width <= 768 }); diff --git a/tests/ui-tools.spec.ts b/tests/ui-tools.spec.ts index f110df06f7..618bc2983b 100644 --- a/tests/ui-tools.spec.ts +++ b/tests/ui-tools.spec.ts @@ -99,8 +99,8 @@ async function commandSurfaceOpensAbovePill(page: Page) { await input.click(); await expect(async () => { await input.press("ArrowDown"); - await expect(page.getByText("Answer actions", { exact: true }).first()).toBeVisible(); await expect(page.getByRole("listbox").first()).toBeVisible(); + await expect(page.getByRole("option").first()).toBeVisible(); }).toPass({ timeout: 15_000 }); const listbox = page.getByRole("listbox").first();