Fandom count fix + Explore 3-pane workspace + modal rail layout #131

Merged
bvandeusen merged 3 commits from dev into main 2026-06-26 08:24:27 -04:00
Owner

Bundles three CI-green dev commits:

  • 1aadf32 fix(tags): correct directory image_count — the fandom leg of the directory count used a non-correlating nested subquery, inflating every card to ~the same number (~469). Rewritten as a single-level correlated scalar subquery; gallery/cleanup were already correct. Clears the inflated card counts on the live instance.
  • 2d1cddd feat(explore): 3-pane tagging workspace — Explore reworked into gallery | viewer | tag rail (reuses the modal TagPanel via an optional host prop; modal untouched). Bare /explore seeds a random image; nav order pinned (Explore after Gallery); cluster tag-gap tool dropped.
  • 1728b43 fix(modal): pin Related to rail bottom, floppy-disk download — Related pinned to a footer (always reachable), the 320px suggestions cap removed, Download shrunk to a floppy-disk save icon in a compact meta top block.

All three green on dev (runs 1512 / 1514 / 1516).

🤖 Generated with Claude Code

Bundles three CI-green dev commits: - **`1aadf32` fix(tags): correct directory image_count** — the fandom leg of the directory count used a non-correlating nested subquery, inflating every card to ~the same number (~469). Rewritten as a single-level correlated scalar subquery; gallery/cleanup were already correct. Clears the inflated card counts on the live instance. - **`2d1cddd` feat(explore): 3-pane tagging workspace** — Explore reworked into gallery | viewer | tag rail (reuses the modal TagPanel via an optional `host` prop; modal untouched). Bare `/explore` seeds a random image; nav order pinned (Explore after Gallery); cluster tag-gap tool dropped. - **`1728b43` fix(modal): pin Related to rail bottom, floppy-disk download** — Related pinned to a footer (always reachable), the 320px suggestions cap removed, Download shrunk to a floppy-disk save icon in a compact meta top block. All three green on dev (runs 1512 / 1514 / 1516). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 3 commits 2026-06-26 08:24:21 -04:00
fix(tags): correct directory image_count — fandom leg must correlate the outer tag
CI / lint (push) Successful in 2s
CI / frontend-build (push) Successful in 19s
CI / backend-lint-and-test (push) Successful in 26s
CI / integration (push) Successful in 3m19s
1aadf3267b
The directory card count regressed to a globally-inflated number (~every
card showed the same ~469): the fandom leg used a doubly-nested correlated
subquery — image_tag.tag_id IN (SELECT member.id WHERE member.fandom_id ==
Tag.id) — whose inner predicate did not correlate the outer Tag, so it
matched EVERY character that has any fandom and counted all their images for
every tag. The gallery scope and cleanup count were unaffected (they pass a
literal tag id, a single-level subquery), which is why only the card diverged
from the gallery.

Rewrite the count as a single-level correlated scalar subquery: join `member`
(the tag applied to the image) and match image_tag.tag_id == Tag.id (direct)
OR member.fandom_id == Tag.id (a character of this fandom). Strengthen the
directory test with a second unrelated fandom/character so a non-correlating
fandom leg fails (count would read 4 instead of 3).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(explore): 3-pane tagging workspace — gallery | viewer | tag rail
CI / lint (push) Successful in 3s
CI / frontend-build (push) Successful in 19s
CI / backend-lint-and-test (push) Successful in 30s
CI / integration (push) Successful in 3m18s
2d1cddd9b7
Reworks Explore from "anchor + neighbour grid + cluster tag-gap rail" into a
persistent 3-pane workspace that unfolds the image modal so you can tag while
rabbit-holing (operator concept 2026-06-26):

- LEFT  neighbour grid (larger thumbs), click = walk; breadcrumb retained.
- CENTER light viewer — reuses ImageCanvas + ImageMetaBar(:image) for the
  focused image; "Open full viewer" still launches the overlay modal.
- RIGHT  the modal's TagPanel, hosted on the anchor for modal-parity tagging
  (chips, autocomplete, suggestions + Accept, fandom-on-chip, T/"/" focus).

Reuse without destabilising the audited modal store: TagPanel and
SuggestionsPanel gain an optional `host` prop (default = modal store, so the
image modal is unchanged); the explore store implements the same small
tag-CRUD surface (current/currentImageId + reloadTags/addExistingTag/
removeTag/createAndAdd) over the anchor. ImageMetaBar gains an optional
`image` prop for the same reason.

Drops the mass/cluster tagger (TagGapPanel deleted; clusterIds/thumbById
removed) — per-image tagging feeds the per-tag reference-embedding centroid
better than bulk ops.

Nav: keep the Explore tab but bare /explore now SEEDS a random image
(GET /api/showcase?limit=1 → /explore/:id) so the tab kick-starts a rabbit
hole; explicit meta.navOrder pins nav order (Explore after Gallery) since
router.getRoutes() doesn't preserve declaration order.

Note: the backend cluster tag-gaps route/service (#94a) is now frontend-orphaned
— left in place; flag for a separate cleanup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(modal): pin Related to rail bottom, floppy-disk download, drop suggestions cap
CI / lint (push) Successful in 3s
CI / frontend-build (push) Successful in 17s
CI / backend-lint-and-test (push) Successful in 27s
CI / integration (push) Successful in 3m17s
1728b43167
Right-rail layout fixes (operator-flagged 2026-06-26 — the prior change wasn't
the intended improvement):

- Pin the Related strip to the BOTTOM of the rail: the side becomes a flex
  column with a scrolling main area (meta + provenance + tags + suggestions)
  and a pinned Related footer (capped at 45% of the rail, scrolls past that).
  Related now stays reachable no matter how long Tags/Suggestions run, and
  self-collapses (no footer space) when there's nothing to show.
- Remove the 320px suggestions scroll cap (3fcc4ae) — it was a workaround "so
  Related stays reachable"; pinning Related is the proper fix, so suggestions
  flow in the single main scroll instead of a nested scrollbar.
- Shrink the Download button to a floppy-disk save icon (mdi-content-save); the
  meta (dimensions/size/type) + save action now sit as a compact top block
  (meta left, icon right). Copy link moves into the adjacent kebab menu.

ImageMetaBar is shared with the Explore center pane, so the compact save
control applies there too (parity). Mobile (<=900px) keeps the single body
scroll — no nested scroll, Related flows at the end.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bvandeusen merged commit 1f5da3d283 into main 2026-06-26 08:24:27 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledCurator#131