Skip to content

feat: images shown in texts, for the orphans, the deletions and a broken images list - #2734

Merged
lbesson merged 2 commits into
masterfrom
feat/embedded-images
Nov 24, 2026
Merged

lbesson merged 2 commits into
masterfrom
feat/embedded-images

Conversation

@lbesson

@lbesson lbesson commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Follow-up of #2671 (orphan images) and of the [img=ID] tracking (guidebook.image_embeds, v6.46.0): an image without association can still be shown in a text.

  • GET /images/orphans: each orphan gets embedded_in, the documents whose text shows it (merged documents and the image itself left out).
  • Soft delete: a personal image deleted with its document is now kept when another document's text shows it.
  • New GET /images/broken-embeds (moderators): the [img=ID] in texts that show nothing, with a reason:
    • deleted: the image is in the trash and can still be restored (deleted gives the trash entry, who, when, expiry); these come first;
    • missing: no such document;
    • not_image: the id of another type of document (image_document_type, image_document_title).

PostgreSQL 9.6 compatible (jsonb_array_elements over the trash snapshots). No migration.

On prod today: 18 orphans shown in a text; 74 broken embeds (10 deleted, 52 missing, 12 not an image).

UI: c2corg/c2c_ui#5251. The API must be released first.

🤖 Generated with Claude Code

lbesson and others added 2 commits November 24, 2026 13:35
- GET /images/orphans tells which documents show each orphan in their
  texts ([img=ID]): such an image is used, to link again, not to delete
- GET /images/broken-embeds (moderator): the images shown in texts that
  do not show (missing id, deleted, not an image), those that can still
  be restored first with their deleted entry
- deleting a document no longer deletes a personal image shown in the
  text of another document: it stays, orphan

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lbesson
lbesson merged commit 5d12a45 into master Nov 24, 2026
6 checks passed
@lbesson
lbesson deleted the feat/embedded-images branch November 24, 2026 16:56
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.

1 participant