feat(frontend): country + exchange hero chips (PR-B)#351
Merged
Conversation
Replace the stock-detail hero #rank-row sector + industry chips with a country chip (country-flag-icons flag + ISO tag) + an exchange chip (lucide Landmark generic icon + display name), reading detail.country / detail.exchange (populated by PR-A2, #347 -> #349). Display-only; no compute / schema / scoring / valuation change. - New frontend/components/ListingChips.tsx -- LedgerCraft neutral-steel chips (mirrors SectorChip), null-safe (renders nothing until a cron populates the fields), FLAG_BY_COUNTRY static per-country lookup (US today). - New dep country-flag-icons ^1.6.17 (MIT, 0 transitive, 0 install-script -- dependency-auditor + security-reviewer both SAFE). Per-country STATIC subpath import only; barrel/dynamic = 330KB footgun (new CLAUDE.md Gotcha, mirrors lucide). - frontend/app/stock/[ticker]/page.tsx -- swap SectorChip + industry span for ListingChips; drop the now-unused SectorChip import. Sector still shows in the HeroAttributeTiles Sector tile. Held Draft -- merge after the next weekly cron populates exchange/country + confirms exchange_coverage_pct (observability-before-wiring); current data has the fields null so the chips render nothing on live until then. frontend-design-reviewer 0 FAIL (D1 font-medium + D2 flag/icon height parity + F1 title a11y all fixed). tsc --noEmit clean; next build 506/506 static pages; flag tree-shaken (~2KB, no barrel bloat). https://claude.ai/code/session_0148EoMmL6zakDWqHXjqQ9yq
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dackclup
added a commit
that referenced
this pull request
Jun 1, 2026
…ccable document) (#354) Full regenerate of the impeccable design-context (created in #350) against the current code. The creative decisions locked in #350 (North Star, palette, typography, Named Rules, the 4 anti-references) are preserved verbatim; only the spec's accuracy had drifted, fixed here: - Elevation: DESIGN.md/sidecar claimed cards rest on shadow-medium and the hero on shadow-large. Reality (post-A3 reskin): only shadow-overlay is used anywhere (FilterDrawer) -- every card/table/hero is border-only `rounded`. Rewrote the Elevation section + sidecar shadow purposes so Subtle/Medium/Large read as defined-but-unused; an agent will no longer reach for a resting shadow. - Components: added ListingChips (#351 country/exchange chips) + HeroAttributeTiles (#344 4-box tile grid) to DESIGN.md and the sidecar, plus an Icons subsection (lucide named-import / country-flag-icons per-country tree-shake discipline) and the signature Score Gauge as the 8th sidecar entry. - Motion: corrected two sidecar easings -- gauge-sweep cubic-bezier(.22,1,.36,1) -> ease-in-out, hover-lift ease-out -> ease-in-out (the app-wide single curve, #330). - Sidecar Card css dropped its stale box-shadow (border-only); Recommendation Chip now uses the soft-OKLCH values that actually render after the globals.css override (expert-user-explorer-measured) instead of raw emerald hex. Added a Colors + Do's note on the soft-override allowlist (the bg-rose-600 gap from #352) + the gauge-stroke inline-rgb carve-out to the Tailwind-Class Rule. Doc-only (root DESIGN.md + .impeccable/design.json + PHASE_STATUS_INFLIGHT.md) -- no compute / schema / scoring / valuation / frontend-code change. JSON validated (schemaVersion 2, 8 components); the 6 Stitch headers present in order; YAML frontmatter parses. https://claude.ai/code/session_012xxKfyR939bZDmbxxqMFZi Co-authored-by: Claude <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.
PR-B — country + exchange hero chips
Third / final of the country-exchange sequence (PR-A1 schema+helpers #347 · PR-A2
main.pywiring #349 · PR-B chips, this PR). Replaces the stock-detail hero#rank-row'sSectorChip+· industrytext with a country chip (country-flag-iconsflag + ISO tag, 🇺🇸 US) + an exchange chip (lucideLandmarkgeneric icon + display name, NASDAQ/NYSE), readingdetail.country/detail.exchange.Display-only — no compute / schema / scoring / valuation change.
⏸️ Held Draft — merge AFTER the next weekly cron
The current production data predates PR-A2's wiring (
exchange/countrynull,exchange_coverage_pct= None, 0/502 populated), so on live today the chips render nothing (row = bare#rankchip). The component is null-safe (degrades gracefully), but per observability-before-wiring the merge waits until a cron populates the fields + confirmsexchange_coverage_pctis high (~99% expected). No Vercel-preview data until then.Changes
frontend/components/ListingChips.tsx— LedgerCraft neutral-steel chips (mirrorsSectorChip), null-safe (returns null / omits a chip when its field is null),FLAG_BY_COUNTRYstatic per-country lookup (US today).country-flag-icons ^1.6.17— MIT, 0 transitive, 0 install-script, registry-signed, 2.75M dl/wk. dependency-auditor + security-reviewer both SAFE-TO-ADD. Per-country STATIC subpath import only (country-flag-icons/react/3x2/US); barrel/import */dynamic = 330 KB footgun (new CLAUDE.md §Gotchas entry, mirrors lucide).frontend/app/stock/[ticker]/page.tsx— swapSectorChip+ industry span →<ListingChips>; drop the now-unusedSectorChipimport. Sector still shows in theHeroAttributeTilesSector tile.industrydropped from the UIThe
#rankrow wasindustry's only render site (it was never in the raw-data table), so PR-B dropsindustryfrom the UI entirely (the schema field is retained — no data loss). This matches the grill decision "remove BOTH chips." Ifindustryshould be preserved somewhere, that's a small follow-up.Verification
tsc --noEmitclean ·next build506/506 static pages · flag tree-shaken (~2 KB chunk, no barrel bloat).Doc lockstep: CLAUDE.md (§Gotchas country-flag-icons + §Phase status) + AGENTS.md +
PHASE_STATUS_INFLIGHT.md.Follow-ups surfaced (not this PR)
SectorChip.tsxhas zerodark:variants (Phase 3b dark-mode gap) —ListingChipsis correct; SectorChip needs a catch-up patch.dark:variants" but Phase 3b shipped class-strategy dark mode).https://claude.ai/code/session_0148EoMmL6zakDWqHXjqQ9yq
Generated by Claude Code