Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
9272af2
feat(admin): entail.dev tag suggestion client (SONA-220)
sparkyfen Sep 8, 2026
c7c59dc
fix(admin): let the entail.dev poll outlast the server's wait hold (S…
sparkyfen Sep 8, 2026
5e0efde
feat(admin): tag suggestion endpoint (SONA-220)
sparkyfen Sep 8, 2026
e33f4f4
fix(admin): empty entail.dev classification is a success with no tags…
sparkyfen Sep 8, 2026
d91c21b
docs(architecture): add entail.dev tag classifier (SONA-220)
sparkyfen Sep 8, 2026
a1b673a
fix(admin): review round 1 for the entail.dev tag suggestion client (…
sparkyfen Sep 8, 2026
97579b0
fix(admin): review round 2 for the entail.dev tag suggestion client (…
sparkyfen Sep 8, 2026
2520a6c
fix(admin): review round 3 for the entail.dev tag suggestion client (…
sparkyfen Sep 8, 2026
8d247e9
fix(admin): review round 4 for the entail.dev tag suggestion client (…
sparkyfen Sep 8, 2026
fbcc1d4
fix(admin): review round 5 for the entail.dev tag suggestion client (…
sparkyfen Sep 8, 2026
9c3b99d
fix(admin): review round 6 polish for the entail.dev tag suggestion c…
sparkyfen Sep 8, 2026
c1345db
fix(admin): lookup deadline clears one full first attempt (SONA-220)
sparkyfen Sep 8, 2026
40fc749
fix(admin): final review polish for the tag suggestion endpoint (SONA…
sparkyfen Sep 8, 2026
2194aeb
fix(admin): keep expected lookup outcomes out of the error metric (SO…
sparkyfen Sep 8, 2026
a29e901
fix(admin): answer 404 and 202 for declined or pending lookups (SONA-…
sparkyfen Sep 8, 2026
3419ae6
fix(admin): only input-rejection codes count as the classifier declin…
sparkyfen Sep 8, 2026
b05a742
docs(admin): describe not_found by the declined status set (SONA-220)
sparkyfen Sep 8, 2026
d84dbe0
fix(admin): clamp the Bluesky image count and state the 202 caller co…
sparkyfen Sep 8, 2026
4e51be9
fix(admin): terminal jobs, X error envelopes, and slashed tags (SONA-…
sparkyfen Sep 8, 2026
d48a416
fix(admin): read the request body up to the cap instead of buffering …
sparkyfen Sep 8, 2026
145519d
fix(admin): send no User-Agent on X guest-token requests (SONA-220)
sparkyfen Sep 8, 2026
89cfd70
feat(admin): suggest tags from the source post on the upload and edit…
Sep 8, 2026
e22bf88
feat(admin): add the Suggest tags backfill page under All Images (SON…
Sep 8, 2026
cf4f279
test(admin): cover the tag suggestion states, the backfill page and t…
Sep 8, 2026
19509de
docs: say where the tag suggestion lookup lives (SONA-220)
Sep 8, 2026
0aad4ea
fix(admin): make the backfill page build, page and bind correctly (SO…
Sep 8, 2026
a39c748
fix(admin): review round 1 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
6f51f37
fix(admin): review round 2 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
82c2663
fix(admin): review round 3 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
572deff
fix(admin): review round 4 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
d66b011
fix(admin): review round 5 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
1fb31ba
fix(admin): review round 6 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
ec81079
fix(admin): review round 7 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
0c81015
fix(admin): review round 8 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
b60e308
fix(admin): review round 9 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
467d0cc
fix(admin): review round 10 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
9c13b56
fix(admin): review round 11 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
2e71fd9
fix(admin): review round 12 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
92ac0e2
fix(admin): review round 13 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
e7c938e
fix(admin): review round 14 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
bb656bc
fix(admin): review round 15 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
129f33e
fix(admin): review round 16 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
1c36916
fix(admin): review round 17 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
ffd0e74
fix(admin): review round 18 for the tag suggestion UI (SONA-220)
sparkyfen Sep 8, 2026
4290596
Drop a landed answer when the source URL names another post
sparkyfen Sep 8, 2026
2820354
Keep a suggestion while the field still names the same post
sparkyfen Sep 9, 2026
d036105
Give a hung lookup a way out and keep the announcement honest
sparkyfen Sep 14, 2026
9e1f657
Pin the client timeout and name the row in the chip group
sparkyfen Sep 14, 2026
adb8982
Count only the tags Add will land, and tie Load more to its own navig…
sparkyfen Sep 14, 2026
2fbe43e
Let the lookup deadline clear both polls of a first attempt
sparkyfen Sep 14, 2026
70d52b3
Merge branch 'sparky/sona-220-entail-tag-suggestions' into sparky/son…
sparkyfen Sep 14, 2026
e3cd000
Keep the client timeout above the raised lookup deadline
sparkyfen Sep 14, 2026
34c37bb
Let two saves mint the same tag name without failing the page
sparkyfen Sep 14, 2026
db8c462
Announce the refusals and caveats the trays already show
sparkyfen Sep 14, 2026
b556ca8
Keep the classifier's rating when no tag clears the floor
sparkyfen Sep 14, 2026
1c9da10
Name Add in the refusal the forms announce
sparkyfen Sep 15, 2026
4ab4c8c
Write an image's tags in one D1 batch, and let the backfill refuse in…
sparkyfen Sep 15, 2026
3f97bb5
Use the example handle in the backfill test fixture
sparkyfen Sep 15, 2026
1042ef8
Use the example handle in the X fixtures too
sparkyfen Sep 15, 2026
a292bd4
Prove the client timeout is the signal the request carries
sparkyfen Sep 15, 2026
8efa656
Say which server the tag-suggestions spec runs on
sparkyfen Sep 15, 2026
df290eb
Drop the source pins that restate statements
sparkyfen Sep 15, 2026
303b59c
Re-seed the whole edit form when the page is reused for another image
sparkyfen Sep 15, 2026
cdc39b3
Merge origin/main into sparky/sona-220-entail-tag-suggestions
sparkyfen Sep 15, 2026
20f3eb2
Merge SONA-156 artist lookup into the SONA-220 tag-suggestions branch
sparkyfen Sep 15, 2026
f2c3b45
Merge origin/main into sparky/sona-220-tag-suggestion-ui
sparkyfen Sep 15, 2026
8be9487
Read the link token through the theme cascade in the tag contrast tests
sparkyfen Sep 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ vite.config.ts.timestamp-*
.wrangler-e2e-recovery
.wrangler-e2e-uploadthing
.wrangler-e2e-upload
.wrangler-e2e-tag-suggestions
.wrangler-e2e-suggest-tags

# Playwright
/test-results
Expand Down
19 changes: 13 additions & 6 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ after a fetch gives the same view from a clone.

## Read before upgrading: tag suggestions call entail.dev (SONA-220)

This release adds an admin-only tag suggestion lookup for artwork. Only you can
start it, and nothing runs on its own. When you do, the site sends a public
link to entail.dev, an image classifier, and shows you the tags it returns. For a
Bluesky post that link is the post itself. For an X post the site first asks X's
own API which picture the post carries, then sends the picture link X hands back.
Nothing from either reply is stored; the suggestions are yours to accept or drop.
This release adds an admin-only tag suggestion lookup for artwork. It appears in
three places: the **Suggest tags** button beside the Tags field when you upload a
piece, the same button on a piece's edit page, and a **Suggest tags** page under
All Images that lists every image with a Bluesky or X source post and no tags
yet. Only you can start it, and nothing runs on its own. When you do, the site
sends a public link to entail.dev, an image classifier, and shows you the tags it
returns. For a Bluesky post that link is the post itself. For an X post the site
first asks X's own API which picture the post carries, then sends the picture
link X hands back. Nothing is stored unless you accept it.

The built-in privacy policy and the `/ai` page describe this call already. If
you pasted your own privacy text or your own `/ai` text in Settings, **neither
Expand All @@ -73,6 +76,10 @@ source post, or at the picture in that post. For a post on X, the site first ask
X's own service which picture the post carries. Only the site owner can start
that, so nothing you do is sent to an AI service as you browse."

The release also adds a database index on `image_tags`, which the **Suggest
tags** page needs to find untagged images without reading every tag row. The
deploy applies it, so you don't need to run anything.

## One-time backfill: sticker animation flags (SONA-123)

The release that adds the per-sticker download-format menu also adds a
Expand Down
9 changes: 8 additions & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ graph TB
Hooks[🛡️ hooks.server — CSP, setup gate, sessions]
Public[🖼️ Public routes — galleries, characters, VR, stickers]
Admin[🛠️ Admin routes — setup wizard, uploads, settings]
TagCallers[🏷️ Tag suggestion callers — upload form, image edit form, /admin/images/suggest-tags backfill]
API[⚙️ API routes — /api/*, /img, oEmbed, RSS feed, cron]
QR[📱 /connect/qr — convention scan target, reads no D1]

Expand Down Expand Up @@ -73,6 +74,8 @@ graph TB
Hooks --> QR

Admin --> Auth
Admin --> TagCallers
TagCallers -->|POST /api/admin/tag-suggestions| API
Admin --> Storage
Admin --> Importers
Importers --> Storage
Expand Down Expand Up @@ -149,7 +152,11 @@ graph TB
integrations, keyed off secrets or settings (see `wrangler.toml.example` for the full list).
- entail.dev needs no key or secret. The app calls it only when an operator
asks for tag suggestions on an image whose source post is on Bluesky or X,
and never on a render path or a schedule. An X post takes one extra hop:
and never on a render path or a schedule. Three admin surfaces ask: the
upload form, the image edit form, and the `/admin/images/suggest-tags`
backfill list, which works through the images that already carry such a post
and have no tags yet. All three go through `POST
/api/admin/tag-suggestions`. An X post takes one extra hop:
X's own API resolves the post to its image, and that image URL is what
entail.dev classifies.
- GitHub Actions is part of the runtime, not just delivery: the scheduled
Expand Down
1 change: 1 addition & 0 deletions drizzle/0029_image_tags_image_id_idx.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE INDEX IF NOT EXISTS `image_tags_image_id_idx` ON `image_tags` (`image_id`);
Loading
Loading