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
9 changes: 9 additions & 0 deletions src/components/DocumentTagCloud.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ function confidenceTitle(tag: SmartDocumentTag) {
return `${tag.group}: ${tag.source} tag, ${Math.round(tag.confidence * 100)}% confidence`;
}

/**
* Renders a document tag with group-specific styling and optional search interaction.
*
* @param tag - The document tag to display.
* @param compact - Whether to use compact sizing.
* @param selected - Whether to indicate the tag as selected.
* @param onTagClick - Optional callback invoked when the tag is clicked.
* @returns The rendered document tag chip.
*/
function DocumentTagChip({
tag,
compact,
Expand Down
6 changes: 6 additions & 0 deletions src/components/applications-launcher-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ function QuickActions({ onSelect, mobile }: { onSelect: (id: string) => void; mo
);
}

/**
* Renders responsive tabs for selecting a tool category.
*
* @param activeFilter - The currently selected tool category.
* @param onFilterChange - Called with the selected category when a tab is activated.
*/
function FilterTabs({
activeFilter,
onFilterChange,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ function ContinueStrip({ item, onSelect }: { item: FavouriteItem; onSelect: (id:
);
}

/**
* Renders a menu of actions for a favourite item.
*
* @param item - The favourite item associated with the available actions
*/
function RowActionsMenu({ item }: { item: FavouriteItem }) {
const [open, setOpen] = useState(false);
const buttonRef = useRef<HTMLButtonElement>(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ function SidebarRow({ entry }: { entry: SidebarEntry }) {
);
}

/**
* Renders the favourites library navigation sidebar in expanded or compact mode.
*
* @param collapsed - Whether to display the compact sidebar layout.
* @param onCollapsedChange - Called when the user requests a different sidebar layout.
*/
export function FavouritesSidebar({
collapsed,
onCollapsedChange,
Expand Down
22 changes: 22 additions & 0 deletions src/components/differentials/differential-detail-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ const sectionItemIconClass: Partial<Record<DifferentialSection["tone"], string>>
test: "text-[color:var(--info)]",
};

/**
* Renders section items according to the section tone.
*
* @param section - The section whose tone determines the item layout and styling
* @param items - The items to display
* @param overlapLinks - Maps overlap item labels to diagnosis slugs for linked items
* @returns The rendered section item list
*/
function SectionItems({
section,
items,
Expand Down Expand Up @@ -702,6 +710,14 @@ function FooterStatus({
);
}

/**
* Renders desktop actions for comparing, copying, and saving a diagnosis.
*
* @param record - The diagnosis record whose content is copied.
* @param saved - Whether the diagnosis is currently saved.
* @param onToggleSaved - Called when the saved state is toggled.
* @param onCompare - Called when comparison is requested.
*/
function TopActions({
record,
saved,
Expand Down Expand Up @@ -833,6 +849,12 @@ const detailTabs: Array<{ id: DifferentialDetailTabId; label: string }> = [
{ id: "source", label: "Source" },
];

/**
* Renders keyboard-navigable tabs for the diagnosis detail sections.
*
* @param active - The currently selected tab.
* @param onChange - Called when the selected tab changes.
*/
function Tabs({
active,
onChange,
Expand Down
6 changes: 6 additions & 0 deletions src/components/services/service-detail-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ function SummaryCard({ card }: { card: ServiceSummaryCard }) {
);
}

/**
* Displays referral information rows with their values and copy actions.
*
* @param rows - The referral information rows to display
* @param onCopy - Callback invoked with a row value and feedback label when copying is requested
*/
function ReferralTable({
rows,
onCopy,
Expand Down