Files
famapp/docs/tasks/21-quick-add.md
T
ginnoirandClaude Sonnet 4.6 1133fa8aac Implement quick-add registry (task 21)
- Add url field to QuickAddAction; make action optional
- Add getQuickAdds() + SerializedQuickAddItem to registry so quick-add
  data can cross the server→client RSC boundary without serializing fns
- Update calendar/lists/notes manifests with navigation URLs
- QuickAddProvider wraps root layout: holds sheet/palette open state and
  global cmd/ctrl+k shortcut
- QuickAddSheet: bottom drawer on mobile, right-side popover on desktop,
  actions grouped by module
- CommandPalette: cmdk-powered modal with fuzzy filter and full keyboard
  nav (arrows + enter + esc)
- QuickAddFab: client button replacing the plain + stub in the dashboard
- Add .claude/** to ESLint ignores to prevent stale worktree artifacts
  from failing lint

All 4 E2E specs pass; typecheck, lint, and build clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 13:44:33 -05:00

1.7 KiB

21 — Quick-add registry

Goal

A single global + button on the dashboard (and a cmd+k palette anywhere) that lists actions contributed by modules.

Depends on

  • 20

Scope

  • QuickAddAction type: { id, label, icon?, shortcut?, run: () => void | Promise<void> }.
  • Modules register via manifest. Registry exposes a sorted list.
  • UI: floating + on dashboard opens a sheet of actions; cmd/ctrl+k opens a command-palette-style modal (use cmdk package).
  • Default actions: New event, Add to shopping, Add to tasks, New note.

Out of scope

  • Fuzzy search across data (search adapter is a later concern).
  • Action history / recents.

Acceptance criteria

  • Adding a new module that registers a quick-add appears in both the FAB sheet and the cmd-k palette without touching core.
  • Keyboard navigation works in the palette (arrows + enter + escape).

Implementation notes

  • QuickAddAction gained a url: string field; action made optional (future inline modals).
  • SerializedQuickAddItem strips the non-serializable action fn so it can cross the server→client RSC boundary as props to QuickAddProvider.
  • getQuickAdds() in the registry returns one SerializedQuickAddItem per registered quick-add, enriched with moduleId / moduleName for grouping.
  • Root layout calls getQuickAdds() and passes the result to <QuickAddProvider> which wraps the whole app. <QuickAddSheet> and <CommandPalette> live inside the provider and read from context.
  • cmdk installed for the command palette; keyboard shortcut (cmd/ctrl+k) wired via useEffect in the provider.
  • .claude/** added to ESLint ignores to prevent stale worktree .next build artifacts from failing lint.