Automate issuer overlay creation from ticker searches

This commit is contained in:
2026-03-19 20:44:58 -04:00
parent 17de3dd72d
commit 391d6d34ce
79 changed files with 4746 additions and 695 deletions

View File

@@ -10,7 +10,7 @@ import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Panel } from '@/components/ui/panel';
import { useAuthGuard } from '@/hooks/use-auth-guard';
import { getSearchAnswer } from '@/lib/api';
import { ensureTickerAutomation, getSearchAnswer } from '@/lib/api';
import { searchQueryOptions } from '@/lib/query/options';
import type { SearchAnswerResponse, SearchResult, SearchSource } from '@/lib/types';
@@ -113,6 +113,13 @@ function SearchPageContent() {
return;
}
if (ticker.trim()) {
void ensureTickerAutomation({
ticker,
source: 'search'
});
}
startAnswerTransition(() => {
setError(null);
getSearchAnswer({
@@ -141,8 +148,15 @@ function SearchPageContent() {
className="space-y-3"
onSubmit={(event) => {
event.preventDefault();
const normalizedTicker = tickerInput.trim().toUpperCase();
if (normalizedTicker) {
void ensureTickerAutomation({
ticker: normalizedTicker,
source: 'search'
});
}
setQuery(queryInput.trim());
setTicker(tickerInput.trim().toUpperCase());
setTicker(normalizedTicker);
setAnswer(null);
}}
>