Skip to content

feat(command-palette): publish CommandPalette to @cofoundy/ui#12

Merged
A-PachecoT merged 1 commit into
mainfrom
feat/cmdk-publish
May 22, 2026
Merged

feat(command-palette): publish CommandPalette to @cofoundy/ui#12
A-PachecoT merged 1 commit into
mainfrom
feat/cmdk-publish

Conversation

@A-PachecoT

Copy link
Copy Markdown
Contributor

Summary

  • Extracts CommandPalette + vault-search types from products/cofoundy-platform/docs-ai-vault-search into the shared @cofoundy/ui package
  • Adds 7 Storybook stories (Idle / Loading / Results / NoResults / Error / WithRecents / MobileBaseline) + 7 unit tests (7/7 pass)
  • Authored by ui-publisher teammate per dual-vantage convention introduced in cofoundy-orchestrator v0.1.4

Public surface

  • Components: CommandPalette, CommandPaletteTrigger
  • Types: CommandPaletteProps, CommandPaletteTriggerProps, SearchHit, SearchResponse, SearchFn, DocRole, RecentDoc, RecentSearch, EmptyAction

Generalizations from source (deviations flagged)

# Change Rationale
1 searchFn prop replaces unused CommandAction kind-union Only kind:'search' wired in v1; collapsing avoids dead API
2 Dropped HookDrivenPalette (project-specific Cmd+K hook) Consumers wire their own hotkey around controlled open state
3 Removed RECENTS_PLACEHOLDER + RECENT_SEARCHES_PLACEHOLDER fixtures Props-driven; idle renders clean "Start typing…" instead of fake docs
4 <a href> + onNavigate(url, hit) (fallback window.location.href) Decouples from next/link for shared use
5 styled-jsx → plain <style> packages/ui is Vite, not Next
6 MobileBaseline story + 44px min-touch on trigger pill Per packages/ui/CLAUDE.md mobile-first contract

Test plan

  • npx vitest run src/__tests__/components/command-palette/ → 7/7 pass
  • npx tsc --noEmit → clean on new code
  • Visual QA in Storybook (npm run storybook → all 7 stories render)
  • Consumer migration in docs-ai-vault-search (follow-up PR — out of scope here)

Notes

  • Pre-existing baseline failures in ChatInput.test.tsx + hero-shader/* unaffected (verified by stash + re-run)
  • Visual QA done locally on feat/cmdk-publish before merge

Convention

This PR was produced by a claude catch-all teammate (not a plugin orchestrator) — first ship under the new dual_vantage_post_mortem convention. Spawn-mode mismatch incident retro at plugins/cofoundy-orchestrator/docs/2026-05-20-teammate-stepper-protocol-gap.md.

…@cofoundy/ui

Extracted from products/cofoundy-platform/docs-ai-vault-search (commit
bc298c2 on feat/vault-search) and generalized for shared consumption.

Public surface:
  Components: CommandPalette, CommandPaletteTrigger
  Types: CommandPaletteProps, CommandPaletteTriggerProps, SearchHit,
         SearchResponse, SearchFn, DocRole, RecentDoc, RecentSearch,
         EmptyAction

Generalizations from source (deviations flagged for review):
  1. searchFn prop replaces the unused CommandAction kind-union.
  2. Hotkey hook (HookDrivenPalette) dropped — consumers wire their own
     around controlled `open` state.
  3. RECENTS / RECENT_SEARCHES fixtures dropped; props-driven defaults
     render a clean idle state.
  4. Navigation: <a href> + injected onNavigate(url, hit), with
     window.location.href fallback.
  5. styled-jsx → plain <style> (packages/ui is Vite, not Next).
  6. MobileBaseline story added + 44px min touch-target on trigger pill.

Tests: 7 new tests, all green (vitest 311 ms). Pre-existing baseline
failure in ChatInput.test.tsx unaffected (verified by stash + re-run).
tsc --noEmit clean on new code; pre-existing hero-shader errors unaffected.

Branch: feat/cmdk-publish (off origin/main). Visual QA in Storybook
deferred to human review.

Authored by teammate ui-publisher@ui-package-publish per dual-vantage
convention introduced in cofoundy-orchestrator v0.1.4.
@A-PachecoT A-PachecoT merged commit 6e6a38c into main May 22, 2026
1 check failed
@A-PachecoT A-PachecoT deleted the feat/cmdk-publish branch May 22, 2026 14:38
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.

1 participant