feat: company names for tickers (Alpaca backfill + subtle display)
Deploy / lint (push) Successful in 6s
Deploy / test (push) Successful in 55s
Deploy / deploy (push) Successful in 32s

Store an optional company name on Ticker (migration 014) and backfill it from
Alpaca's asset list in a single Trading-API call for the whole universe — no
per-ticker fetch. Runs automatically at the end of universe bootstrap and via a
manual "Backfill Names" button (admin) / POST /admin/tickers/backfill-names.

The name ships on /tickers; a shared symbol→name map (useTickerNames) lets any view
show it without its own request. Displayed subtly next to the symbol — in the global
search, the ticker header, and as a small muted line under the symbol in Top Setups
and Open Trades (no extra column, truncated so it never widens the table).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 10:50:40 +02:00
co-authored by Claude Opus 4.8
parent a9f4686157
commit da0bb3367e
14 changed files with 169 additions and 2 deletions
+7
View File
@@ -4,6 +4,7 @@ import { useActivation } from '../hooks/useActivation';
import { useTrades } from '../hooks/useTrades';
import { useWatchlist } from '../hooks/useWatchlist';
import { usePaperTrades } from '../hooks/usePaperTrades';
import { useTickerNames } from '../hooks/useTickers';
import { useMarketRegime } from '../hooks/useMarketRegime';
import { regimeColor, regimeDot, regimeHeadline } from '../lib/regime';
import { Callout } from '../components/ui/Callout';
@@ -62,6 +63,7 @@ function DirectionTag({ direction }: { direction: string }) {
export default function DashboardPage() {
const trades = useTrades();
const watchlist = useWatchlist();
const tickerNames = useTickerNames();
const activation = useActivation();
const openTrades = usePaperTrades('open');
const regime = useMarketRegime();
@@ -237,6 +239,11 @@ export default function DashboardPage() {
</span>
)}
</div>
{tickerNames.get(setup.symbol.toUpperCase()) && (
<div className="max-w-[160px] truncate text-[11px] text-gray-500">
{tickerNames.get(setup.symbol.toUpperCase())}
</div>
)}
</td>
<td className="px-4 py-3"><DirectionTag direction={setup.direction} /></td>
<td className="num px-4 py-3 text-right text-gray-200">{formatPrice(setup.entry_price)}</td>