Implements the InboxView container that wraps the existing Inbox component
with store integration and keyboard navigation.
Key features:
- Filters and displays only untriaged inbox items from store
- Keyboard navigation (j/k or arrow keys) between items
- Triage actions (accept, defer, archive) that update store state
- Inbox zero celebration state with animation
- Real-time count updates in both view header and nav badge
- Keyboard shortcut hints in footer
TDD: Tests written first, then implementation to pass them.
Files:
- src/components/InboxView.tsx: New container component
- src/stores/inbox-store.ts: New Zustand store for inbox state
- src/components/Inbox.tsx: Added focusIndex prop for keyboard nav
- src/components/AppShell.tsx: Wire up InboxView and inbox count badge
- src/lib/types.ts: Added archived and snoozedUntil fields to InboxItem
- tests/components/Inbox.test.tsx: Added InboxView test suite
- tests/helpers/fixtures.ts: Added makeInboxItem helper
Acceptance criteria met:
- Only untriaged items shown
- Inbox zero state with animation
- Keyboard navigation works
- Triage actions update state
- Count updates in real-time
Add suggestion state when no focus is set but items exist in queue:
- FocusView now shows SuggestionCard when current is null but queue has items
- SuggestionCard displays suggested item with 'Set as focus' button
- Clicking 'Set as focus' promotes the suggestion to current focus
- Auto-advances to next item after completing current focus
- Shows empty state celebration when all items are complete
TDD: 14 tests covering focus, suggestion, empty states, and actions
QueueView now supports:
- Filtering items via CommandPalette (Cmd+K)
- Hide snoozed items by default (showSnoozed prop)
- Show snooze count indicator when items are hidden
- Support batch mode entry for sections with 2+ items
- Filter by type prop for programmatic filtering
Added snoozedUntil field to FocusItem type and updated fixtures.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ErrorBoundary class component to catch React render errors
- Show fallback UI with error details (stack in dev mode) and recovery buttons
- Add ErrorDisplay component for showing structured McError messages
- Support all McErrorCode types with contextual messages and install guides
- Implement retry/dismiss actions for recoverable errors
- Add 16 comprehensive tests covering both components
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Shows THE ONE THING with:
- Focus item title, type badge, project, and age
- Quick actions: Start, Defer (1h), Skip
- Queue and inbox counts
- Link to open full window
- Empty state when nothing focused
Includes 18 tests covering all states and interactions.
bd-wlg
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Displays sync state with:
- Green dot for synced (with relative time)
- Spinner for syncing
- Amber dot for stale (auto-detected after 15min)
- Red dot for error (with retry button)
- Gray dot for offline
Includes 23 tests covering all states, time formatting,
button visibility, and click handlers.
bd-2or
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add text search across all focus items
- Support filter commands: type: and stale:
- Keyboard navigation with arrow keys + Enter
- Click to select items
- Escape or backdrop click to close
- 17 tests covering search, filters, keyboard nav, and empty state
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create ReasonPrompt dialog for capturing optional reasons
- Add quick tag buttons (Blocking, Urgent, Context switch, etc.)
- Support keyboard navigation (Escape to cancel)
- Handle text input with trimming and null for empty
- Different titles for different actions (set_focus, defer, skip)
- All 10 tests pass
Closes bd-2p0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add InboxItem types and TriageAction/DeferDuration types
- Create Inbox component with:
- Accept/Defer/Archive actions for each item
- Keyboard shortcuts (A/D/X) for fast triage
- Defer duration picker popup
- Inbox Zero celebration state
- Type-specific badges with colors
- Add comprehensive tests for all functionality
Closes bd-qvc
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Set up comprehensive testing infrastructure for both unit and E2E tests:
Unit Testing (Vitest):
- vitest.config.ts: jsdom environment, globals enabled
- Path alias @tauri-apps/api -> tests/mocks/tauri-api.ts
- Excludes tests/e2e/** to prevent Playwright collision
- V8 coverage configured for src/**/*.{ts,tsx}
- tests/setup.ts: @testing-library/jest-dom matchers
Tauri API Mocking:
- tests/mocks/tauri-api.ts: Mock implementation of @tauri-apps/api
- invoke(): Returns configurable mock responses
- listen()/emit(): Event system stubs
- setMockResponse()/resetMocks(): Test helpers
- Enables testing React components without Tauri runtime
Component Tests:
- tests/components/App.test.tsx: Verifies App shell renders
- "Mission Control" heading
- "What should you be doing right now?" tagline
- "THE ONE THING will appear here" placeholder
E2E Testing (Playwright):
- playwright.config.ts: Chromium + WebKit (Tauri uses WebKit on macOS)
- Runs Vite dev server before tests
- HTML reporter, trace on retry
- tests/e2e/app.spec.ts: Smoke tests for deployed app
- Heading visible, tagline visible, dark mode applied
This dual-layer testing strategy (Vitest for speed, Playwright for
integration) follows the testing trophy: many unit, fewer E2E.