OCR / text extraction from screenshots into searchable content #118

Closed
opened 2026-07-15 19:53:42 +00:00 by claude-bot · 1 comment
Contributor

Feature idea (audit Phase 5, rank #1 by value-to-effort) · Effort: low-medium

Why
The domain is media analysis and the user screenshots lyrics, captions, and on-screen text. Today the vision model produces a description and tags (api/src/services/ai.ts) but never extracts the literal text into the entry's searchable content, so screenshotted text isn't findable by full-text search.

Proposal
Reuse the existing vision provider to OCR image text on upload and offer the extracted text for the user to accept into content - the same approve-before-apply pattern already used for AI tag suggestions (nothing applied automatically). Fits the provider-agnostic AI service and the media pipeline.

Why it was likely missed
AI was scoped to "describe + tag," not "transcribe image text."

Acceptance criteria

  • On image upload, extracted text is offered for the user to accept into the entry content.
  • Accepted text is sanitized on write and becomes full-text searchable.
  • Nothing is applied without explicit user approval.

Filed from the 2026-07-15 codebase audit. Full report: docs/.internal/report-2026-07-15.md (gitignored).

**Feature idea** (audit Phase 5, rank #1 by value-to-effort) · Effort: low-medium **Why** The domain is media analysis and the user screenshots lyrics, captions, and on-screen text. Today the vision model produces a *description* and *tags* (`api/src/services/ai.ts`) but never extracts the literal text into the entry's searchable content, so screenshotted text isn't findable by full-text search. **Proposal** Reuse the existing vision provider to OCR image text on upload and offer the extracted text for the user to accept into `content` - the same approve-before-apply pattern already used for AI tag suggestions (nothing applied automatically). Fits the provider-agnostic AI service and the media pipeline. **Why it was likely missed** AI was scoped to "describe + tag," not "transcribe image text." **Acceptance criteria** - [ ] On image upload, extracted text is offered for the user to accept into the entry content. - [ ] Accepted text is sanitized on write and becomes full-text searchable. - [ ] Nothing is applied without explicit user approval. --- _Filed from the 2026-07-15 codebase audit. Full report: `docs/.internal/report-2026-07-15.md` (gitignored)._
Author
Contributor

Done — shipped in v9.3.0 (PR #142, merge c69897c).

extractImageText() reuses the provider-agnostic vision path (new OCR prompt); runAIAnalysis stores media.ocr_text (migration 055). POST /api/media/:id/accept-ocr appends the text to the entry content — sanitized on write, and full-text searchable immediately (the FTS index is an expression over entries.content). UI: a "Show extracted text (OCR)" → "Add transcribed text to entry" control on the media card. 3 integration tests.

Acceptance: extracted text offered on upload · accepted text sanitized + searchable · nothing applied without explicit approval (no-ops entirely when AI isn't configured).

Done — shipped in **v9.3.0** (PR #142, merge `c69897c`). `extractImageText()` reuses the provider-agnostic vision path (new OCR prompt); `runAIAnalysis` stores `media.ocr_text` (migration 055). `POST /api/media/:id/accept-ocr` appends the text to the entry content — **sanitized on write**, and full-text searchable immediately (the FTS index is an expression over `entries.content`). UI: a "Show extracted text (OCR)" → "Add transcribed text to entry" control on the media card. 3 integration tests. **Acceptance:** ✅ extracted text offered on upload · ✅ accepted text sanitized + searchable · ✅ nothing applied without explicit approval (no-ops entirely when AI isn't configured).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/TeaLeaves#118
No description provided.