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
18 changes: 10 additions & 8 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -1340,15 +1340,17 @@ summary::-webkit-details-marker {
display: none;
}

.cross-mode-links-rail {
scrollbar-width: none;
-ms-overflow-style: none;
mask-image: linear-gradient(90deg, black calc(100% - 1rem), transparent);
-webkit-mask-image: linear-gradient(90deg, black calc(100% - 1rem), transparent);
}
@media (min-width: 768px) {
.cross-mode-links-rail {
scrollbar-width: none;
-ms-overflow-style: none;
mask-image: linear-gradient(90deg, black calc(100% - 1rem), transparent);
-webkit-mask-image: linear-gradient(90deg, black calc(100% - 1rem), transparent);
}

.cross-mode-links-rail::-webkit-scrollbar {
display: none;
.cross-mode-links-rail::-webkit-scrollbar {
display: none;
}
}

.answer-suggestion-chip {
Expand Down
3 changes: 0 additions & 3 deletions src/components/ClinicalDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
primaryControl,
textMuted,
toneInfo,
toneSuccess,

Check warning on line 41 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions / verify

'toneSuccess' is defined but never used
toneWarning,

Check warning on line 42 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions / verify

'toneWarning' is defined but never used
} from "@/components/ui-primitives";
import { useAuthSession } from "@/lib/supabase/client";
import { AccountSetupDialog } from "@/components/clinical-dashboard/account-setup-dialog";
Expand Down Expand Up @@ -3502,9 +3502,6 @@

{showSystemNotice && answer ? renderSystemNotice("sm:hidden") : null}

{activeModeResultKind === "answer" && answer && (
<CrossModeLinksSection queries={crossModeQueries} onModeSearch={handleCrossModeSearch} />
)}
{activeModeResultKind === "answer" && answer && (
<RelatedDocumentsPanel
documents={relatedDocuments}
Expand Down
10 changes: 6 additions & 4 deletions src/components/clinical-dashboard/cross-mode-links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,13 @@ function CrossModeLinkActions({
link,
query,
onModeSearch,
compact = false,
}: {
link: CrossModeLink;
query: string;
onModeSearch: (mode: AppModeId, query: string) => void;
compact?: boolean;
}) {
return (
<div className={cn("flex flex-wrap items-center gap-2", compact ? "pt-1" : "pt-0.5")}>
<div className="flex flex-wrap items-center gap-2 pt-1">
<Link
href={link.detailHref}
onClick={() => logCrossModeLinkOpen(query, link)}
Expand Down Expand Up @@ -102,6 +100,7 @@ function CrossModeLinkActions({
function CrossModeLinkCard({ link, Icon, query, onModeSearch }: CrossModeLinkCardProps) {
return (
<article
role="listitem"
className={cn(
sourceCard,
"flex shrink-0 flex-col gap-2 p-3",
Expand Down Expand Up @@ -129,7 +128,7 @@ function CrossModeLinkCard({ link, Icon, query, onModeSearch }: CrossModeLinkCar
<CrossModeLinkBadges badges={link.badges} />
</div>
</div>
<CrossModeLinkActions link={link} query={query} onModeSearch={onModeSearch} compact />
<CrossModeLinkActions link={link} query={query} onModeSearch={onModeSearch} />
</article>
);
}
Expand Down Expand Up @@ -220,6 +219,9 @@ export function CrossModeLinksStrip({
</p>

<div
role="list"
tabIndex={links.length > 1 ? 0 : undefined}
aria-label={links.length > 1 ? "Related library matches; scroll horizontally for more" : undefined}
className="cross-mode-links-rail polished-scroll grid gap-2 overflow-x-auto overscroll-x-contain pb-1 md:flex md:w-max md:max-w-full md:gap-2.5"
data-testid="cross-mode-links-rail"
>
Expand Down
1 change: 1 addition & 0 deletions tests/ui-smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,7 @@ test.describe("Clinical KB UI smoke coverage", () => {
const answerSurface = page.locator('[data-dashboard-stage="answer-surface"]');
const strip = answerSurface.getByTestId("cross-mode-links");
await expect(strip).toBeVisible({ timeout: 15_000 });
await expect(answerSurface.getByTestId("cross-mode-links")).toHaveCount(1);
const rail = strip.getByTestId("cross-mode-links-rail");
await expect(rail).toBeVisible();
await expect(rail).toHaveClass(/overflow-x-auto/);
Expand Down
Loading