Skip to content

[closed — wrong branch] - #6018

Closed
JGW3 wants to merge 10 commits into
odysseus-dev:devfrom
JGW3:feat/gallery-ocr-descriptions
Closed

JGW3 wants to merge 10 commits into
odysseus-dev:devfrom
JGW3:feat/gallery-ocr-descriptions

Conversation

@JGW3

@JGW3 JGW3 commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Pushed the wrong branch by mistake — apologies, working late. Closed and resubmitted from a clean one, see the current PR instead.

JGW3 and others added 9 commits August 11, 2026 22:00
…nt is empty

Swaps the inline gallery OCR prompt and the chat-attachment VL prompt for
the shared VISION_DESCRIBE_PROMPT constant so both paths produce the same
two-part shape. Adds _reasoning_as_caption() to salvage a usable caption
from a thinking model's reasoning block when content comes back empty.

Cherry-picked from f4e27ca, dropping its app.py request-timeout-exempt
hunk (belongs to fix/vision-request-timeout) and reconciling its
VISION_MAX_TOKENS=2000 addition down to the 1200 already defined in this
branch, matching fix/vision-tag-max-tokens (PR odysseus-dev#5965).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDcqC61wzuhXxRb5QfpPge
…n-editor-rerun

static/js/chatRenderer.js was pulled into this branch by 942cc5b's
original dev-local extraction along with the OCR descriptions work. The
Re-run button is a separate concern (PR odysseus-dev#5968) and this branch's copy
predates the fix for the regenerate-truncates-instead-of-replaces bug
that PR's maintainer review caught (missing { replaceFromHere: true } on
resendUserMessage, fixed there in commit 3cf80e8). Restoring this file
to origin/dev so the Re-run button is owned by exactly one PR, with the
fixed version.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDcqC61wzuhXxRb5QfpPge
…lass

The show more / show less buttons in _captionBlock duplicated the same
inline style attribute verbatim. Upstream requires reusing classes
instead of inline styling — pulled it into .gallery-caption-toggle-btn
in style.css (same declarations, still built on var(--red), no new
literals) and applied it to both buttons.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GSrmXANoxEyhXqgKYLRhFM
/api/gallery/{image_id}/ocr opens its own httpx client with a 300s
budget, but _RequestTimeoutMiddleware aborts anything not on the
exempt list at REQUEST_HARD_TIMEOUT (45s) — same failure mode already
fixed for /api/gallery/{id}/ai-tag elsewhere. The image id sits
mid-path so a plain prefix can't express it; added a regex pattern
list alongside the existing prefix list, scoped to this route only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GSrmXANoxEyhXqgKYLRhFM
analyze_image_with_vl_result's llm_call now passes max_tokens=VISION_MAX_TOKENS
and temperature=0.2 (same thinking-model fix as the ai-tag path), and its
timeout moved 120 -> 300 for the same reason the OCR route needs one. The
test's fake_llm_call didn't accept the new kwargs, so it raised TypeError
and the test silently asserted against the exception fallback text instead
of the real call. Found while running the full suite before opening the
gallery-ocr-descriptions PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GSrmXANoxEyhXqgKYLRhFM
@github-actions github-actions Bot added the ready for review Description complete — ready for maintainer review label Aug 12, 2026
@JGW3
JGW3 marked this pull request as draft August 12, 2026 07:15
@JGW3
JGW3 marked this pull request as ready for review August 12, 2026 08:02
@JGW3
JGW3 marked this pull request as draft August 12, 2026 08:08
The ai-tag prompt on this branch had picked up an unrelated local
customization from a personal instance (asking the vision model to
identify explicit content) that was never meant to leave that instance,
let alone ship in an upstream contribution branch. dev-local already
carries the correct, simplified prompt (see c742f3e, 'gallery: simplify
tag prompt so thinking models can complete it') — this branch's copy of
gallery_routes.py predates that commit and never picked it up. Replacing
with the same wording dev-local already uses.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GSrmXANoxEyhXqgKYLRhFM
@JGW3 JGW3 closed this Aug 12, 2026
@JGW3
JGW3 deleted the feat/gallery-ocr-descriptions branch August 12, 2026 08:12
@JGW3 JGW3 changed the title feat(gallery): AI-generated photo descriptions (OCR/captioning) [CLOSED — see #6019] feat(gallery): AI-generated photo descriptions (OCR/captioning) Aug 12, 2026
@github-actions

Copy link
Copy Markdown

⚠️ PR description — action needed

The following required sections are missing or incomplete. Please update the PR description to address them:

  • Summary is empty or too short — describe what changed and why.
  • Linked Issue — add a reference like Fixes #NNN, a bare #NNN, or a link to the issue.
  • Type of Change — check at least one box.
  • Checklist — check the duplicate-search box to confirm you searched existing issues and PRs.
  • How to Test — explain how a reviewer can verify this change. Numbered steps, the commands you ran, or a short code block all work — give a sentence or two of real detail (not just "tested locally").

This comment is deleted automatically once all sections are complete.

@github-actions github-actions Bot added needs work PR description incomplete — please update before review and removed ready for review Description complete — ready for maintainer review labels Aug 12, 2026
@JGW3 JGW3 changed the title [CLOSED — see #6019] feat(gallery): AI-generated photo descriptions (OCR/captioning) [CLOSED — replaced] feat(gallery): AI-generated photo descriptions (OCR/captioning) Aug 12, 2026
@JGW3 JGW3 changed the title [CLOSED — replaced] feat(gallery): AI-generated photo descriptions (OCR/captioning) [closed — wrong branch] Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs work PR description incomplete — please update before review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant