Skip to content

docs(gotchas): document PR #332 hero invariants — container-query split + sign-aware MoS#333

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

docs(gotchas): document PR #332 hero invariants — container-query split + sign-aware MoS#333
dackclup merged 1 commit into
mainfrom
claude/sharp-turing-q3A5J

Conversation

@dackclup
Copy link
Copy Markdown
Owner

Summary

Documentation backstop for PR #332 (stock-detail hero rework, merged 43838c6). That PR shipped as a fast, spot-check-driven UI iteration and skipped the CLAUDE.md / AGENTS.md substance lockstep. This adds the two invariants future editors must not regress.

Doc-only — no compute / schema / scoring / valuation / frontend CODE change. The hero code already landed in #332; this is the documentation only.

The two invariants documented

  1. Hero splits on a CSS CONTAINER QUERY, not a viewport breakpoint
    (frontend/app/stock/[ticker]/page.tsx + globals.css .hero-card / @container hero (min-width: 46rem)).
    The left Sidebar eats a viewport-variable width slice (expanded 240px / collapsed 64px / drawer 0px), so a md:/lg: viewport gate left a dead band where the sidebar was already a desktop rail but the hero still stacked — the bug that prompted the rework. The container query measures the hero's real inline-size after the sidebar's cut. JSX default = stacked flex-col; the @container rule only ADDS the row (pre-2023 browsers degrade to the safe stack). Raw CSS, no @tailwindcss/container-queries plugin / no new dep.

  2. MoS gauge arc is SIGN-AWARE (frontend/components/MoSBadge.tsx).
    MoS ≥ 0 sweeps clockwise (like the score gauge); MoS < 0 sweeps counter-clockwise via -scale-x-100 on the gauge container, with the number <span> carrying its own -scale-x-100 to un-mirror back to readable. 329/502 of the universe is negative MoS → CCW is the common case. Both mirrors move in lockstep.

Where it landed

Verification

Gate Result
ruff check . ✅ All checks passed (no Python touched)
Schema / build N/A — Markdown-only diff
CLAUDE.md + AGENTS.md lockstep ✅ both carry the substance diff

https://claude.ai/code/session_0148EoMmL6zakDWqHXjqQ9yq


Generated by Claude Code

…t + sign-aware MoS)

PR #332 (stock-detail hero rework) merged as a fast spot-check-driven UI
iteration and skipped the CLAUDE.md/AGENTS.md substance lockstep. Add the two
invariants future editors must not regress:

1. The hero's two-column (name-left / stats-top-right) vs stacked decision is
   driven by a CSS CONTAINER QUERY on the hero's own inline-size, NOT a viewport
   md:/lg: breakpoint — because the sidebar eats a viewport-variable width slice
   (the dead-band bug that prompted the rework). JSX default is the stacked
   flex-col; @container only adds the row; raw CSS, no plugin/dep.
2. The MoS gauge arc is sign-aware: >=0 clockwise (like the score gauge), <0
   counter-clockwise via -scale-x-100 on the container with the number span
   mirrored back. 329/502 of the universe is negative, so CCW is the common case.

CLAUDE.md §Gotchas holds the full rationale; AGENTS.md §Code style mirrors each
as a pointer (PR #327 precedent). PHASE_STATUS_INFLIGHT.md entry per the
ship-with-every-PR convention. Doc-only — the hero code already shipped in #332.

https://claude.ai/code/session_0148EoMmL6zakDWqHXjqQ9yq
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

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

Project Deployment Actions Updated (UTC)
quantrank Ready Ready Preview, Comment May 31, 2026 9:06am

@dackclup dackclup marked this pull request as ready for review May 31, 2026 09:22
@dackclup dackclup merged commit bd2c15d into main May 31, 2026
4 checks passed
@dackclup dackclup deleted the claude/sharp-turing-q3A5J branch May 31, 2026 09:22
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