Skip to content

feat(frontend): country + exchange hero chips (PR-B)#351

Merged
dackclup merged 1 commit into
mainfrom
claude/sharp-turing-q3A5J
Jun 1, 2026
Merged

feat(frontend): country + exchange hero chips (PR-B)#351
dackclup merged 1 commit into
mainfrom
claude/sharp-turing-q3A5J

Conversation

@dackclup
Copy link
Copy Markdown
Owner

@dackclup dackclup commented Jun 1, 2026

PR-B — country + exchange hero chips

Third / final of the country-exchange sequence (PR-A1 schema+helpers #347 · PR-A2 main.py wiring #349 · PR-B chips, this PR). Replaces the stock-detail hero #rank-row's SectorChip + · industry text with a country chip (country-flag-icons flag + ISO tag, 🇺🇸 US) + an exchange chip (lucide Landmark generic icon + display name, NASDAQ/NYSE), reading detail.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/country null, exchange_coverage_pct = None, 0/502 populated), so on live today the chips render nothing (row = bare #rank chip). The component is null-safe (degrades gracefully), but per observability-before-wiring the merge waits until a cron populates the fields + confirms exchange_coverage_pct is high (~99% expected). No Vercel-preview data until then.

Changes

  • New frontend/components/ListingChips.tsx — LedgerCraft neutral-steel chips (mirrors SectorChip), null-safe (returns null / omits a chip when its field is null), FLAG_BY_COUNTRY static per-country lookup (US today).
  • New dep 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 — swap SectorChip + industry span → <ListingChips>; drop the now-unused SectorChip import. Sector still shows in the HeroAttributeTiles Sector tile.

⚠️ Behavior note — industry dropped from the UI

The #rank row was industry's only render site (it was never in the raw-data table), so PR-B drops industry from the UI entirely (the schema field is retained — no data loss). This matches the grill decision "remove BOTH chips." If industry should be preserved somewhere, that's a small follow-up.

Verification

  • tsc --noEmit clean · next build 506/506 static pages · flag tree-shaken (~2 KB chunk, no barrel bloat).
  • Gate: quantrank-reviewer READY-TO-PUSH (0 FAIL) · phase-coordinator LOCKSTEP-SATISFIED · frontend-design-reviewer 0 FAIL (D1 font-medium + D2 flag/icon height parity + F1 title a11y all fixed) · dependency-auditor + security-reviewer SAFE.

Doc lockstep: CLAUDE.md (§Gotchas country-flag-icons + §Phase status) + AGENTS.md + PHASE_STATUS_INFLIGHT.md.

Follow-ups surfaced (not this PR)

  • SectorChip.tsx has zero dark: variants (Phase 3b dark-mode gap) — ListingChips is correct; SectorChip needs a catch-up patch.
  • SKILL.md Rule 4 is stale (says "no dark: variants" but Phase 3b shipped class-strategy dark mode).

https://claude.ai/code/session_0148EoMmL6zakDWqHXjqQ9yq


Generated by Claude Code

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
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quantrank Ready Ready Preview, Comment Jun 1, 2026 7:32am

@dackclup dackclup marked this pull request as ready for review June 1, 2026 08:17
@dackclup dackclup merged commit 2978748 into main Jun 1, 2026
4 checks passed
@dackclup dackclup deleted the claude/sharp-turing-q3A5J branch June 1, 2026 08:17
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>
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.

2 participants