Skip to content

Render the hedge-fund conviction badge on alert rows - #14

Merged
wjleece merged 1 commit into
mainfrom
feat/hedge-fund-badge
Sep 21, 2026
Merged

wjleece merged 1 commit into
mainfrom
feat/hedge-fund-badge

Conversation

@wjleece

@wjleece wjleece commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wires the actual row UI for the hedge-fund conviction weight (insider-trading-app DESIGN §3.9) — the backend (poll-13f, hedge_fund_overlap_v1) shipped and deployed earlier today; this is the remaining frontend piece.
  • A shared hedgeFundBadge() formatter (src/lib/format.ts) works identically across BuyAlertRow, CongressAlertRow, and ConvergenceCard — all three now carry hedge_fund_names/hedge_fund_latest_period. Renders e.g. "ValueAct · Q2 2026"; returns '' (omit entirely, not a placeholder) when there's no tracked-fund match, since absence is uninformative, never bearish.
  • New accent-amber Tailwind color, distinct from Senate's accent-blue and buy amounts' color-success.
  • Badge placed on corporate rows, Congressional rows, and convergence cards — right after the ticker/chamber badge, before the market-cap/P-E line.

Note on why you won't see anything live yet

Today's production data has zero hedge-fund matches — by design. poll-13f's cold-start guard excludes each fund's very first tracked quarter from new/increased flagging (otherwise every holding in a fund's first-ever poll would look "new"). Nothing will render until the next real quarterly filing cycle (~mid-Nov 2026). Verified the actual rendering by injecting synthetic rows into the live DOM in the browser rather than waiting on real data — see test plan.

Test plan

  • vitest run — 33/33 passing (added hedgeFundBadge tests: no-match blank, single fund, multi-fund comma-join pass-through, all 4 quarter-end months, shared across row types)
  • astro check — same 4 pre-existing errors as main (unrelated Button.astro/GoogleTagManager.astro), no new errors
  • Verified visually in the browser (npm run dev) by injecting synthetic rows shaped like real hedge_fund_names/hedge_fund_latest_period data into all three sections (corporate, Congressional, convergence) — badge renders cleanly in amber, distinct from the Senate/success colors, no layout overflow

🤖 Generated with Claude Code

insider-trading-app's poll-13f pipeline (merged/deployed earlier
today) already flows hedge_fund_names/hedge_fund_latest_period
through all three public RPCs. This wires the actual row UI: a small
amber badge ("ValueAct · Q2 2026") on corporate, Congressional, and
convergence rows when one of the 5 tracked funds added/increased that
ticker within the 180-day lookback. Shared hedgeFundBadge() formatter
works identically across all three row shapes (BuyAlertRow,
CongressAlertRow, ConvergenceCard all carry the same two fields);
returns '' rather than a placeholder so the badge is omitted entirely
on the common no-match case instead of reading as a negative signal.

Adds an accent-amber Tailwind color, distinct from Senate's
accent-blue and buy amounts' color-success.

Note: today's production data won't show any badges -- the very
first tracked quarter for all 5 funds is deliberately excluded from
new/increased flagging (poll-13f's cold-start guard), so nothing
will render until the next real quarterly filing cycle (~mid-Nov
2026). Verified the actual rendering by injecting synthetic rows in
the browser rather than waiting on real data.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@wjleece
wjleece merged commit 6b2d023 into main Sep 21, 2026
1 check passed
@wjleece
wjleece deleted the feat/hedge-fund-badge branch September 21, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant