Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -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";
Expand DownExpand Up@@ -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 (
<AnswerSuggestionChips
suggestions={examples}
onPick={onPickExample}
label="Examples"
layout="scroll"
className={visibilityClass}
/>
);
}

function ScopeChipRow({
scopes,
activeScopes,
Expand DownExpand Up@@ -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) => (
<span
className={cn(
"answer-suggestion-chip",
active &&
"border-[color:var(--clinical-accent)] bg-[color:var(--clinical-accent-soft)] text-[color:var(--clinical-accent)]",
)}
>
{example}
</span>
),
})),
});
}
} else {
const suggestions = filteredSuggestions(config, trimmedQuery);
Expand DownExpand Up@@ -492,7 +442,6 @@ export function UniversalSearchCommandSurface({
modeId,
onCrossMode,
onDropdownOpenChange,
onFocusSearchInput,
onPickRecent,
onQueryChange,
onRunModeAction,
Expand DownExpand Up@@ -582,16 +531,6 @@ export function UniversalSearchCommandSurface({
placement === "bottom-dock" ? "gap-1" : "gap-2",
)}
>
<ContextHintRow
modeId={modeId}
examples={config.examples}
placement={placement}
onPickExample={(example) => {
onQueryChange(example);
onDropdownOpenChange(true);
onFocusSearchInput?.();
}}
/>
<div
className="relative w-full"
onKeyDownCapture={(event) => {
Expand Down
1 change: 0 additions & 1 deletion tests/ui-smoke.spec.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -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 });
Expand Down
4 changes: 2 additions & 2 deletions tests/ui-tools.spec.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -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,
Expand All@@ -99,8 +99,8 @@ 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.getByRole("listbox").first()).toBeVisible();
await expect(page.getByRole("option").first()).toBeVisible();
}).toPass({ timeout: 15_000 });

const listbox = page.getByRole("listbox").first();
Expand Down
Loading