View modal batch: autofocus, suggestions UX, post-title click, retire copyright/artist #41

Merged
bvandeusen merged 3 commits from dev into main 2026-06-01 07:01:42 -04:00
Owner

Summary

Three coupled view-modal landings from 2026-06-01.

af7b5c9 — autofocus, expand general, lower threshold, retire copyright/artist (Scribe plan #509)

  • Autofocus tag entry on modal openTagAutocomplete grabs focus in nextTick(onMounted); type immediately, no click required.
  • General suggestions expanded by defaultSuggestionsPanel's general group switches default-open false → true.
  • Lower general threshold default 0.95 → 0.50 — Operator-flagged that 0.95 hid most general predictions. alembic 0029 also bumps the existing singleton row if still at 0.95. Settings → ML can re-tune.
  • Retire copyright + artist ML suggestion categories — neither feeds a real Tag.kind (artist retired in FC-2d-vii-c). Dropped from SURFACED_CATEGORIES, _threshold_for, ml_admin GET/PATCH allowlist, MLSettings columns, frontend CATEGORY_ORDER + CATEGORY_LABELS, peopleCats, AliasPickerDialog kind-check, MLThresholdSliders. The Postgres tag_kind enum keeps artist for historic-row queryability per the existing model comment — intentional, out of scope.

5d284aa — test fix for the new threshold default

test_threshold_filters_low_confidence_general was pinned to the old 0.95 default; the smile=0.80 input was below it but is above the new 0.50. Lowered the input to 0.30 so the test asserts threshold behavior rather than the specific cutoff.

f87a06a — Provenance post title click + suggestion rows look like buttons (Scribe plan #514)

  • Post title is the primary clickProvenancePanel's bold title becomes a button-link (accent color, hover underline, focus ring). Click navigates /posts?post_id=N&artist_id=A; PostsView already filters on artist_id via post_feed_service, so the feed lands scoped to that creator instead of the global stream. The redundant "View post" link is removed.
  • Suggestion rows look like buttonsSuggestionItem is now a chip-card: visible border, hover/focus background-and-border transition, explicit Accept tonal pill button (operator's pick over whole-row-clickable), 3-dot menu with variant="outlined" so it reads as a control. Score is a fixed-width monospace pill on the right. The + new badge becomes a pill chip with accent border so it visibly annotates rather than blending into the tag name.

Test plan

  • Open the view modal from showcase → caret blinks in "Add tag" without a click.
  • Suggestions panel mounts with the General group expanded; >0.50 general suggestions visible.
  • No Copyright or Artist rows appear in Suggestions for any image; Settings → ML → Suggestion thresholds shows only Character + General + Centroid similarity.
  • Provenance post title is accent-colored + underlines on hover; click navigates /posts?post_id=N&artist_id=A and the posts feed shows only that artist's posts.
  • Suggestion rows render as bordered chip-cards with a tonal Accept button and outlined menu icon. Hover changes background + border; focus shows a ring on the buttons.
  • Alembic 0029 runs cleanly on deploy (drops two columns, bumps general threshold from 0.95 → 0.50 if it was still the old default).
## Summary Three coupled view-modal landings from 2026-06-01. ### `af7b5c9` — autofocus, expand general, lower threshold, retire copyright/artist (Scribe plan #509) - **Autofocus tag entry on modal open** — `TagAutocomplete` grabs focus in `nextTick(onMounted)`; type immediately, no click required. - **General suggestions expanded by default** — `SuggestionsPanel`'s general group switches `default-open` `false → true`. - **Lower general threshold default 0.95 → 0.50** — Operator-flagged that 0.95 hid most general predictions. `alembic 0029` also bumps the existing singleton row if still at 0.95. Settings → ML can re-tune. - **Retire `copyright` + `artist` ML suggestion categories** — neither feeds a real Tag.kind (`artist` retired in FC-2d-vii-c). Dropped from `SURFACED_CATEGORIES`, `_threshold_for`, ml_admin GET/PATCH allowlist, MLSettings columns, frontend CATEGORY_ORDER + CATEGORY_LABELS, `peopleCats`, AliasPickerDialog kind-check, MLThresholdSliders. The Postgres `tag_kind` enum keeps `artist` for historic-row queryability per the existing model comment — intentional, out of scope. ### `5d284aa` — test fix for the new threshold default `test_threshold_filters_low_confidence_general` was pinned to the old 0.95 default; the `smile=0.80` input was below it but is above the new 0.50. Lowered the input to 0.30 so the test asserts threshold *behavior* rather than the specific cutoff. ### `f87a06a` — Provenance post title click + suggestion rows look like buttons (Scribe plan #514) - **Post title is the primary click** — `ProvenancePanel`'s bold title becomes a button-link (accent color, hover underline, focus ring). Click navigates `/posts?post_id=N&artist_id=A`; PostsView already filters on `artist_id` via `post_feed_service`, so the feed lands scoped to that creator instead of the global stream. The redundant "View post" link is removed. - **Suggestion rows look like buttons** — `SuggestionItem` is now a chip-card: visible border, hover/focus background-and-border transition, explicit `Accept` tonal pill button (operator's pick over whole-row-clickable), 3-dot menu with `variant="outlined"` so it reads as a control. Score is a fixed-width monospace pill on the right. The `+ new` badge becomes a pill chip with accent border so it visibly annotates rather than blending into the tag name. ## Test plan - [ ] Open the view modal from showcase → caret blinks in "Add tag" without a click. - [ ] Suggestions panel mounts with the General group expanded; >0.50 general suggestions visible. - [ ] No Copyright or Artist rows appear in Suggestions for any image; Settings → ML → Suggestion thresholds shows only Character + General + Centroid similarity. - [ ] Provenance post title is accent-colored + underlines on hover; click navigates `/posts?post_id=N&artist_id=A` and the posts feed shows only that artist's posts. - [ ] Suggestion rows render as bordered chip-cards with a tonal `Accept` button and outlined menu icon. Hover changes background + border; focus shows a ring on the buttons. - [ ] Alembic 0029 runs cleanly on deploy (drops two columns, bumps general threshold from 0.95 → 0.50 if it was still the old default).
bvandeusen added 3 commits 2026-06-01 07:01:31 -04:00
feat(modal): autofocus tag input, expand general suggestions, retire copyright/artist categories
CI / lint (push) Successful in 2s
CI / backend-lint-and-test (push) Successful in 17s
CI / frontend-build (push) Successful in 18s
CI / intimp (push) Successful in 3m48s
CI / intapi (push) Successful in 7m46s
CI / intcore (push) Failing after 8m18s
af7b5c95e9
Four coupled operator-asked changes to the view modal (Scribe plan #509):

1. **Autofocus tag entry on modal open** — TagAutocomplete grabs focus
   in onMounted/nextTick so the caret is in the input the moment the
   modal renders. No click needed to start typing.

2. **General suggestions expanded by default** — SuggestionsPanel's
   general-category group now mounts with `:default-open="true"`.
   Operator can collapse if too noisy, but the v1 frame shows them.

3. **Lower general threshold default 0.95 → 0.50** — MLSettings.
   suggestion_threshold_general default matches character. Alembic
   0029 also bumps the existing singleton row's value if it's still
   at the old 0.95. Operator can re-tune from Settings → ML.

4. **Retire `copyright` + `artist` as ML suggestion categories** —
   neither feeds a Tag.kind (`artist` retired in FC-2d-vii-c, never
   really existed as a copyright tag-kind). They were surfaced in the
   suggestions pipeline + threshold settings UI but had no follow-
   through. Drop from SURFACED_CATEGORIES, suggestions._threshold_for,
   ml_admin GET/PATCH allowlist, MLSettings columns (alembic 0029
   drops the two columns), frontend CATEGORY_ORDER + CATEGORY_LABELS,
   SuggestionsPanel.peopleCats, AliasPickerDialog kind-check, and
   MLThresholdSliders rows.

Out of scope (intentional): `tag_kind` Postgres enum still includes
`artist` for historic Tag row queryability (per the model comment);
no operator pain reported, no enum-shrink needed.

Tests:
- test_surfaced_categories asserts {character, general}, excludes
  artist + copyright.
- test_threshold_for_artist_is_unsurfaced extended to cover copyright.
- test_get_and_patch_settings asserts new 0.50 default and the absent
  artist + copyright keys in the GET payload.
fix(test): unpin general-threshold test from old 0.95 default (alembic 0029)
CI / lint (push) Successful in 3s
CI / frontend-build (push) Successful in 19s
CI / backend-lint-and-test (push) Successful in 26s
CI / intimp (push) Successful in 3m38s
CI / intapi (push) Successful in 7m55s
CI / intcore (push) Successful in 8m46s
5d284aae9f
feat(modal): post title is the primary click (artist-scoped) + suggestion rows look like buttons
CI / lint (push) Successful in 3s
CI / backend-lint-and-test (push) Successful in 11s
CI / frontend-build (push) Successful in 16s
CI / intimp (push) Successful in 4m16s
CI / intapi (push) Successful in 8m16s
CI / intcore (push) Successful in 8m41s
f87a06a6bd
Two operator-asked modal UX changes (Scribe plan #514):

1. **Post title click → artist-scoped posts feed**
   - The bold post title in ProvenancePanel is now the primary click
     target. Click navigates to /posts?post_id=N&artist_id=A; the
     PostsView already filters on `artist_id`, so the user lands in
     that creator's stream, not the global one.
   - The redundant "View post" link is removed. "Show description"
     stays as the only action link below the meta line.
   - Title is styled as a button-link: accent color, hover underline,
     focus ring for keyboard nav (family rule 24 — UI quality bar).

2. **Suggestion rows look like buttons**
   - SuggestionItem becomes a chip-card: visible border, hover/focus
     background, unified container for name + score + actions
     (operator's "nothing visual to unify the buttons to their object"
     complaint).
   - Accept is an explicit tonal pill button labeled "Accept"
     (operator's pick over whole-row-clickable). 3-dot menu retains
     alias/dismiss, now `variant="outlined"` so it reads as a button.
   - Score is a fixed-width monospace pill on the right.
   - "+ new" badge upgraded to a pill chip with accent border so
     it's visibly an annotation, not part of the tag name.
bvandeusen merged commit 65386f02a0 into main 2026-06-01 07:01:42 -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#41