Continued BookifAI (AI illustrated-book KDP studio; own stack React+Vite+TS + Supabase umnlokuehteqwrheoyai + Stripe + OpenRouter) from a pasted launch-hardening handoff. Session switched to Opus 4.8 [1m] partway. Sondra asked to open the app and find the watermark β that trace exposed a dead-code screen (BookPreview.tsx) that was the ONLY caller of the illustration feature, meaning interior illustrations were unreachable in the live app. All work stayed in TEST mode, 0 real users. She owns bookifai.app.
BookPreview.tsx (imported nowhere) so it never displayed. New shared c:\Users\srver\AIOS-Workspace\aios-starter-kit\PROJECTS\Bookify AI Studio\app\src\components\create-book\PreviewWatermark.tsx; rendered in the REAL reading views: ...\app\src\pages\ChapterEditor.tsx (editor content) + ...\app\src\pages\ReviewPolish.tsx (manuscript tab). Shows when entitlementβ paid.generate-illustration was called only from dead BookPreview.tsx. Extracted the proven logic into ...\app\src\lib\illustrate.ts (generateChapterIllustration + buildScenePrompt + 402 lock-reason mapper) and wired one-illustration-per-chapter into the live editor ...\app\src\pages\ChapterEditor.tsx: an on-page "Illustrate / Redraw / Upload your own / Remove" strip above the chapter text; cover used as the style/character anchor; persists illustration_url to the chapters DB row (CreateBook already maps it β exports pick it up)....\app\src\components\create-book\ExportOptions.tsx β it pointed at a /shared-book/:id route that doesn't exist (404). Public shared-book reader = deliberate future v1.1....\app\src\components\create-book\BookPreview.tsx (the misleading dead file that hid all of the above)....\app\src\lib\book-export.ts (downloadPdf, downloadHtml, downloadDocx, downloadPlainText) only embedded the COVER, never chapter illustrations (only the KDP Print Pack kdp-print.ts did). Fixed all four β HTML: <img class="chapter-img"> after each chapter heading; PDF: pre-inlines each illustration as a data URL via new inlineImage() helper (cross-origin-safe, same as cover); DOCX: new buildImageRunFromUrl() β centered ImageRun after each heading (loop switched forEachβfor-await); TXT: honest [Illustration on this page β see the PDF/Word/KDP export] marker.kdp-print.ts is already premium-color; proven book was color). B&W/grayscale mode = easy future option, not a blocker.160bf885-560e-44fe-a84a-f0c6f0ee6a8b to entitlement='paid' in book_meters (was free for watermark viewing). images_used=0.c:\Users\srver\AIOS-Workspace\aios-starter-kit\PROJECTS\Bookify AI Studio\app\src\pages\ChapterEditor.tsx β the illustration UI now lives here (per chapter, all book types).c:\Users\srver\AIOS-Workspace\aios-starter-kit\PROJECTS\Bookify AI Studio\app\src\lib\illustrate.ts β shared illustration helper.c:\Users\srver\AIOS-Workspace\aios-starter-kit\PROJECTS\Bookify AI Studio\app\src\lib\book-export.ts β chapter illustrations now render in PDF/Word/HTML/TXT.c:\Users\srver\AIOS-Workspace\aios-starter-kit\PROJECTS\Bookify AI Studio\app\src\lib\kdp-print.ts β KDP Print Pack (already rendered illustrations; the model to match).c:\Users\srver\AIOS-Workspace\aios-starter-kit\PROJECTS\Bookify AI Studio\PRD.md β Β§7.7/Β§7.8 billing/metering/illustration spec.c:\Users\srver\AIOS-Workspace\aios-starter-kit\Sondra Brain\wiki\memory\open-questions.md (BookifAI section β CRITICAL gap + export bug documented).bvf6yxfjs = npm run dev for BookifAI (from a prior session, still serving; confirmed HTTP 200 this session). Kill via TaskStop on that ID, or ignore.cd "c:/Users/srver/AIOS-Workspace/aios-starter-kit/PROJECTS/Bookify AI Studio/app" && npx tsc --noEmit β exit 0 (was clean at end of session).curl -s -o /dev/null -w "%{http_code} %{content_type}\n" "https://umnlokuehteqwrheoyai.supabase.co/storage/v1/object/public/covers/illus_160bf885-560e-44fe-a84a-f0c6f0ee6a8b_ch3_1783525664561.png" β 200 image/png.execute_sql on umnlokuehteqwrheoyai): select entitlement, images_used from book_meters where project_id='160bf885-560e-44fe-a84a-f0c6f0ee6a8b'; β paid, 0. select chapter_number, illustration_url is not null from chapters where project_id='160bf885-560e-44fe-a84a-f0c6f0ee6a8b'; β ch.3 true.STRIPE_API_KEY_MAIN + live products/webhook), email-confirm ON in Supabase Auth, deploy to bookifai.app. App is otherwise build-complete + safety-checked.@amplifaiyourbusiness.com vs current verified sondraverva.com display name.marlowe-vsl-closer.skill in _INBOX-DROP-FILES-HERE\new skills to add\ awaiting the full skill-drop workflow.Sondra re-exports her book to confirm the Chapter 3 illustration now lands in the PDF/Word/KDP file; once she's satisfied illustrations work end-to-end, the only remaining work is the launch-day flips (Stripe live β email-confirm on β deploy to bookifai.app).
Generated for the CEO Dashboard · source: PROJECTS/Bookify AI Studio/handoffs/illustrations-live-editor-and-export-fix-2026-07-08.md π€