Commit Graph

69 Commits

Author SHA1 Message Date
bvandeusen 40010202b2 fix(modal): reposition tag autocomplete when suggestions load
Suggestions arrive after the modal opens, so the autocomplete dropdown
positioned itself downward before the suggestions section was visible
and stayed there — covering the chips until the input lost and regained
focus. Re-run positionAutocomplete() after renderSuggestions so it flips
above the input.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 08:21:52 -04:00
bvandeusen 3944605d33 feat(bulk): consensus ML suggestions + frontend polish
Bulk editor now loads consensus ML suggestions across the current
selection via a new POST /api/suggestions/bulk endpoint, powered by
get_bulk_suggestions() in tag_suggestions.py. A tag is surfaced only if
it was suggested for or already applied to >= 80% of the selection;
coverage counts include images that already have the tag so a near-
universal tag isn't penalized for dropping out of suggestion lists.
Accept-only chips (no reject) match the rest of the suggestions UX.

Frontend polish in the same commit:
- Showcase session dedup (exclude seen ids, reset on second lap) and
  aspect-ratio-aware placeholder heights for better column balancing
- Modal touch-swipe navigation on the image wrapper, auto-focus of the
  tag input on desktop (>=768px), and autocomplete flip-up when the
  dropdown would cover the Suggestions section
- Settings template inline styles replaced with utility classes
- Inline series-editor script extracted to gallery-series-editor.js

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 18:39:47 -04:00
bvandeusen bc6b0a4a58 feat(ml): video tagging + embedding via frame sampling
Videos now route through a 10-frame sampling branch (configurable via
VIDEO_ML_FRAMES env) instead of the previous unsupported_format early
return. WD14 predictions are aggregated by max-confidence per (name,
category) across frames so sparse signals aren't diluted; SigLIP
embeddings are mean-pooled for a representative shot. Also generates a
fallback thumbnail when the record is missing one, and removes the
video_filter from backfill so videos get enqueued.

Celery soft/hard limits bumped to 240s/360s to accommodate 10x inference.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 18:39:33 -04:00
bvandeusen ac9b5cbc06 revert: remove modal tag-input auto-focus
The restore in fb925f5 was based on an observation of an older running
image, not a real regression against current main. User doesn't want the
auto-focus behavior; removing it so the modal opens without moving focus.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 00:13:37 -04:00
bvandeusen 9a0ac85f8c fix(ml): skip videos in tag_and_embed and backfill
WD14 and SigLIP are image-only. The current backfill enqueues every
ImageRecord row, and tag_and_embed retries 3 times (~3 min) on each
video before giving up, blocking the serialized ml queue. Worse,
videos never get a prediction row, so every subsequent backfill
re-enqueues them.

- tag_and_embed: early return 'unsupported_format' for video
  extensions, no retry.
- backfill: filter the outerjoin query to exclude video extensions
  via VIDEO_EXTS from app.utils.image_importer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:31:50 -04:00
bvandeusen fb925f5e6a feat: ml-worker self-heals models; restore modal tag-input auto-focus
ml-worker now fetches WD14 + SigLIP on container start via an entrypoint
script that calls huggingface_hub with a populated local_dir. HF does a
content-based integrity check, so subsequent starts are a no-op. Transient
HF outages warn and continue when a local copy is already present. This
drops the baked-in model layer (~4 GB) from the image so it pushes cleanly
through registry proxies and no longer bloats every tagged release.

view-modal.js restores the desktop-only auto-focus of the tag input on
openModal (with touch-device guard). The block existed in an earlier
main commit (0bf1961) but was absent from the post-corruption
consolidation commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 21:12:43 -04:00
bvandeusen 0f35a0c484 feat: ML tag suggestions, character/fandom integrity, underscores, modal polish
Consolidated merge of feat/tag-suggestions branch. Original 64-commit history
was lost to git-object corruption in a Nextcloud-synced checkout; this single
commit captures the equivalent diff.

