Repository navigation
Show market cap/P-E on Congressional buy rows - #13
Merged
Merged
Conversation
congress_buy_alerts_v1 now returns market_cap_musd/pe_ratio (insider-trading-app PR #30), so Congressional rows can show the same company context the corporate rows already do. marketCapDisplay is now shared between BuyAlertRow and CongressAlertRow (same field, same units); pe_ratio gets its own congressPeDisplay wrapper since it's a single per-transaction value, not BuyAlertRow's min_pe aggregate. The line is omitted entirely (not shown as "—") when a ticker hasn't been enriched yet. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Lets future sessions preview this Astro site via the built-in browser tooling (astro dev on port 4321) instead of driving it through Bash. 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
market_cap_musd/pe_ratiocolumnsget_congress_alerts_web()now returns (insider-trading-app PR #30, already deployed and verified live).marketCapDisplayis now shared betweenBuyAlertRowandCongressAlertRow(same field, same units, same point-in-time-at-detection semantics).congressPeDisplayas a thin wrapper distinct frompeDisplay—BuyAlertRow.min_peis an aggregate across a ticker's clustered officer buys,CongressAlertRow.pe_ratiois a single per-transaction value, so they're genuinely different fields sharing one formatter internally.marketCapDisplay-import bug caught byastro checkwhile wiring this up (was imported from both@lib/insiderSignalsand@lib/congressSignals, which both re-export the same function).Test plan
vitest run— 27/27 passing (added tests forcongressPeDisplayandmarketCapDisplayon aCongressAlertRowshape)astro check— same 4 pre-existing errors as onmain(unrelatedButton.astro/GoogleTagManager.astroprop typing), no new errorsnpm run dev) — Congressional rows render$26.1B market cap · P/E 17.2etc. next to the Senate badge, matching the corporate row styling🤖 Generated with Claude Code