Repository navigation
feat: per-deck color-label filter toggle - #69
Merged
Merged
Conversation
The colorCounts useMemo was declared after the `if (!deck) return`
early return, so the hook count changed when a DeckBoard rendered with
a missing deck (e.g. a stale activeDeckId after hydration/share-import),
tripping React's Rules of Hooks ("rendered fewer hooks than expected").
Move it up beside usedColors — its sibling color rollup — before the
guard, keeping the internal `if (!deck)` check so it mirrors usedColors.
Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What
Add a compact color-label filter pill row above the deck column grid. Operators with tagged columns can single-click to isolate one color group — same ergonomics as GitHub label filters.
Why
Column color labels (PR #61) and deck color labels (PR #62) let operators visually group columns, but at 15+ columns per deck the tagged columns are still found by scrolling. No way to isolate a color group until now. From repo-actions-2026-06-10.md idea #5 — 11th rung on the per-column UX axis after width, keyboard nav, and refresh-all.
Changes
lib/store/use-deck-store.ts: addedactiveColorFilter: Record<deckId, string | null>view-state field,setColorFilter(deckId, color | null)action,deleteDeckscrub. Same lifecycle aswidthByColumn/searchByColumn(view-state only, NOT persisted, NOT exported).lib/store/use-deck-store.ts:getVisibleColumnIdstakes an optionalcolorFilterarg and applies it AFTER tab filtering, BEFORE pinned-first partition — composes cleanly with existing filters. Both sides go throughnormalizeColumnColorso case folding can't cause a miss.components/deck/deck-board.tsx: new filter pill row above the grid — one chip per used color (dot + count) + "All" outlined pill, brand-ring on the active chip, hidden when fewer than 2 distinct colors are in use.flex-wrapso it wraps on small screens. AuseEffectauto-clears the filter when the active color is no longer present in any column. Zero-match placeholder with a "Clear filter" affordance instead of an empty grid.components/deck/deck-view.tsx: deck-header "Refresh all" button now readsactiveColorFilter[deckId]and passes it togetVisibleColumnIds, so a color-filtered refresh-all only refreshes the visible columns (otherwise filtered-out columns would receive a pending refresh signal they'd never drain, pinning the spinner on forever — same rationale as the tab filter).Design constraints honored
DECK_EXPORT_VERSIONuntouched) — purely view-state.usedColors.length < 2.Test plan
activeColorFilterCould NOT run Next 16 build/typecheck (offline sandbox — same constraint as PRs #49-#68). Verified by reading; ready for CI typecheck on merge.
Built autonomously by Aeon — from repo-actions-2026-06-10.md idea #5.