Includes:
- pgvector-backed tag suggestion infra (WD14 + SigLIP centroids, ml-worker
  container, Celery tasks, suggestion service, accept/reject endpoints + modal
  UI with green/red chip buttons)
- Character/fandom integrity: title-case normalization on every write path,
  fandom-id backfill, maintenance task + settings button, migrations g26041901
  + h26041901 to canonicalize legacy rows with case-only duplicate merging
- Tag-underscores + modal polish: WD14 name canonicalization at emit + accept
  + add/bulk-add paths, migration i26041901 for legacy-row rename-or-merge
  across character/fandom/NULL kinds, suggestion-accept refresh parity via
  awaited loadTags, persistent chip tint
2026-04-19 19:50:58 -04:00
bvandeusen 52d783546e replace client-side tab toggling with server-side tab routing
Each settings tab is now a separate page load via ?tab= query param.
Flask renders only the active panel - no CSS or JS visibility logic needed.
Tab bar uses <a> links instead of buttons. Eliminates the display:none
cascade issue that was preventing Import and Maintenance tabs from showing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 17:06:11 -04:00
bvandeusen e37ce27256 fix settings tabs by using inline style.display instead of CSS class toggling
The class-based is-active/display approach was unreliable due to CSS cascade
issues. Switching to direct style.display manipulation bypasses specificity
entirely. Also added cache-busting ?v=2 to style.css link.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 16:52:45 -04:00
bvandeusen 1f33ca6cdf fix: three post-review corrections
- Filter source tags from gallery overlay refresh in view-modal.js and bulk-select.js
- Fix split(':', 1) bug causing series name to render as "undefined"
- Offset reader quick-nav above floating page indicator to prevent overlap

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 13:33:28 -04:00
bvandeusen bcd2016501 fix: move maintenance transition to base rule for smooth fade-out
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 13:29:26 -04:00
bvandeusen c16d0a38a8 feat: add tabbed layout to settings page with Overview, Import, Maintenance tabs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 12:20:03 -04:00
bvandeusen bf7d528917 fix: reader header auto-hide, keyboard null guard, active thumb box-shadow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 12:15:17 -04:00
bvandeusen 774ec635c7 fix: consolidate reader-nav-thumb active/hover CSS rules
Remove duplicate .reader-nav-thumb:hover and .reader-nav-thumb.active
blocks from the old sidebar styles. The newer rules using opacity and
border-left (added ~line 2646) supersede them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 09:02:33 -04:00
bvandeusen 1e96208533 feat: add progress bar, auto-hide header, active thumb tracking to series reader
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 08:59:29 -04:00
bvandeusen 8599ffb37c fix: scope tag-chip x button opacity to modal, cache tagActionFeedback ref
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 08:56:15 -04:00
bvandeusen 7cae463fe8 feat: improve modal sidebar hierarchy, collapse add-to-series, in-context feedback
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 08:51:03 -04:00
bvandeusen 9d7d76953e fix: respect prefers-reduced-motion for showcase stagger animation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 08:47:27 -04:00
bvandeusen 5e675f683f feat: add stagger entry animation to showcase on load and shuffle
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 08:44:13 -04:00
bvandeusen d4258d2ff1 feat: replace showcase tag overlays with ghost count badge, refine nav hint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 08:35:42 -04:00
bvandeusen 8ebba0ec55 fix: remove stale masonry play-overlay override and dead source tag branch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 08:34:01 -04:00
bvandeusen 4246f8a890 fix: remove conflicting play-overlay::before rule
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 23:58:39 -04:00
bvandeusen f65e40b711 feat: filter source tags from gallery items, refine date/video overlays
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 23:57:11 -04:00
bvandeusen bf20eeab5c character-fandom tag association system
Link character tags to fandom tags via fandom_id FK with auto-apply
behavior. Adding character:Saber (Fate) auto-creates fandom:Fate and
applies it to the image. Renaming a fandom cascades to all linked
characters. Includes set-fandom endpoint for retroactive association
and fandom selector dropdown in the tag editor UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 19:53:02 -05:00
bvandeusen ac9a8d145f DRYing the project 2026-02-05 21:23:59 -05:00
bvandeusen 079f1c1d49 ensuring tags dropdown is visible 2026-02-04 19:56:04 -05:00
bvandeusen c95896693f import filters for pixiv sidecars, tag filtering, and favicon generation 2026-02-04 19:08:50 -05:00
Bryan Van Deusen 17403c4e6b fixed some errors with archive handling 2026-02-02 23:36:16 -05:00
Bryan Van Deusen 3b5cd83b01 archive tag naming correction 2026-02-02 19:24:44 -05:00
Bryan Van Deusen 09883960d4 tuning job log views and deep scan archive processing. 2026-02-02 18:48:01 -05:00
Bryan Van Deusen 042a69f9c3 Optimize scan process with quick/deep modes and archive tag merging
Quick scan (default):
- Pre-load all ImportTask records for O(1) duplicate checks
- Batch task creation commits (50 at a time)
- Cache import settings (5-min TTL)
- Skip pHash comparison for speed

