Skip to content

Post-MVP hardening: code-review cleanup, CI, and next-steps plan - #13

Merged
TimBest merged 3 commits into
claude/commodity-visualizer-basefrom
claude/post-mvp-ci-docs-cleanup
May 22, 2026
Merged

Post-MVP hardening: code-review cleanup, CI, and next-steps plan#13
TimBest merged 3 commits into
claude/commodity-visualizer-basefrom
claude/post-mvp-ci-docs-cleanup

Conversation

@TimBest

@TimBest TimBest commented May 22, 2026

Copy link
Copy Markdown
Owner

Stacked on top of the MVP work (PR #12). This PR isolates the three post-MVP commits so they can be reviewed independently.

Base branch is claude/commodity-visualizer-base (the MVP + Netlify baseline) rather than master, so the diff shows exactly these three commits. master is still the legacy Rust/Python code — CI can't run there. Once PR #12 lands, this PR can be retargeted to master.

Commits

  1. refactor: code review cleanup — applied findings from a three-agent review:
    • Extracted formatMeters/formatBigUSD into lib/formatting.ts (+ tests)
    • Added isPositiveFinite type guard in lib/math.ts, reused in urlState.ts and FallbackForm.tsx
    • Split IsoViz into focused subcomponents; capped stacked-glyph DOM at 20 nodes
    • Added cache-control headers to /api/geocode and /api/footprint
    • Centralized URL building in clientFetchers via URLSearchParams
  2. docs: next-steps plandocs/NEXT_STEPS.md: MVP status snapshot and an ordered P0–P5 plan to finish the spec.
  3. ci: GitHub Actions workflow.github/workflows/ci.yml: runs bun install --frozen-lockfile, bun run typecheck, bun test, bun run build on every push to master and every PR. Pins Bun 1.3.11; cancels superseded runs via concurrency groups.

Test plan

  • bun test — 78/78 pass
  • bun run typecheck — clean
  • bun run build — clean
  • CI workflow turns green on this PR (first live run)

Note

These three commits also exist on PR #12's branch (claude/commodity-visualizer-display-netlify) — they were left there intentionally. Whichever PR merges first, git will no-op the duplicates in the other.

https://claude.ai/code/session_01Df7Y187BB8uPFqRxkrJbiz


Generated by Claude Code

claude added 3 commits May 21, 2026 19:00
- Extract formatMeters / formatBigUSD into lib/formatting.ts (used by IsoViz
  today, will be reused by future numeric displays) with dedicated tests.
- Add isPositiveFinite type guard in lib/math.ts; reuse from urlState and
  FallbackForm to dedupe the Number.isFinite/> 0 check.
- Split IsoViz into focused subcomponents (CommodityColumn, ReferenceStack,
  CompactReference, StackedReference) and cap the stacked-glyph DOM at 20
  nodes — beyond that the compact x-multiplier form is used.
- Add cache-control: public, max-age=3600 on /api/geocode and /api/footprint
  so deterministic lookups are CDN-friendly.
- Use URLSearchParams consistently in clientFetchers buildUrl helper.
Captures what's shipping in PR #12, what's stubbed, and an ordered
P0-P5 plan to finish the MVP. Lives in the repo so the plan survives
across ephemeral sessions.
Runs on every push to master and on every pull request:
- bun install --frozen-lockfile
- bun run typecheck
- bun test
- bun run build

Pins Bun 1.3.11 to match netlify.toml, disables Next telemetry, and
cancels superseded runs on the same ref via concurrency groups.
@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 670b15c8-a1c2-4bc6-8e84-1e49f2ff366a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/post-mvp-ci-docs-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@TimBest
TimBest merged commit ecb4106 into claude/commodity-visualizer-base May 22, 2026
2 checks passed
@TimBest
TimBest deleted the claude/post-mvp-ci-docs-cleanup branch May 22, 2026 04:05
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