An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
fix(ui): ensure header truncation works reliably
Yoshiki Miurac0fbee191834
diff --git a/components/process-header.tsx b/components/process-header.tsxindex b39d275c..d7a076f1 100644--- a/components/process-header.tsx+++ b/components/process-header.tsx@@ -1,10 +1,12 @@'use client'+import type { ReactNode } from 'react'+import { cn } from '@/lib/utils'export type ProcessHeaderProps = {- label: React.ReactNode- meta?: React.ReactNode+ label: ReactNode+ meta?: ReactNodeonInspect?: () => voidisLoading?: booleanariaExpanded?: boolean@@ -30,7 +32,7 @@ export function ProcessHeader({className)}>- <span className="min-w-0 max-w-full truncate">{label}</span>+ <div className="min-w-0 max-w-full flex-1 overflow-hidden">{label}</div>{meta ? (<span className="shrink-0 ml-2 text-xs text-muted-foreground flex items-center gap-1">{meta}diff --git a/components/search-section.tsx b/components/search-section.tsxindex a9d26edd..b3b63a73 100644--- a/components/search-section.tsx+++ b/components/search-section.tsx@@ -61,10 +61,10 @@ export function SearchSection({isLoading={isLoading && isToolLoading}ariaExpanded={isOpen}label={- <span className="inline-flex items-center gap-2 min-w-0">+ <div className="flex items-center gap-2 min-w-0 overflow-hidden"><SearchIcon className="h-4 w-4 shrink-0 text-muted-foreground" />- <span className="truncate">{`${query}${includeDomainsString}`}</span>- </span>+ <span className="truncate block min-w-0 max-w-full">{`${query}${includeDomainsString}`}</span>+ </div>}meta={searchResults && totalResults > 0 ? (