--- phase: 02-core-crud plan: 02 type: execute wave: 2 depends_on: [02-01] files_modified: - src/lib/components/EntryList.svelte - src/lib/components/EntryCard.svelte - src/lib/components/QuickCapture.svelte - src/lib/stores/preferences.svelte.ts - src/routes/+page.svelte - package.json autonomous: true must_haves: truths: - "User sees a list of entries on the main page" - "User can type in quick capture bar and create an entry" - "Entries show type indicator (task vs thought)" - "Quick capture bar is fixed at bottom of screen" artifacts: - path: "src/lib/components/EntryList.svelte" provides: "Entry list rendering with ordering" min_lines: 20 - path: "src/lib/components/EntryCard.svelte" provides: "Single entry display with type indicator" min_lines: 30 - path: "src/lib/components/QuickCapture.svelte" provides: "Bottom capture bar with form" min_lines: 40 - path: "src/lib/stores/preferences.svelte.ts" provides: "Persisted user preferences store" contains: "lastEntryType" - path: "src/routes/+page.svelte" provides: "Main page composing components" contains: "EntryList" key_links: - from: "src/routes/+page.svelte" to: "src/lib/components/EntryList.svelte" via: "component import" pattern: "import EntryList" - from: "src/lib/components/QuickCapture.svelte" to: "src/routes/+page.server.ts" via: "form action ?/create" pattern: "action=.*\\?/create" --- Build the main UI components: entry list, entry cards, and quick capture bar. Purpose: Users can see their entries and create new ones via the quick capture bar fixed at the bottom of the screen. Output: EntryList, EntryCard, QuickCapture components plus preferences store. Main page renders all entries with quick capture. @/home/tho/.claude/get-shit-done/workflows/execute-plan.md @/home/tho/.claude/get-shit-done/templates/summary.md @.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/02-core-crud/02-CONTEXT.md @.planning/phases/02-core-crud/02-RESEARCH.md @.planning/phases/02-core-crud/02-01-SUMMARY.md @src/routes/+page.server.ts @src/lib/server/db/schema.ts Task 1: Install dependencies and create preferences store package.json, src/lib/stores/preferences.svelte.ts Install svelte-persisted-store for sticky preferences: ```bash npm install svelte-persisted-store ``` Create preferences store at src/lib/stores/preferences.svelte.ts: ```typescript import { persisted } from 'svelte-persisted-store'; export const preferences = persisted('taskplaner-preferences', { lastEntryType: 'thought' as 'task' | 'thought', showCompleted: false }); ``` This store: - Persists to localStorage automatically - Remembers last used entry type for quick capture - Tracks show/hide completed preference Create the stores directory if it doesn't exist. npm install completes without errors. TypeScript check: `npm run check` passes. svelte-persisted-store installed, preferences store created with lastEntryType and showCompleted Task 2: Create EntryCard and EntryList components src/lib/components/EntryCard.svelte, src/lib/components/EntryList.svelte Create src/lib/components directory if needed. **EntryCard.svelte** - Single entry display: ```svelte
{#if entry.type === 'task'}
{:else} T {/if}

{entry.title || 'Untitled'}

{entry.content}

{entry.type}
``` **EntryList.svelte** - List of entries: ```svelte {#if entries.length === 0}

No entries yet

Use the capture bar below to add your first entry

{:else}
{#each entries as entry (entry.id)} {/each}
{/if} ``` Key features: - Type indicator: checkbox for tasks, purple "T" badge for thoughts - Type badge in corner (blue for task, purple for thought) - Completed tasks have strikethrough - Mobile compact (border-b), desktop cards (rounded, shadow) - Touch-friendly checkbox (44px touch target via touch-target class)
TypeScript check: `npm run check` passes. Files exist: src/lib/components/EntryCard.svelte, src/lib/components/EntryList.svelte EntryCard shows entry with type indicator and completion toggle. EntryList renders all entries.
Task 3: Create QuickCapture component and integrate into main page src/lib/components/QuickCapture.svelte, src/routes/+page.svelte **QuickCapture.svelte** - Bottom capture bar: ```svelte
{ return async ({ result, update }) => { if (result.type === 'success') { // Update preference $preferences.lastEntryType = type; // Clear form title = ''; content = ''; // Let SvelteKit refresh data } await update(); }; }} class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 shadow-lg safe-bottom" >
``` **+page.svelte** - Main page: ```svelte TaskPlaner

TaskPlaner

``` Key features: - Fixed bottom capture bar with safe area insets - Type selector remembers last used type - Clear form on successful submit - Adequate padding at bottom (pb-40) so entries aren't hidden by capture bar - Progressive enhancement: works without JS, enhanced with use:enhance
Start dev server: `npm run dev` Open http://localhost:5173 - Entry list should display (may be empty) - Quick capture bar should be fixed at bottom - Creating an entry should work and appear in list - Type preference should stick across page refreshes Quick capture bar creates entries. Main page shows entry list with proper bottom padding. Type preference persists.
After all tasks complete: 1. **TypeScript**: `npm run check` passes 2. **Dev server**: `npm run dev` starts without errors 3. **UI visible**: Entry list renders, quick capture bar at bottom 4. **Create entry**: Fill in content, click Add - entry appears in list 5. **Type indicator**: Tasks show checkbox, thoughts show purple badge 6. **Task toggle**: Clicking checkbox marks task complete (strikethrough) 7. **Type preference**: Select "task", create entry, refresh page - type selector still shows "task" Requirements satisfied: - CORE-01: Can create entry ✓ - CORE-04: Can specify type ✓ - CORE-05: Can mark task complete ✓ - CAPT-01, CAPT-02, CAPT-03: Quick capture works ✓ - EntryList and EntryCard components render entries with type indicators - QuickCapture component creates entries via form action - Type preference persists in localStorage - Main page composes all components with proper layout - TypeScript compilation passes After completion, create `.planning/phases/02-core-crud/02-02-SUMMARY.md`