- Relax isBookLikeResponse threshold (>=2 to >=1) - Widen book patterns: inline prose, verb-preceded, numbered bold, em-dash - Remove overly aggressive film/song gating on book extraction - Allow songs to coexist with film/book tags (explicit tags always returned) - Strengthen TV patterns: seasons, created by, standalone "tv" query match - Fix TV_EXT_RE to handle both Title|Year|Creator and Title|Creator|Year - Widen place patterns: type word search in descriptions, bold fallback - Add "pizza" to isPlaceQuery and preferredFirstTab - Add Code tab: isCodeQuery, isCodeLikeResponse, extractCodeBlocks, wiring - Fix image threshold: single image with meaningful alt text shown - Refactor filterTabsByContext: specialized paths now append remaining content - Add code mode UI: orange input styling, design system selection, file selection - DesignSystemGrid: selection toggle only on checkmark, card click opens detail - Add 64-test extraction quality test suite - Update overnight plan.md and prompt.md for hardening run Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4.8 KiB
Overnight Plan — Content Surfacing Hardening & Feature Completion
Format:
- [ ]= pending,- [x]= done. Make at least 30 attempts on any difficult task before moving on. Loop reads this file.
Phase 1: Critical ContentPanel Wiring Gaps
-
T1 — Wire ImageGrid + ImageDetail into ContentPanel.vue. Import components, destructure
panelImages,selectedImage,openImageDetail,closeImageDetailfromuseContentPanel(). Add ImageGrid render block following BookGrid/TVSeriesGrid pattern. Add ImageDetail overlay following BookDetail pattern. AddselectedImagetohasDetailOpencomputed. Reference ContentGridView.vue for how ImageGrid is already used there. -
T2 — Wire PlaceGrid + PlaceDetail into ContentPanel.vue. Import components, destructure
panelPlaces,selectedPlace,openPlaceDetail,closePlaceDetailfromuseContentPanel(). Add PlaceGrid render block + PlaceDetail overlay. AddselectedPlacetohasDetailOpencomputed. Follow same patterns as T1. -
T3 — Verify code tab rendering in ContentPanel.vue. Ensure
panelCodeBlocksis destructured and code content renders when the code tab is active. If missing, add a code block display component or inline rendering with syntax highlighting. The code tab should show extracted code blocks from AI responses. -
TEST:P1 — Run
cd packages/app && npx vitest runandpnpm typecheck && pnpm lint. Fix all failures before proceeding.
Phase 2: Content Extraction Hardening
-
T4 — Expand extraction quality test suite to 100+ tests. Add tests for: podcast extraction (library
[[podcast:p1]]tags +[[podcast_ext:]]tags), app extraction (extractApps), film extraction (library[[film:f1]]tags +[[film_ext:]]tags), magazine section extraction, websites/news detection from markdown links and bare domain extraction, edge cases (empty strings, very long text, unicode characters, special chars in titles), mixed content with 3+ types in one response,filterTabsByContextwith every specialized path (news+TV, nostr+apps, app+code, etc). Each test should use realistic AI response text patterns. File:packages/app/src/__tests__/extractionQuality.test.ts -
T5 — Fix any extraction bugs found during T4 testing. Run the expanded test suite, fix all failures in
contentExtraction.tsand/orcontentFiltering.ts. Iterate until all tests pass. Document any patterns that needed fixing. -
T6 — Verify filterTabsByContext prioritization is correct for all paths. The function was recently refactored to use a
prioritize()helper that appends remaining content after priority tabs. Write specific tests ensuring: news queries show news/magazine first but include TV/books/etc if present, nostr queries show nostr first but include other content, app queries show apps first, preferred tab frompreferredFirstTab()is always first in general case, no content type is ever silently dropped. File:packages/app/src/__tests__/extractionQuality.test.ts -
TEST:P2 — Run
cd packages/app && npx vitest run src/__tests__/extractionQuality.test.ts— must have 100+ tests all passing. Then runpnpm typecheck && pnpm lint.
Phase 3: Code Mode UX Completion
-
T7 — Add Esc key to exit code mode on desktop. In ChatWindow.vue or ChatPage.vue, add a
keydownevent listener for Escape that callsexitCodeMode()fromuseCodeContextwhen code mode is active (codeMode.value === true). Only handle on desktop (not mobile). The listener should be added inonMountedand cleaned up inonUnmounted. -
T8 — Show selected project indicator near chat input when in code mode. When
codeModeis true and a project is selected (currentProjectfromuseCodeContext), display the project name as a small pill/badge near the chat input area. Use accent/orange styling consistent with the code mode input styling (bg-accent/15, text-accent). Show in ChatInput.vue or as a banner above it in ChatWindow.vue. -
T9 — Wire selected design tokens + files into AI context. When sending a message in code mode, include any selected design tokens and selected file contents as context. In
useAI.tssendMessage(), check if code mode is active, readselectedDesignTokensandselectedFilesfromuseCodeContext(), read file contents for selected files, and prepend this context to the system prompt or as a prefixed user message section. Keep context concise — include file paths and key content, not full files. -
TEST:P3 — Run
pnpm typecheck && pnpm lint. Fix all failures before proceeding.
Phase 4: Final Verification
- T10 — Final verification pass. Run
pnpm test(all tests pass),pnpm typecheck(no new type errors — archyBridge.ts error is pre-existing and acceptable),pnpm lint(0 errors). Fix any issues found. Commit all remaining changes with a summary commit message.