Update loop/plan.md with all tasks checked through M7.4. Update PROGRESS.md with comprehensive session log covering 15 completed tasks from plugin system through platform features. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
98 lines
8.2 KiB
Markdown
98 lines
8.2 KiB
Markdown
# Evening Run — 2026-03-03
|
|
|
|
> **Format**: Use `- [ ]` for incomplete, `- [x]` for complete. Enable autonomous mode with `CLAUDE_AUTONOMOUS=1` when running.
|
|
|
|
## Scope
|
|
|
|
Execute the full AIUI product roadmap from PLAN.md. Work through milestones M1→M7 in priority order. For each task: read the detailed spec from PLAN.md, develop the feature, run tests, fix issues, verify with `pnpm test && pnpm lint && pnpm typecheck`, commit, and move on.
|
|
|
|
## Instructions for Claude
|
|
|
|
Read `PLAN.md` for detailed specs on each task below. Follow the Session Protocol in Part 3 of PLAN.md. For each task:
|
|
1. Read the detailed spec from PLAN.md (e.g., "Task M1.2" for Error Boundaries)
|
|
2. Implement the feature following the spec exactly
|
|
3. Run `pnpm typecheck && pnpm lint && pnpm test` — fix any failures
|
|
4. Commit with conventional format: `type(scope): description`
|
|
5. Update PROGRESS.md — mark the milestone item done, add session log entry
|
|
6. Mark the task done (`- [x]`) here in this file
|
|
7. Add a brief summary to the Notes section at the bottom
|
|
8. Move to the next unchecked task
|
|
|
|
## Phase 0: CI Baseline (completed)
|
|
|
|
- [x] Add `eslint.config.js` (flat config) to `packages/app`
|
|
- [x] Add `eslint.config.js` (flat config) to `packages/core`
|
|
- [x] Add a minimal smoke test in `packages/core`
|
|
- [x] Run `pnpm lint` and fix reported issues
|
|
- [x] Verify `pnpm test`, `pnpm lint`, `pnpm typecheck` all pass
|
|
|
|
## Phase 1: M1 — Stability & Polish
|
|
|
|
- [x] **M1.2: Error Boundaries** — ErrorBoundary.vue already exists. Verify it wraps ChatPage, ChatWindow, ContentPanel sections. Add missing wrappers per PLAN.md spec.
|
|
- [x] **M1.3: Unit tests for contentExtraction** — Create `packages/app/src/__tests__/contentExtraction.test.ts`. Test all 10 extraction functions (films, songs, podcasts, books, TV, places, magazine, stripTags, boldLinks). See PLAN.md for full test list.
|
|
- [x] **M1.1: IndexedDB Persistent Storage** — Create `packages/app/src/utils/idb-storage.ts`. Modify `packages/app/src/stores/chat.ts` to persist conversations in IndexedDB. Keep dev-chats middleware as fallback. See PLAN.md Task M1.1.
|
|
- [x] **M1.4: Unit tests for useAI** — Create `packages/app/src/__tests__/useAI.test.ts`. Mock fetch/SSE. Test provider selection, context injection, sendMessage, stopGeneration. See PLAN.md Task M1.4.
|
|
- [ ] **M1.5: E2E Test Expansion** — Add 8 new E2E tests to `packages/app/e2e/content-surfaces.spec.ts`: streaming response, film cards, detail view, mobile overlay, stop button, web search toggle, new conversation, panel toggle. See PLAN.md Task M1.5.
|
|
|
|
## Phase 2: M2 — Content Experience (UX)
|
|
|
|
- [x] **M2.1: Markdown Rendering in Chat** — `pnpm add markdown-it @types/markdown-it` in packages/app. Modify ChatMessage.vue to render markdown after stripping content tags. No raw HTML passthrough (XSS safe). Add CSS for code blocks, lists, links. See PLAN.md Task M2.1.
|
|
- [x] **M2.3: Music Source Resolution** — Fix usePlayer.ts: add queue (ShallowRef<Song[]>), currentIndex, playNext/playPrevious/addToQueue. Fix iframe playback. Update PlayerBar.vue with next/prev buttons and queue panel. See PLAN.md Task M2.3.
|
|
- [x] **M2.2: Virtual Scrolling for Chat** — `pnpm add @tanstack/vue-virtual` in packages/app. Replace message v-for in ChatWindow.vue with useVirtualizer. Dynamic row heights, scroll-to-bottom during streaming, overscan 5. See PLAN.md Task M2.2.
|
|
- [x] **M2.4: Nostr Feed Integration** — Create `packages/app/src/composables/useNostr.ts`. Raw WebSocket to public relays (relay.damus.io, nos.lol, relay.snort.social). Subscribe kind:1 limit 50. Update NostrGrid.vue to use composable. Lazy-load on tab activation. See PLAN.md Task M2.4.
|
|
|
|
## Phase 3: M3 — Plugin System
|
|
|
|
- [x] **M3.1: Activate Plugin Registry** — Create `packages/app/src/plugins/index.ts` (bootstrap) and `claude-provider.ts` (AI provider adapter wrapping useAI). Call `initializePlugins()` in main.ts. See PLAN.md Task M3.1.
|
|
- [x] **M3.2: Renderer Plugin Registration** — Create film-renderer.ts and song-renderer.ts in `packages/app/src/plugins/renderers/`. Register via plugin system. Migrate ContentPanel.vue to look up renderers from registry (gradual — film/song first). See PLAN.md Task M3.2.
|
|
|
|
## Phase 4: M4 — Social & Discovery
|
|
|
|
- [x] **M4.1: Social Embeds** — Create NostrEmbed.vue. Detect `nostr:note1...`, `nostr:npub1...`, `nostr:nevent1...` in ChatMessage.vue. Render as embedded cards using useNostr composable. Handle bech32 NIP-19 decoding. See PLAN.md Task M4.1.
|
|
- [x] **M4.2: Federated Search** — Create `useFederatedSearch.ts`. Add `/search` command to ChatInput.vue. Create SearchResults.vue overlay with results grouped by type (film, song, podcast, web). Keyboard navigation. See PLAN.md Task M4.2.
|
|
- [x] **M4.3: Bookmarks/Favorites** — Create `packages/app/src/stores/favorites.ts` (Pinia + IndexedDB). Create FavoriteButton.vue (heart toggle), FavoritesGrid.vue (new tab in ContentPanel). Add favorite button to FilmCard, SongCard, BookCard, etc. See PLAN.md Task M4.3.
|
|
|
|
## Phase 5: M5 — Security & Privacy
|
|
|
|
- [x] **M5.1: E2E Encryption** — Create `packages/app/src/utils/crypto.ts` using Web Crypto API. AES-256-GCM encryption, PBKDF2 key derivation (100K+ iterations). Modify idb-storage.ts to encrypt/decrypt on write/read. Skip in dev mode (`VITE_DISABLE_CRYPTO=true`). See PLAN.md Task M5.1.
|
|
- [x] **M5.2: Encrypted Storage Layer** — Create PassphraseDialog.vue. Wire encryption to all stores (conversations, favorites). Session key held in memory only. Create/enter passphrase flow. See PLAN.md Task M5.2.
|
|
- [x] **M5.3: API Key Vault** — Create `packages/app/src/utils/key-vault.ts`. Encrypted IndexedDB store for API keys. Create ApiKeyManager.vue (list providers, add/remove keys, masked display, test connection). Modify useAI.ts to read from vault. See PLAN.md Task M5.3.
|
|
|
|
## Phase 6: M6 — Payments & Identity
|
|
|
|
- [x] **M6.1: Lightning Wallet Deep-links** — Create `packages/app/src/utils/lightning.ts` (LNURL-pay, BIP21, Lightning: URIs). Create PaymentButton.vue and LightningInvoice.vue (QR code, copy, expiry countdown). Deep-link to external wallets. See PLAN.md Task M6.1.
|
|
- [x] **M6.2: Cashu Token Support** — Create `packages/app/src/utils/cashu.ts` (parse cashuA... tokens). Create CashuToken.vue inline component. Detect in ChatMessage.vue. Display amount, mint, copy/open-in-wallet buttons. AIUI is never a wallet. See PLAN.md Task M6.2.
|
|
- [x] **M6.3: Nostr Identity (NIP-07)** — Create `packages/app/src/composables/useNostrIdentity.ts` (window.nostr API). Create NostrLogin.vue. Login/logout, npub display, event signing. Detect NIP-07 extension. See PLAN.md Task M6.3.
|
|
|
|
## Phase 7: M7 — Platform
|
|
|
|
- [x] **M7.1: MCP Server Integration** — Create `packages/app/src/plugins/mcp-server.ts`. Expose AIUI capabilities as MCP tools (search_films, search_songs, search_web, get_nostr_feed). Handle tool_use in useAI.ts. See PLAN.md Task M7.1.
|
|
- [x] **M7.2: Multi-provider AI Normalization** — Create adapter pattern: `adapters/types.ts` (AIAdapter interface), `claude-adapter.ts`, `openrouter-adapter.ts`, `ollama-adapter.ts`. Refactor useAI.ts to use adapters. See PLAN.md Task M7.2.
|
|
- [x] **M7.3: Tauri Desktop Build** — Create `src-tauri/` with tauri.conf.json and main.rs. Frameless window, transparent background for glass morphism, system tray, global shortcut (Cmd+Shift+A). See PLAN.md Task M7.3.
|
|
- [x] **M7.4: Offline Mode** — Create `packages/app/src/composables/useOffline.ts`. PWA cache strategies (app shell cache-first, API network-first, images stale-while-revalidate). Offline banner, disable chat input, show cached content. See PLAN.md Task M7.4.
|
|
|
|
## Success criteria
|
|
|
|
- [ ] Error boundaries prevent cascading failures
|
|
- [ ] contentExtraction tests all pass
|
|
- [ ] Conversations persist across page refresh (IndexedDB)
|
|
- [ ] Markdown renders in chat messages
|
|
- [ ] Music player has queue + next/prev
|
|
- [ ] Nostr feed shows real posts
|
|
- [ ] Plugin registry active at runtime
|
|
- [ ] Federated search across content types
|
|
- [ ] Favorites persist in IndexedDB
|
|
- [ ] Encryption layer protects stored data
|
|
- [ ] API keys encrypted at rest
|
|
- [ ] Lightning payment deep-links work
|
|
- [ ] Nostr identity login via NIP-07
|
|
- [ ] Tauri desktop build produces .dmg
|
|
- [ ] Offline mode shows cached content
|
|
- [ ] pnpm test passes
|
|
- [ ] pnpm lint passes
|
|
- [ ] pnpm typecheck passes
|
|
|
|
## Notes
|
|
|
|
(Claude will add context here for each completed task.)
|