SPB Git forge
28commits 1branches 0releases
7.7 MBsize
maindefault branch
10 days agolast push
Python 66.3% TypeScript 22.7% JavaScript 8.6% HTML 1.4% CSS 0.7%

web: ask panel interpretation chips wrap and skip null/object values

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Simon-Pierre Boucher committed 12 days ago (Sep 12, 2026) parent ca467ab

1 changed file +9 −5

modified apps/web/src/app/search/page.tsx +9 −5
@@ -65,11 +65,15 @@ export default async function SearchPage({ searchParams }: { searchParams: Promi
65 65 {Object.keys(answer.interpretation ?? {}).length > 0 && (
66 66 <p className="mt-2 flex flex-wrap items-center gap-1 text-xs text-ink-3">
67 67 Interpreted as:
68 − {Object.entries(answer.interpretation).map(([k, v]) => (
69 − <Chip key={k} tone="outline">
70 − {k} = {String(v)}
71 − </Chip>
72 − ))}
68 + {Object.entries(answer.interpretation)
69 + .filter(([k, v]) => v !== null && v !== undefined && v !== '' && !(Array.isArray(v) && v.length === 0) && typeof v !== 'object' || Array.isArray(v))
70 + .filter(([k]) => !['question', 'source', 'parser_version', 'llm_model', 'prompt_version', 'answer_style', 'filters'].includes(k))
71 + .filter(([, v]) => !(Array.isArray(v) && v.length === 0))
72 + .map(([k, v]) => (
73 + <Chip key={k} tone="outline" className="max-w-full whitespace-normal break-words">
74 + {k.replace(/_/g, ' ')} = {Array.isArray(v) ? v.join(', ') : String(v)}
75 + </Chip>
76 + ))}
73 77 </p>
74 78 )}
75 79 {answer.companies.length > 0 && (
76 80