spec: 0030 combobox (single + multi-select with badges)#42
Merged
Conversation
Radix Popover + cmdk stack, per developer decision. Spec only - build awaits approval per the Spectra protocol. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XxRv44W4ZyLWV4eyZUMZdD
Filterable select Seed built on @radix-ui/react-popover + cmdk, following the 0005/Select recipe. Single-select commits and closes; multiple renders removable Badge chips in the field, keeps the popover open across picks, toggles on re-pick, and Backspace-removes-last on the empty search input. One `multiple` prop discriminates the value shape (string vs string[]). Adds plan 0030, component + 18 tests + 6 Storybook stories, barrel exports, README. New deps @radix-ui/react-popover ^1.1.19 and cmdk ^1.1.1 (both externalized in tsup). Full suite green: test / build / lint / format / storybook. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XxRv44W4ZyLWV4eyZUMZdD
Contributor
Author
|
Spec approved and implemented. This PR now carries spec 0030, the build plan, and the full implementation:
Full suite green locally: Spectra personas (engineer, tester, architect, designer) to review inline next. |
mattmaynes
commented
Jul 8, 2026
mattmaynes
commented
Jul 8, 2026
mattmaynes
commented
Jul 8, 2026
mattmaynes
commented
Jul 8, 2026
mattmaynes
commented
Jul 8, 2026
mattmaynes
commented
Jul 8, 2026
mattmaynes
commented
Jul 8, 2026
mattmaynes
commented
Jul 8, 2026
mattmaynes
commented
Jul 8, 2026
mattmaynes
commented
Jul 8, 2026
mattmaynes
commented
Jul 8, 2026
mattmaynes
commented
Jul 8, 2026
…anches Architect (major): Combobox owns interaction state + a portal and composes the Badge seed, so it is Branch-shaped, not a Seed. Moved to packages/canopy/src/branches/, exported on ./branches beside Dialog; trimmed the public surface to the root + ComboboxOption + prop-type unions. Engineer: cmdk item keyed by value (+ label keywords) so duplicate labels don't collapse; narrowed emit deps; latched isControlled via ref. Designer: scoped the multi-mode field focus ring to the trigger button; enlarged the chip remove hit target to 20px with an offset ring; added multi-mode disabled + invalid stories and a disabled option. Tester: added keyboard-nav (arrow/enter/escape), controlled-mode (single + multiple), the isControlled latch case, and the Backspace non-empty boundary. 247 tests pass (was 243). Reflection: feedback 0013 (tier placement) + 0014 (interactive test coverage), two learnings, and features/architecture updated (Combobox Branch; cmdk as the sanctioned first non-Radix primitive). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XxRv44W4ZyLWV4eyZUMZdD
Contributor
Author
Review addressed - all 12 findings resolvedThanks to the four personas. Summary of how each was handled (commit 775359a): 🏛 Architect
🧪 Tester
🛠 Engineer
🎨 Designer
Full suite green: |
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.
Draft - spec for review, not a build. Per the Spectra protocol I stop here for your approval before planning/implementing.
Summary
Proposes
docs/specs/0030-combobox.md: aComboboxcomponent for@rogueoak/canopysupporting both single-select and, the priority, multi-select with removableBadgechips in the field.Key decision (yours)
Built on the Radix Popover + cmdk stack - consistent with every existing canopy component and the 0005 recipe - rather than the Base UI combobox from the linked docs. Trade-off captured in the spec: multi-select chips are composed on
Badgerather than native, in exchange for one primitive family across the system.Two new canopy runtime deps:
@radix-ui/react-popoverandcmdk(the missing primitives). Architecture/security personas should weigh the new-dependency surface at review time.Scope highlights
Backspace-removes-last, disabled/aria-invalidparity with Select/Input, full keyboard + ARIA, Storybook stories, tests.Commandpalette, grouping/virtualization.Next step
Approve or leave comments on the spec. On approval I'll turn it into a plan (
docs/plans/), build it in a worktree with tests, and run it through the engineer/tester/architect/designer personas before merge.🤖 Generated with Claude Code