Deep scan (on-demand):
- Full reprocessing of all files
- pHash similarity detection
- Optional thumbnail regeneration
- Optional sidecar re-application

Archive tag merging:
- Add archive tags to existing images when duplicates found
- Works for both hash and pHash duplicate detection

Also fixes:
- Add missing source/post tag icons to gallery templates
2026-01-31 15:18:43 -05:00
Bryan Van Deusen d0fcde38e8 ui polish and importer logging tuning 2026-01-28 09:36:59 -05:00
Bryan Van Deusen 0bf1961175 updated view-modal generating js and references, corrected logging issue with archive import. 2026-01-28 08:36:12 -05:00
Bryan Van Deusen 5af1dcbd4f ui change to improve tag list load 2026-01-24 12:14:27 -05:00
Bryan Van Deusen 9ebeeed133 series management tuning and import archive extraction troubleshooting 2026-01-23 23:05:25 -05:00
Bryan Van Deusen d3e73b9533 changes to series order system. add artist retagging tool 2026-01-23 08:38:07 -05:00
Bryan Van Deusen 82cf3b782b removed trial preview for numbering 2026-01-22 23:29:00 -05:00
Bryan Van Deusen c620c2e041 tweaking series order tools 2026-01-22 23:19:06 -05:00
Bryan Van Deusen a05aee5a07 implement post metadata import and views. implemented series paging and reader view. 2026-01-22 22:19:11 -05:00
Bryan Van Deusen f41acb40f6 correct mass tag edit menu overlap 2026-01-21 22:52:20 -05:00
Bryan Van Deusen 041a3dbfb4 fixed metadata time import error and moved quest status widget to top of settings. 2026-01-21 11:30:45 -05:00
Bryan Van Deusen dc45a09681 further transparency tuning 2026-01-21 09:37:29 -05:00
Bryan Van Deusen ac95796de9 improving metadata imports 2026-01-21 09:03:28 -05:00
Bryan Van Deusen fa9b89eca2 updates to transparency filtering, fixing mass tag edit autocomplete 2026-01-21 08:36:46 -05:00
Bryan Van Deusen ede1457abc added dedup tools to settings. first pass of mass tag editting to gallery view. 2026-01-20 23:45:54 -05:00
Bryan Van Deusen 87bcb633f6 added transcoding to mp4 in import to ensure web playback. 2026-01-20 16:10:19 -05:00
Bryan Van Deusen cb3897c0b0 changes to mobile styling in modal view, complete reword of backend worker system 2026-01-20 13:14:13 -05:00
Bryan Van Deusen 96f72718bd moving styling and views to be more consistent and for gallery view to be less cumbersome. 2026-01-19 23:41:36 -05:00
Bryan Van Deusen 482c5a8ead import filter work and cleanup 2026-01-18 21:57:08 -05:00
Bryan Van Deusen b3331bad76 additional tag edditing functionality. and delete by tag. added import tuning options to settings 2026-01-18 16:52:32 -05:00