Fix tags splitting across lines and squeezed model buttons; refresh search after AI tagging
The model page's tag list wasn't a wrapping row, so the last tag could break in half, and four action buttons crushed onto two lines each. AI runs also never woke the background worker, so new AI tags and descriptions weren't searchable until something else changed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
c7c39f99fa
commit
4458963aa4
2 changed files with 7 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ const path = require('path');
|
||||||
const db = require('./db');
|
const db = require('./db');
|
||||||
const store = require('./store');
|
const store = require('./store');
|
||||||
const ai = require('./ai');
|
const ai = require('./ai');
|
||||||
|
const fingerprint = require('./fingerprint');
|
||||||
|
|
||||||
const CONCURRENCY = 3;
|
const CONCURRENCY = 3;
|
||||||
const MAX_FAILURES_IN_A_ROW = 5;
|
const MAX_FAILURES_IN_A_ROW = 5;
|
||||||
|
|
@ -133,6 +134,8 @@ async function processRun(runId) {
|
||||||
|
|
||||||
const results = await Promise.all(items.map((item) =>
|
const results = await Promise.all(items.map((item) =>
|
||||||
tagOne(runId, item.model_id, config, { images, knownTags, overwrite: overwriteDescriptions })));
|
tagOne(runId, item.model_id, config, { images, knownTags, overwrite: overwriteDescriptions })));
|
||||||
|
// New tags and descriptions change a model's search text, so refresh the index.
|
||||||
|
if (results.some((r) => r.ok)) fingerprint.kick();
|
||||||
for (const r of results) {
|
for (const r of results) {
|
||||||
if (r.imageRejected && images) {
|
if (r.imageRejected && images) {
|
||||||
images = false;
|
images = false;
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ header {
|
||||||
|
|
||||||
.tags-list { display: flex; flex-wrap: wrap; gap: 6px; }
|
.tags-list { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||||
.tag {
|
.tag {
|
||||||
font-size: 12px; padding: 4px 10px; border-radius: 12px; cursor: pointer;
|
font-size: 12px; padding: 4px 10px; border-radius: 12px; cursor: pointer; white-space: nowrap;
|
||||||
background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
|
background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
|
||||||
transition: all 0.12s;
|
transition: all 0.12s;
|
||||||
}
|
}
|
||||||
|
|
@ -202,7 +202,8 @@ label { display: block; font-size: 13px; font-weight: 500; color: var(--text-mut
|
||||||
.modal-body { padding: 22px; }
|
.modal-body { padding: 22px; }
|
||||||
.form-group { margin-bottom: 18px; }
|
.form-group { margin-bottom: 18px; }
|
||||||
.print-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
.print-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
||||||
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
|
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
|
||||||
|
.form-actions .btn { white-space: nowrap; }
|
||||||
|
|
||||||
/* ---- model detail ---- */
|
/* ---- model detail ---- */
|
||||||
/* minmax(0, …) keeps a long file name from widening its column and crushing the viewer */
|
/* minmax(0, …) keeps a long file name from widening its column and crushing the viewer */
|
||||||
|
|
@ -250,6 +251,7 @@ label { display: block; font-size: 13px; font-weight: 500; color: var(--text-mut
|
||||||
.info-section:last-of-type { margin-bottom: 0; }
|
.info-section:last-of-type { margin-bottom: 0; }
|
||||||
.info-section h3 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 9px; }
|
.info-section h3 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 9px; }
|
||||||
.info-section p, .info-section div { color: var(--text); font-size: 14px; line-height: 1.6; }
|
.info-section p, .info-section div { color: var(--text); font-size: 14px; line-height: 1.6; }
|
||||||
|
.info-section .tags { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||||
.info-section .tag { cursor: default; }
|
.info-section .tag { cursor: default; }
|
||||||
|
|
||||||
.file-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-muted); }
|
.file-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-muted); }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue