Repository navigation
Render the hedge-fund conviction badge on alert rows - #14
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
poll-13f,hedge_fund_overlap_v1) shipped and deployed earlier today; this is the remaining frontend piece.hedgeFundBadge()formatter (src/lib/format.ts) works identically acrossBuyAlertRow,CongressAlertRow, andConvergenceCard— all three now carryhedge_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.accent-amberTailwind color, distinct from Senate'saccent-blueand buy amounts'color-success.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 (addedhedgeFundBadgetests: 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 asmain(unrelatedButton.astro/GoogleTagManager.astro), no new errorsnpm run dev) by injecting synthetic rows shaped like realhedge_fund_names/hedge_fund_latest_perioddata 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