The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Library: the Trash shows helper steps too, without the Pinned and Show steps chips
Claude248e9ab3be55
diff --git a/src/components/library-view.tsx b/src/components/library-view.tsxindex a4c85ce2..383540fe 100644--- a/src/components/library-view.tsx+++ b/src/components/library-view.tsx@@ -230,7 +230,8 @@ function Inner() {() => ({...(tab.kinds && { kinds: tab.kinds }),...(tab.id === "favorites" && { favorites: true }),- ...(trash && { trashed: true }),+ // The Trash shows everything in it, helper steps too: deleting a Shorts session trashes its steps, and they can come back.+ ...(trash && { trashed: true, steps: true }),...(folderId && !trash && (subtree ? { folderIds: subtree } : { folderId })),...(dq && { q: dq }),...filterFields(filters),@@ -576,7 +577,7 @@ function Inner() {{!uploadsTab && !missingFolder && (<div className="mb-4 flex flex-wrap items-center justify-between gap-2">- <FilterBar value={filters} onChange={setFilters} facets={facets.data} subfolders={!!folder?.folders} scoped={!!folderId || tab.id !== "all" || !!dq} />+ <FilterBar value={filters} onChange={setFilters} facets={facets.data} subfolders={!!folder?.folders} scoped={!!folderId || tab.id !== "all" || !!dq} trash={trash} />{trash && (<div className="flex items-center gap-3 text-[13px] text-muted-foreground"><span>Items stay here for {TRASH_DAYS} days.</span>diff --git a/src/components/library/filters.tsx b/src/components/library/filters.tsxindex e47c19a6..ebb175a3 100644--- a/src/components/library/filters.tsx+++ b/src/components/library/filters.tsx@@ -119,6 +119,7 @@ export function FilterBar({facets,subfolders,scoped,+ trash,}: {value: Filters;onChange: (f: Filters) => void;@@ -127,6 +128,8 @@ export function FilterBar({subfolders?: boolean;/** A folder, a tab or a search: the library-wide counts (pinned, steps, failed, review) would mislead, so they're left off. */scoped?: boolean;+ /** The Trash shows everything in it, steps too, and has no pins: those chips go. */+ trash?: boolean;}) {const counts = scoped ? undefined : facets;const [custom, setCustom] = useState<{ from: string; to: string }>(value.date.id === "custom" ? { from: value.date.from, to: value.date.to } : { from: "", to: "" });@@ -225,16 +228,18 @@ export function FilterBar({</div></PopoverContent></Popover>- <Chip active={value.pinned} aria-pressed={value.pinned} onClick={() => onChange({ ...value, pinned: !value.pinned })} title="Only pinned results">- <Pin className="size-3.5" /> Pinned- {counts?.pinned ? <span className="font-mono text-[11px] text-muted-foreground">{counts.pinned}</span> : null}- </Chip>+ {!trash && (+ <Chip active={value.pinned} aria-pressed={value.pinned} onClick={() => onChange({ ...value, pinned: !value.pinned })} title="Only pinned results">+ <Pin className="size-3.5" /> Pinned+ {counts?.pinned ? <span className="font-mono text-[11px] text-muted-foreground">{counts.pinned}</span> : null}+ </Chip>+ )}{subfolders && (<Chip active={value.subfolders} aria-pressed={value.subfolders} onClick={() => onChange({ ...value, subfolders: !value.subfolders })} title="Include results from the folders inside this one"><FolderTree className="size-3.5" /> Subfolders</Chip>)}- {(facets?.steps || value.steps) && (+ {!trash && (facets?.steps || value.steps) && (<Chipactive={value.steps}aria-pressed={value.steps}diff --git a/src/server/library.ts b/src/server/library.tsindex 8e49570b..a80232b2 100644--- a/src/server/library.ts+++ b/src/server/library.ts@@ -195,7 +195,6 @@ export function trashCount(): number {return (db().prepare("SELECT COUNT(*) AS n FROM generation_trash t JOIN generations g ON g.id = t.generation_id").get() as { n: number }).n;}-// ---------------------------------------------------------------------------// Favorites, pins, review statusdiff --git a/tests/e2e/library-flows.mjs b/tests/e2e/library-flows.mjsindex 0dcdb22a..5acdc363 100644--- a/tests/e2e/library-flows.mjs+++ b/tests/e2e/library-flows.mjs@@ -168,6 +168,12 @@ check("deleting a folder moves its subfolders up", after.find((f) => f.id === C.check("…and its results", (await gen(made[2].id)).folderId === A.id);check("…and opens its parent", new URL(page.url()).searchParams.get("folder") === A.id);+// --- The Trash shows everything in it, helper steps too ------------------------------------------+const helper = (await call(`/api/generations?q=${encodeURIComponent(`${tag} helper`)}&steps=1`)).items[0];+await call("/api/generations/bulk", "POST", { action: "trash", ids: [helper.id] });+await library("/library?tab=trash");+check("the Trash lists a trashed helper step", (await page.getByRole("button", { name: new RegExp(`Open “${tag} helper step`) }).count()) === 1);+// --- Uploads ------------------------------------------------------------------------------------await openRoute(page, `${app}/library?tab=uploads`, { settleMs: 1500 });await page.getByRole("textbox", { name: "Search prompts" }).fill(tag);