Add debug Remove entry, Show more auto-picker, and update docs.

DELETE /api/paintings/:id removes works and image files with gallery refresh and catalog navigation; Show more opens the search modal on load; documentation updated for migrate schema and debug workflow.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Danila Khodjaef
2026-06-22 22:32:23 +03:00
co-authored by Cursor
parent b2cae284ac
commit f542c689c9
31 changed files with 396 additions and 30 deletions
+10 -3
View File
@@ -1,4 +1,4 @@
import { useEffect, useRef, useState, type ChangeEvent } from 'react';
import { useCallback, useEffect, useRef, useState, type ChangeEvent } from 'react';
import type { Artist } from '../types';
import {
api,
@@ -15,6 +15,7 @@ import './ArtistBio.css';
interface Props {
artist: Artist & { movement_name?: string };
debugMode?: boolean;
debugShowMore?: boolean;
portraitRevision?: number;
onBack: () => void;
onEnterGallery: () => void;
@@ -31,6 +32,7 @@ interface Props {
export default function ArtistBio({
artist,
debugMode = false,
debugShowMore = false,
portraitRevision = 0,
onBack,
onEnterGallery,
@@ -127,7 +129,7 @@ export default function ArtistBio({
}
};
const handleOpenMore = async () => {
const handleOpenMore = useCallback(async () => {
setMoreOpen(true);
setMoreLoading(true);
setMoreError(null);
@@ -140,7 +142,12 @@ export default function ArtistBio({
} finally {
setMoreLoading(false);
}
};
}, [artist.id]);
useEffect(() => {
if (!debugMode || !debugShowMore) return;
void handleOpenMore();
}, [debugMode, debugShowMore, artist.id, handleOpenMore]);
const handleSelectMoreResult = async (item: DebugImageSearchResultItem) => {
if (fixing || applyingUrl) return;