refactor(deck): extract grouping lib and stats sidebar (Brief 1) #137

Merged
varutasu merged 1 commit from refactor/deck-detail-split-brief-1 into main 2026-06-13 01:44:17 -04:00
varutasu commented 2026-06-12 22:20:51 -04:00 (Migrated from github.com)

Summary

  • lib/deck-detail-grouping.js + tests — groupDeckCards(cards, groupBy)
  • components/DeckDetailStatsSidebar.js — stats + group-by controls
  • Reuses computeDeckStats from lib/deck-builder-stats.js (dedupe)
  • pages/deck/[id].js 464 → 259 lines; removes stray ; after useEffect

P2 #13 god-component split — deck detail slice Brief 1.

Test plan

  • npm run lint / npm run test:run (123 tests)
  • Manual: /deck/<id> — stats sidebar, group-by toggles

Made with Cursor

## Summary - `lib/deck-detail-grouping.js` + tests — `groupDeckCards(cards, groupBy)` - `components/DeckDetailStatsSidebar.js` — stats + group-by controls - Reuses `computeDeckStats` from `lib/deck-builder-stats.js` (dedupe) - `pages/deck/[id].js` **464 → 259** lines; removes stray `;` after `useEffect` P2 #13 god-component split — deck detail slice Brief 1. ## Test plan - [x] `npm run lint` / `npm run test:run` (123 tests) - [ ] Manual: `/deck/<id>` — stats sidebar, group-by toggles Made with [Cursor](https://cursor.com)
vercel[bot] commented 2026-06-12 22:20:53 -04:00 (Migrated from github.com)

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

Project Deployment Actions Updated (UTC)
tcg-vault Error Error Jun 13, 2026 2:21am

Request Review

[vc]: #jTpS7A+1xosn24XFuaqKuliHsMWMmOMHWMSDZr4VJC8=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ0Y2ctdmF1bHQiLCJwcm9qZWN0SWQiOiJwcmpfRjZXOEVvRkd3Y0g3aWVGcnRvRlNlOXdVVkFhNSIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9yYW5kYWxsLXN0aWxsd2VsbHMtcHJvamVjdHMvdGNnLXZhdWx0LzJlUWNWcHd6bk1kM0FZWWhGdmRqM1FSMjZIWkYiLCJwcmV2aWV3VXJsIjoiIiwibmV4dENvbW1pdFN0YXR1cyI6IkZBSUxFRCIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiIifSwicm9vdERpcmVjdG9yeSI6bnVsbH1dLCJyZXF1ZXN0UmV2aWV3VXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL3ZlcmNlbC1hZ2VudC9yZXF1ZXN0LXJldmlldz9vd25lcj1zdHdsLWxhYnMmcmVwbz10Y2ctdmF1bHQmcHI9MTM3In0= The latest updates on your projects. Learn more about [Vercel for GitHub](https://vercel.link/github-learn-more). | Project | Deployment | Actions | Updated (UTC) | | :--- | :----- | :------ | :------ | | [tcg-vault](https://vercel.com/randall-stillwells-projects/tcg-vault) | ![Error](https://vercel.com/static/status/error.svg) [Error](https://vercel.com/randall-stillwells-projects/tcg-vault/2eQcVpwznMd3AYYhFvdj3QR26HZF) | | Jun 13, 2026 2:21am | <a href="https://vercel.com/vercel-agent/request-review?owner=stwl-labs&repo=tcg-vault&pr=137" rel="noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://agents-vade-review.vercel.sh/request-review-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://agents-vade-review.vercel.sh/request-review-light.svg"><img src="https://agents-vade-review.vercel.sh/request-review-light.svg" alt="Request Review"></picture></a>
github-actions[bot] commented 2026-06-12 22:21:25 -04:00 (Migrated from github.com)

Pipeline Health

Build + CI gates

Gate Status
Vercel build (Preview) pass
CI: Lint pass
CI: Schema map fresh skipped
Preview smoke failure
Visual diff failure

Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build).

Role reports

Role Status
Reviewer report pending
A11y audit pending
Design system audit pending

See individual comments above for details. This rollup updates automatically.

<!-- pipeline-rollup --> ## Pipeline Health ### Build + CI gates | Gate | Status | | --- | --- | | Vercel build (Preview) | ✅ pass | | CI: Lint | ✅ pass | | CI: Schema map fresh | ❌ skipped | | Preview smoke | ❌ failure | | Visual diff | ❌ failure | _Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build)._ ### Role reports | Role | Status | | --- | --- | | Reviewer report | ⏳ pending | | A11y audit | ⏳ pending | | Design system audit | ⏳ pending | See individual comments above for details. This rollup updates automatically.
github-actions[bot] commented 2026-06-12 22:24:45 -04:00 (Migrated from github.com)

Visual Diff

Screenshots and diffs uploaded as artifacts: view run

If intentional changes: update snapshots locally with npx playwright test --project=visual --update-snapshots and commit.

## Visual Diff Screenshots and diffs uploaded as artifacts: [view run](https://github.com/stwl-labs/tcg-vault/actions/runs/27453726964) If intentional changes: update snapshots locally with `npx playwright test --project=visual --update-snapshots` and commit.
Sign in to join this conversation.
No description provided.