Skip to content

Add proof phase frontend integration#42

Merged
amoghbanta merged 7 commits intomainfrom
feat/proof-phase-frontend
Feb 14, 2026
Merged

Add proof phase frontend integration#42
amoghbanta merged 7 commits intomainfrom
feat/proof-phase-frontend

Conversation

@amoghbanta
Copy link
Collaborator

@amoghbanta amoghbanta commented Feb 14, 2026

Summary

Changes

Commit Description
1 API client types and methods (ProofStatus, runProof, getProofStatus, imageCaptioning on PageDetail)
2 Extend StepName union with "image-captioning", add label (not added to STEP_ORDER — proof-only)
3 New use-proof.tsuseProofSSE, useRunProof, useProofStatus hooks
4 New ProofProgress card component with single step indicator
5 Wire proof hooks and UI into book detail page (shown when storyboard accepted)
6 ImageCaptionList component in page detail with thumbnails and collapsible reasoning
7 Add image-captioning to debug LLM logs tab
8 Replace language picker with searchable dropdown, add Sinhala + Tamil, fix small viewport overflow (#47)

Test plan

  • pnpm test — all existing tests pass
  • Open a book with accepted storyboard → proof section visible
  • Click "Run Proof" → SSE progress streams, step indicator animates
  • After completion → page detail shows captions under images
  • Refresh mid-proof → SSE auto-reconnects
  • Re-run proof after completion → progress resets and streams again
  • Debug panel → LLM logs tab shows image-captioning entries
  • Add book wizard → step 3 language dropdowns are searchable, Sinhala + Tamil present
  • Add book wizard → buttons reachable on small viewports (14" laptop, 150% scale)

Add ProofStatus interface, runProof/getProofStatus methods, and
imageCaptioning field on PageDetail to support the proof phase
(image captioning) frontend integration.
Extend StepName union with "image-captioning" for the proof phase.
Add label to STEP_LABELS ("Caption Images") but intentionally NOT
to STEP_ORDER — proof uses its own single-step display.
New use-proof.ts with three hooks mirroring the pipeline pattern:
- useProofSSE: real-time SSE subscription with polling fallback
- useRunProof: mutation to trigger proof run
- useProofStatus: query for proof status polling
Displays proof phase progress with a single StepIndicator for
image-captioning, run/retry/re-run button, and status messages.
Add proof hooks, SSE auto-reconnect, and ProofProgress card to
the book detail route. Proof section shown after storyboard is
accepted.
Add ImageCaptionList component showing caption text, image
thumbnail, and collapsible reasoning for each captioned image.
Include the new step in the STEPS array and STEP_LABELS so proof
LLM calls appear in the debug panel.
@amoghbanta amoghbanta merged commit e026614 into main Feb 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add book third step is not seen completely - 14'' Laptop with 1920x1080 - 150% scale

1 participant