diff --git a/app/analysis/page.tsx b/app/analysis/page.tsx index 8e0e8db..3cf88a5 100644 --- a/app/analysis/page.tsx +++ b/app/analysis/page.tsx @@ -275,6 +275,21 @@ function AnalysisPageContent() {

{analysis?.company.companyName ?? ticker}

{analysis?.company.ticker ?? ticker}

{analysis?.company.sector ?? 'Sector unavailable'}

+ {analysis?.company.category ? ( +

{analysis.company.category}

+ ) : null} + {analysis?.company.tags.length ? ( +
+ {analysis.company.tags.map((tag) => ( + + {tag} + + ))} +
+ ) : null} diff --git a/app/filings/page.tsx b/app/filings/page.tsx index 6da6e94..084e729 100644 --- a/app/filings/page.tsx +++ b/app/filings/page.tsx @@ -47,6 +47,21 @@ function hasFinancialSnapshot(filing: Filing) { return filing.filing_type === '10-K' || filing.filing_type === '10-Q'; } +function parseTagsInput(input: string) { + const unique = new Set(); + + for (const segment of input.split(',')) { + const tag = segment.trim(); + if (!tag) { + continue; + } + + unique.add(tag); + } + + return [...unique]; +} + function asScaledFinancialSnapshot( value: number | null | undefined, scale: NumberScaleUnit @@ -111,6 +126,8 @@ function FilingsPageContent() { const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [syncTickerInput, setSyncTickerInput] = useState(''); + const [syncCategoryInput, setSyncCategoryInput] = useState(''); + const [syncTagsInput, setSyncTagsInput] = useState(''); const [filterTickerInput, setFilterTickerInput] = useState(''); const [searchTicker, setSearchTicker] = useState(''); const [financialValueScale, setFinancialValueScale] = useState('millions'); @@ -156,7 +173,12 @@ function FilingsPageContent() { } try { - await queueFilingSync({ ticker: syncTickerInput.trim().toUpperCase(), limit: 20 }); + await queueFilingSync({ + ticker: syncTickerInput.trim().toUpperCase(), + limit: 20, + category: syncCategoryInput.trim() || undefined, + tags: parseTagsInput(syncTagsInput) + }); void queryClient.invalidateQueries({ queryKey: queryKeys.recentTasks(20) }); void queryClient.invalidateQueries({ queryKey: ['filings'] }); await loadFilings(searchTicker || undefined); @@ -227,6 +249,18 @@ function FilingsPageContent() { placeholder="Ticker (AAPL)" className="w-full sm:max-w-xs" /> + setSyncCategoryInput(event.target.value)} + placeholder="Category (optional)" + className="w-full sm:max-w-xs" + /> + setSyncTagsInput(event.target.value)} + placeholder="Tags (comma-separated)" + className="w-full sm:max-w-xs" + /> Sector setForm((prev) => ({ ...prev, sector: event.target.value }))} /> +
+ + setForm((prev) => ({ ...prev, category: event.target.value }))} placeholder="e.g. Core, Speculative, Watch only" /> +
+
+ + setForm((prev) => ({ ...prev, tags: event.target.value }))} placeholder="Comma-separated tags" /> +