e001cb6af7bfa852ee5d9da2f44f92c55aca70fd
637
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e001cb6af7 |
fix(ci): a docs-only push runs just the tests that read the docs (#679)
The pre-push hook ran the whole Python suite for a README edit. Only tests.test_brand_assets and tests.test_package_contents open docs-class files, so a docs push now runs those two. An inert push still runs nothing and every other push still runs the full suite. |
||
|
|
92920bf0f9 | chore: release 3.8.0, with a CHANGELOG and its contributors (#677) v3.8.0 | ||
|
|
9847664b9e |
feat: tag cleanup in Maintenance and short-phrase LoRA tags (#618) (#676)
* feat(lora): make tags only from short trigger phrases (#618) A trained-words entry becomes a tag only when it is one short clean phrase: the existing tag rule (at most 50 characters, no control character), no ASCII or fullwidth comma, no <...> model call and no prompt weight. The trigger-word lookup still sees every entry. The import review gains a Trigger words row (N become tags, M not made tags) and the import job logs how many entries were not made tags. * feat(maintenance): tag cleanup rules, find job and plan (#618) database/tag_cleanup.py holds a registry of tag rules; two ship: tags containing a comma (never a lora: tag; removed from every owner and deleted) and tags with no links (deleted). A tag belongs to the first rule that finds it. POST /prompt_manager/jobs/tag_cleanup runs the find as a read job that holds its findings; GET /prompt_manager/maintenance/tag_cleanup/{job_id} answers every rule with them; the tag_cleanup preview plans only the ticked findings, protecting any changed since the search. The apply is the maintenance job Tag cleanup: always after a safety backup, it rechecks each tag in one transaction and keeps, with its reason, each one that changed while the rest still apply. delete_vocabulary_tag and the rules share the new connection-level _delete_tag. * feat(system): Tag cleanup in Maintenance (#618) System > Maintenance > Database gains Tag cleanup (D210): Find tags starts the tag search as an Activity job (Finding tags, one Found tile, no Cancel); a search that found tags offers Review tags. Review tag cleanup draws whatever rules the server returns, nothing ticked at first: a rule tick ticks all its listed tags, each tag has its own tick, and Review cleanup opens the tag_cleanup plan. A failed Tag cleanup job's Review again goes to Maintenance. * docs: tag cleanup (#618) TESTING.md records D210 (the Tag cleanup row, its Activity kind, the review dialog and the import review's Trigger words row), the tag_cleanup operation in the Maintenance contract (rules, find job, per-target rechecks, forced backup) and the trained-words phrase rule in the LoRA reference import contract. |
||
|
|
a7d54e0ecf | fix(thumbnails): wait out a marker lock Windows is still deleting (#674) (#675) | ||
|
|
1439a5ef19 |
feat(images): collect AVIF as a media type (#652) (#673)
* Fix DB threading, recent ordering, restore size, and scan timestamps * Fix subfolders API missing include_ancestors param * refactor: move api code into promptmanager_core package * chore: ignore local config, tracking state, and db backups * Fix: fall back to original source when thumbnail img fails to load * fix(core): apply code review fixes, optimizations, and schema compliance - Fix KeyError in image_monitor _get_fallback_prompt dictionary handling - Add secondary LoRA hash stripping in image_monitor prompt lookup - Protect dual PromptManager workflows from metadata overwrite in patched_save_images - Support WebP, JPEG, and GIF metadata extraction via image.info - Add default values for prepend_text and append_text in INPUT_TYPES - Add **kwargs to encode_prompt, process_text, search, and IS_CHANGED - Declare explicit RETURN_NAMES across PromptManager and PromptManagerText - Add close() proxy to PromptDatabase and fix Windows SQLite connection locks - Normalize database and subfolder paths for cross-platform consistency - Update test suite teardown handlers and mock targets across 17 test modules - Add comprehensive CHANGELOG.md and issue.txt tracking documentation * Close test databases before unlinking temp files The usage and image-linking tests unlinked their temp database while the persistent SQLite connection was still open, so Windows raised WinError 32 from tearDown (POSIX allows unlinking an open file, so upstream CI never saw it). Close the database first and ignore a transient lock, matching tests/test_database.py. * Ignore local tracking state and prebackfill database backup * style: restore black formatting after 3.6.0 merge The fork-only default:" additions to prepend_text/append_text dropped the trailing commas, which black reformats. This is the entire cause of Tests #4 on main: black --check failed with 'would reformat prompt_manager.py' while every other job (test matrix, coverage, comfyui, js-test) passed. No behaviour change. * feat(images): collect AVIF as a media type (#652) The EXIF reader from #650 reads the prompt and workflow records ComfyUI's SaveImageAdvanced writes into an AVIF, but no file-type list named .avif, so neither the scan nor the monitor ever handed it one. Every list now names .avif: the scan and its deletion allowlist, the monitor's default and fallback, the gallery and thumbnail walks, serving and Inspect, auto-tagging's listing and its path check, the capture store, the preview source order and the diagnostics count. Pillow's floor here is >= 10.1.0 (ComfyUI's) and Pillow opens AVIF only from 11.0, and only when built with an AVIF decoder. utils/media_formats.collectable asks PIL.features.check("avif") at every collection point, so a Pillow without AVIF skips the file quietly and behaves exactly as before #652; the tests pin both answers on the gallery walk, the monitor, auto-tagging, the capture store and the scan. gallery.monitoring.extensions is saved per install and overrides the default, so a list saved before #652 gains .avif last on load, keeping every entry the install chose; an empty list stays empty, and a value that is not a list keeps the current one. The fixture is tests/fixtures/media/comfyui_avif.avif: a 1 KB still written by ComfyUI's own _save_avif (tools/make_avif_fixture.py regenerates it) carrying a PromptManager graph. The scan stores and links its prompt and pair; the monitor links the same positive prompt from the file's own EXIF. The local browser-only Inspect reader is unchanged: the bundled front-end reader does not parse AVIF, so the chooser still offers what it can read. Library Inspect reads an AVIF through the server, where Pillow answers. * chore: drop two local ignore rules that are not part of AVIF support (#652) --------- Co-authored-by: LacklusterOpsec <LacklusterOpsec@users.noreply.github.com> Co-authored-by: Vito Sansevero <vito.sansevero@gmail.com> |
||
|
|
9f3a1bf96d |
fix(lora): finish the import when the replace commits, even at exit (#619) (#672)
* fix(lora): finish the import when the replace commits, even at exit (#619) * test(lora): exit during the replace still finishes the import (#619) |
||
|
|
def5deb113 |
chore: retire the old admin, gallery and metadata pages (#668) (#669)
* feat(library): open the shelf filtered from a #/library?tag= link (#668) workspace#/library?tag=<name>&tag=<name>&tag_mode=all|any|untagged opens the Prompt library with those Tags and that Tag match, as Refine and Browse do. Old tag bookmarks are sent to this form. The filter stays in the hash until the shelf has mounted with it, then the address becomes #/library. A link is rendered even when the shelf is already open. A link that cannot be read opens the whole shelf and says so. * feat: old admin, gallery and metadata URLs lead into the workspace (#668) /prompt_manager/gallery answers 302 to workspace#/images and /prompt_manager/gallery.html to workspace#/inspect. The Location is relative, so a reverse-proxy prefix is kept. /prompt_manager/admin serves a small page that maps the old hash in the browser (the server never sees it): the dashboard opens the Prompt library, #/tags opens Tags & categories, and a tag bookmark such as #/tags/a,b?mode=or opens the Library filtered by those tags (workspace#/library?tag=a&tag=b&tag_mode=any). The mapping is web/js/legacy-links.js. The browser specs that drove the old pages go; the specs that only checked the old URLs now follow the redirects. The page files themselves are removed in the next commit. * chore: delete the old admin, gallery and metadata pages (#668) Removes web/admin.html, gallery.html, metadata.html, their controllers (admin.js, gallery.js, tags-page.js) and the ten helper modules only they loaded, with their unit tests. The vendored Tailwind build and the Makefile that rebuilt it go too: nothing else used them. Kept and still tested: comfy-metadata.js (its PromptManagerPair tests move to comfy-metadata.test.js), api-client.js, gallery-settings.js, png-metadata.js, cache-ownership.js. The inspector's Copy settings summary keeps its pinned COPY ALL template as a frozen copy in its test. The Viewer.js fixture suite drove the old controllers; it is now a smoke of the vendored build alone. The System coverage table has no row kept in legacy any more (the four become approved removals), and the table of ids removed from the old pages goes with the pages it checked. Coverage floors of the remaining files are unchanged; the deleted files' entries are removed. * docs: the old pages are gone, their URLs lead into the workspace (#668) README lists where each old URL now opens, with a tag-bookmark example and the workspace link form. README-legacy says the pages it describes were removed. TESTING.md records D207 (redirects, the bookmark mapping and the #/library?tag= form), D208 (no editing surface for records used only as a negative; data and exports kept) and D209 (the four System rows that were kept in legacy), and no longer says the old pages stay at their URLs. * fix(library): a Library link leaves title focus to the shell (#668) The shell focuses a page title on a navigation inside the workspace and never on the first render. A Library link followed that for the first, but also focused the title when the page was loaded directly on the link. * test: compare old-URL landings without building patterns from text (#668) Code scanning flagged two test lines: a regular expression built from a hash with only / and # escaped, and a regular expression used to cut <noscript> and <script> out of the redirect page. The address is now compared by its parts, and the page's inline script is found by plain string search. * feat(library): keep the tag filter in the address (#668) Ruling after the live test: a tag link used to become #/library once the shelf had its filter, so Reload and Back then Forward showed the whole Library. The address now stays #/library?tag=a&tag=b&tag_mode=any|untagged, in one canonical spelling. It is the truth for Tags and Tag match: Reload, Back and Forward restore the filter, a change in Refine replaces the address without a history entry, and #/library (the sidebar link, the old dashboard URL) always means no tag filter. Search, category, folder, sort and the archived shelf stay out of the address. The way back from a prompt's page and Browse on Tags & categories go to the filtered address. A saved view keeps its own address. |
||
|
|
6375be1a92 | chore: release 3.7.2 (#661) v3.7.2 | ||
|
|
6f02277a1c |
fix: small cleanup from the audit true-up (#662) (#665)
* refactor(api): one bounded JSON body reader for the API and images.py (#662) images.py kept its own copy of the chunked, capped JSON object reader. Both now use py/api/json_body.py; images.py keeps its 1 MiB cap and its raising form for the thumbnail job. * fix(api): refuse malformed bodies on the legacy prompt routes with a 400 (#662) PUT /prompts/{id}, PUT /prompts/{id}/rating, POST and DELETE /prompts/{id}/tags, POST /prompts/tags, PUT /tags/{tag}, POST /tags/merge and POST /bulk/delete|tags|category read the body with the bounded JSON reader /save uses and check field types, so a body that is not a JSON object, or a field such as {"text": 123}, is a 400 instead of a 500. A prompt id may still be a number or its text, as the legacy page sends it; a boolean is refused (prompt_ids [true] deleted prompt 1). POST /jobs/image-tags refuses a mode that is no text instead of a 500. * refactor(inspect): both resolvers read PROVEN_VALUE_CATEGORIES (#662) proves_value hard-coded the four tables in Python and in the browser. Semantics.proves_value now reads the constant (class-keyed categories by class, the rest by output slot), the browser resolver loops over its mirrored copy in local-resolver-support.mjs, and tests/test_proven_value_parity.py fails when that copy drifts. A test patches the constant to show the resolver follows it. * refactor: remove the write-only preview batch count and the test-only node search (#662) AutoThumbnailWorker set self._batch in four places and never read it. PromptManagerBase._search_prompts had no caller but its own tests: the node UIs search through GET /prompt_manager/search. Prompt search itself stays covered by the database and route tests. * fix(tools): open libraries through the shared read-only URI helper (#662) review_image_links, repair_foreign_links (twice) and workflow_text_digests built their own file: URIs, which SQLite refuses for a library on a Windows network share (file://server/share/...). They now use database/sqlite_uri.readonly_uri; repair_foreign_links opens its own read-write backup by path. The guard in tests/test_sqlite_uri.py scans tools/ too and also catches a conditional ?mode=ro suffix. * ci: bound the publish and Viewer.js update jobs by measured limits (#662) publish.yml and viewerjs-update.yml had no timeout-minutes, and the workflow guard listed only four workflows. The guard now reads every workflow and recomputes both new limits from their comments: publish 5 min from its last three green runs; the Viewer.js update 18 min, from an estimate of its never-run update path (the three measured nightly runs found no release and give the 5-minute floor). * docs: correct the redesign plan's CI and PR rules, renumber the second D205 (#662) docs/application-redesign.md named a Python 3.10-3.13 matrix with macOS, asked for PR screenshots and said Overview links the legacy metadata page. It now names the 3.12 floor and the current Linux/Windows split, asks for visual changes in words, and says the metadata page is reached by address or from the legacy admin page. TESTING.md used D205 for both #431 (saved instructions) and #620 (Library sorts); #620's entry is D206 now. |
||
|
|
8aad090c09 | test(send): wait for discovery's chosen node instead of expecting Apply disabled (#663) (#664) | ||
|
|
3d32e9183a |
ci: one single-pass gate on the pull request, the rest nightly (#666) (#667)
* ci: one single-pass gate on the pull request, the rest nightly (#666) A change was tested twice: on the pull request and again in the merge queue, which added Firefox, WebKit, Python 3.13/3.14 and real ComfyUI. Of the last 50 queue entries 9 failed, none because of the change. - ci.yml is the gate, on pull_request and workflow_dispatch only: the Python 3.12 suite once under the 85% coverage gate, black/flake8, bandit, frontend modules, tooling tests and pins, desktop Chromium page workflows with frontend coverage, and one required context, gate, that fails unless every job did what the change class asks. - nightly.yml runs Firefox, WebKit, touch, Python 3.13/3.14, Windows, native trash, real ComfyUI and the perf budget, and reports by issue: one per failing job, closed by the next green run. - No workflow has a merge_group trigger; a push to main starts only publish.yml, which now has a time limit. - Change classes: docs and inert run only the classifier and gate; a release (only the version line of pyproject.toml) runs the package-content check; everything else runs the gate. - @quarantine: left out of the gate, still run nightly. No retries in the gate; nightly retries once and lists flaky tests in the summary. - Frontend coverage is measured with Chromium alone; every floor holds. - branch-protection.json requires gate, strict. test.yml, viewerjs-check.yml, portability.yml and code-quality.yml are deleted. * style(ci): make the nightly report's joined sentence one explicit item (#666) |
||
|
|
a1f744708e |
fix: resolve rgthree Any Switch, show shared roles, choose ambiguous prompts in Inspect (#660)
* test(inspect): use a neutral unknown class in the pass-through fixtures The #381 fixtures used rgthree's Any Switch as their example of an unknown node. The table is about to describe that class (#657), so the stand-in becomes PMTest Unknown Multi and any_switch_graph becomes unknown_multi_graph. Resolver results are unchanged. * feat(inspect): resolve rgthree Any Switch by its first proven input (#657) rgthree's Any Switch outputs the first any_* input that is not None. The inspection resolver treated it as an unknown node, so the model-compare sweep (PromptManagerText into any_01, the same text joined after a LoRA trigger into any_02) was ambiguous in Inspect. The table gains a first-present selector strategy and lists the switch under it. The resolver takes the first participating input when it is a literal or its traced path proves a value (every node is a PromptManager, code-traced, default-adapter or encoders/strings/conditioning/composites class). Otherwise each input is one choice, unless all of them trace to one text; limits and upstream divergences propagate, and no PromptManager path is preferred. A missing or null input does not take part. The browser resolver and its table compiler follow the same rules, with the same strict entry check as the server. Only graphs holding the class change their class projection, so only their pending inspection items move; INSPECTION_RESOLVER_VERSION stays 2. * fix(inspect): list a repeated Any Switch outcome once (#657) A switch with three or more inputs can offer one text through two of them (a, b, a). Each input was its own candidate, so one text read as a choice between two, and two equal resolved candidates beside a failed one would count as reviewable. Like an unknown node passing several texts, a first-present divergence now collapses equal outcomes. The browser resolver does the same. The table compiler test also checks the 128-character prefix bound in code points, as Python counts it. * feat(inspect): show a role every candidate shares (#658) An ambiguous file used to withhold both roles, even when every candidate had the same negative. Inspect now judges each role on its own: a role is shown resolved when every candidate is resolved with the same text, stored recipe and left-out parts for it, using the first candidate's text and source. A role that differs, or any unresolved candidate, keeps the ambiguous line, and resolution.state stays ambiguous, so Send pair, ingestion and Needs review behave as before. The browser-local resolver applies the same rule; the footer Send to ComfyUI still needs both roles. A multistage detailer run whose stages share one negative (fixture f19) now shows that negative. * feat(monitor): ask the ladder for PromptManager runs nothing else links A PromptManager output whose metadata and tracked run cannot name its prompt now takes the ladder path foreign outputs use: decided at settle under the monitor policy, or after its run is sealed through the ladder wait. Wait entries carry their run kind; the kind selects the settings gate (SAVE_FOREIGN_RUNS for foreign entries, MONITORING_ENABLED for PromptManager ones) and the marks of a created prompt. Keyless images, placeholder batch entries and unreadable metadata never enter the wait. Every final unlinked outcome hands the file to the review recorder. Refs #659 * test(monitor): pin the final unlinked outcomes that reach Needs review The sweep, joined-text and shared-prefix graphs move to a shared fixture module. New tests pin when the monitor hands a file to its review recorder: after the sealed re-check, a settle lookup that found the run's record, a file outside ComfyUI's output folder and the keyless re-check; never before the run is sealed, and never for a linked file. A PromptManager output waiting for its run now logs that at INFO. Refs #659 * feat(review): offer inspection choices for default-unresolved files Decision.default_unresolved marks a file the default profile itself calls unresolved (a blank positive does not count). With inspection on, record_ambiguous_file now sends such a captured file with a prompt graph straight to the inspection-profile branch: a reviewable ambiguous or saver-anchored result is recorded, anything else is untraced. Apply is unchanged; it re-resolves with the item's recorded profile. Refs #659 * feat(review): one review dispatch and a review worker for monitor outputs review_dispatch holds the scan's per-file Needs review decision and is now also used by the monitor. The scan replaces its inline dispatch with it (and offers default-unresolved files their inspection choices). record_review_file runs the scan's per-file steps for one file, read only: the scan-policy ladder with the sealed history and the recorded-run check. A file the scan would link is skipped; otherwise the dispatch's record outcome is the answer. The monitor queues paths through queue_review_file onto one daemon worker (pm-review-recorder) with a bounded queue that coalesces by path and a bounded deferred set it replays once no job blocker remains. The package teardown stops it right after the monitor and reports it as part review once started. Refs #659 * docs(testing): the monitor queues what the scan would (#659) Rewrite the Needs review paragraph for the 2026-11-19 decision: the final-outcome points, the review worker and its bounds, the deferred replay and the default-unresolved rule. Document the PromptManager-run ladder path, the review step of the package teardown and the proven-value allowlist every future semantics table entry must keep. Refs #659 * fix(review): lock the untraced memory the scan and review worker share Refs #659 * feat(inspect): name the file's Needs review item in the inspection responses Inspect and the run-history current-file inspection gain a review field: {"state": "pending", "item_id": ...} for the newest pending item at the stat the inspection took, {"state": "decided"} once its item was decided, and null otherwise. It is read only when a role is ambiguous and the file is unlinked, by locator and stat (review_item_at), so Inspect never hashes the file. A LoRA root, a failed read and any malformed value give null. Refs #659 * feat(review): a single-item mode for the review controller and a shared option list createReviewController({api, itemId}) holds one named item: it never reads the queue, loads that item's detail, ends in phase decided (decided: true) after a recorded decision or for an item already decided, and re-reads the detail after a review-conflict, review-missing or restore refusal. The queue mode is unchanged. The Sampler context option list moves into renderReviewOptions (review-options.mjs, re-exported by review.mjs), so Needs review and the Inspect picker render the same options without Inspect importing the Needs review page. Refs #659 * feat(inspect): choose the prompt of an ambiguous file in Inspect When the inspection names the file's pending Needs review item, the inspector shows a Choose prompt section after its prompt blocks (Images panel, viewer details, recorded run current file). It reads the item's detail through the review controller's single-item mode: one Sampler context option per candidate (unusable ones disabled with their reason), the chosen option's prompt blocks with Copy and Send, Use this prompt and Leave unresolved over the Needs review apply flow. A recorded decision shows Needs review's toast and re-reads the inspection, so the file shows its link; an item with nothing to choose offers Open in Needs review. Refs #659 * fix(inspect): read the history review item only when Inspect asks The run-history reader locates the file under the scan roots inside the read, so an unambiguous or linked file costs no realpath of the output folders. The docstring names the linked-subfolder limit, and the newest pending item test pins the rowid tie-break. Refs #659 * fix(inspect): end Choose prompt on another read and on a decision made elsewhere The inspector disposes the section when it reads another file, fails or defers, so a decision in flight never re-reads the next file. A decided item hides the section and re-reads the inspection once, also when it was decided in another tab or in Needs review. Refs #659 * test(inspect): the rooted inspect shape gains the review facet Refs #659 * docs(testing): first-present candidates and per-role results (#657, #658) * test(review): keep the review cases ambiguous now that Any Switch resolves Part 1 resolves rgthree's Any Switch, so the sweep fixture links. The review and monitor tests that need a default-unresolved, inspection-ambiguous file now use ambiguous_sweep_graph(): Part A's any_switch_sweep_graph() with its switch class replaced by the never-listed PMTest Unknown Multi (one sweep graph instead of two). A new test pins that the real sweep links at settle from the inspector. Refs #657 #659 * fix(review): start the review worker again after an unexpected error * fix(inspect): pass the inspection refresh to Choose prompt by reference * feat(review): queue an ambiguous file with one readable choice (#657) An ambiguous result is reviewable when at least one candidate carries a resolved prompt (MIN_CHOOSABLE = 1). The sweep with an LLM enhancer on Any Switch any_01 now records an item, by the scan and the monitor, with the run-time branch listed beside the readable one. A file with no choosable candidate still records nothing. * feat(review): collapse too many candidates into the most used prompts (#657) More than 16 distinct candidates no longer make a limited item without choices. The choosable ones are grouped by their positive and negative texts, ordered by group size then first appearance, and the first 16 are kept, one real candidate each. The evidence names collapsed: {shown, total, paths} and the item detail returns it. Limited stays for evidence that cannot be projected or is over 8 MiB. REVIEW_EVIDENCE_VERSION is folded into every item version (default items now carry RESOLVER_VERSION + 1, inspection items fold it into their seed), so the next scan supersedes pending, undecided items of the old shape; decided items are kept. RESOLVER_VERSION, the ingestion's provenance version, is unchanged. * feat(inspect): record the Needs review item when Inspect finds none (#657) When Inspect asks for the review facet (an ambiguous role, an unlinked file under an output root) and no item exists at the inspected stat, the images and History current-file inspections run record_review_file, the review worker's own per-file path, in the executor and read the item again. A file the scan would link or that offers nothing to choose records nothing; a deferred or failed recording leaves review null and a failure is logged, never failing the response. * docs(testing): one readable choice, collapsed candidates, Inspect records (#657) * feat(review): say when a file's prompts were shortened to the most used (#657) The item detail now passes the stored evidence's optional `collapsed` counts ({shown, total, paths}) through to the page, null when absent, malformed, or when the detail was capped for size. Needs review and Inspect's Choose prompt show one line under Sampler context: "Showing the n most used of t prompts in this file." * feat(review): list the image's own prompts first in Link to a prompt (#657) With an empty search the dialog now lists the item's choosable candidates under "From this image" (positive / negative, one per prompt pair), then the Library's prompts under "Library". Choosing one of the image's prompts and pressing Link image applies that candidate by its hash, the same decision as Apply association (new controller.applyCandidate); no negative is asked for, the candidate carries its own. Typing searches the Library only. Items with no choosable candidate show the dialog as before. A refusal stays in the dialog with the server's sentence. * feat(review): load more of the queue on scroll (#657) The Needs review continuation now works like the Images page: an IntersectionObserver (250 px ahead) loads the next page when the end of the queue scrolls into view, and the line reads "40 of 45 images · more load as you scroll" without a button. Nothing loads behind an open dialog or the viewer; when one closes, focus returning to the page checks again. A failed page shows the failure line and a Retry button. Without IntersectionObserver the Load more images button stays. * fix(review): ask the inspection profile when the default choice is partial (#657) With one readable choice enough, a default result with one choice beside unresolved branches was recorded as is, so the inspection profile, which may read those branches (a Qwen image-edit sampler), was never asked and a rescan replaced older inspection items with the poorer default ones. Such a partial result now yields to the inspection result when that offers more choosable candidates. * fix(review): collapse only too many prompts, and apply any offered one (#657) Collapsing triggered on more than 16 distinct candidates, sampler ids included, so twenty samplers sharing three texts lost their run-time branches behind a collapsed note. Now only more than 16 choosable texts collapse; otherwise one candidate per text is kept and the branches without a prompt fill the remaining places, as an ordinary item. Apply's still-offered check compared the chosen hash with a fresh collapse, so a reorder that changed the representatives refused Apply. It now checks every projected, de-duplicated candidate hash (candidate_hashes). * fix(inspect): keep Inspect's recording quiet, bounded and current (#657) A busy capture store (the worker copying a fresh output) is an expected outcome: Inspect logs it at debug level and reads the item once more, also after a failed recording. A file Inspect found unrecordable (the scan would link it, or it offers nothing to choose) is remembered by its locator, stat and review versions, at most 4,096 files, so a repeated Inspect does not copy it again. A pending item of an older item version is recorded again, so the current record supersedes it. * docs(testing): partial default choices, bounded candidates, Inspect recording (#657) * fix(review): Link to a prompt drops an image choice it no longer shows (#657) Typing in the search box hid the "From this image" list but kept its chosen prompt, so Link image applied a candidate the reviewer could no longer see. Typing now drops that choice; Link image waits for a Library prompt and sends a Library link. Emptying the box lists the image's prompts again, none chosen. When the item's detail is read again while the dialog is open, the list follows what it offers now; a chosen prompt no longer offered is dropped with "This prompt is no longer offered for this file. Choose again." applyCandidate says the same when the hash cannot be chosen, and an unanswered apply from the dialog asks to press Link image again. * fix(review): keep the panel in place when Info brings it into view at one column (#657) At one column, Info scrolls the panel into view past the queue, which could bring the continuation into view and load the next page, pushing the panel away. As on the Images page, loading now waits for the reader's next wheel, touch move or key press. * docs(review): say why the review worker's recorder is a lambda * test(review): open the dialog of the D5 dialog test beside the queue (#657) At one column (touch) the review panel follows the queue just above the continuation, so scrolling Link to a prompt… into view brings the continuation within the observer's 250 px margin. The next page then loads before the dialog opens whenever the observer's callback runs first (CI shard 4/4, touch), and the test found no continuation to scroll to. That load is the page working as designed: the reader has reached the end of the queue. The test is about loading behind an open dialog, so it now runs at two columns, where Link sits in the sticky panel beside the queue, and it checks that the continuation is out of range before the dialog opens. |
||
|
|
b3bb55f2dc | chore: release 3.7.1 (#655) v3.7.1 | ||
|
|
fa31644c4c |
fix(node): give prepend_text and append_text their empty default (#651)
Both inputs are optional STRINGs that the node already treats as empty (`encode_prompt` defaults them to ""), but INPUT_TYPES left "default" out, so `/object_info` and the v3 schema answer null for them while category, tags and search_text answer "". PromptManagerFocused already forces "default": "" on the same two inputs, so the plain node was the only one without it; Focused, Split and Pair inherit the fix. The test asserts every optional STRING of PromptManager starts empty. |
||
|
|
0c023c7ec9 |
test(inspect): wait for the held video's revoke instead of checking once (#653) (#654)
On WebKit a replaced video that is still starting, inline or in the viewer the selection opened, keeps its URL until it settles or 15 s pass. The test checked the revoke once, right after the new preview showed, so it failed when the viewer's video settled later. |
||
|
|
9943a61619 |
fix(images): link WebP images to their prompts (#650)
* fix(images): link WebP and AVIF images to their prompts
ComfyUI writes the workflow and the prompt into PNG text chunks, and the
library read only those. SaveAnimatedWEBP writes the same records as EXIF
instead: `prompt:{json}` at tag 0x0110, then `workflow:{json}` and every
other `extra_pnginfo` key from 0x010F down; the AVIF writer uses that
layout. Pillow answers them only through `getexif()`, so an animated WebP
or an AVIF scanned into the library matched no prompt and stayed unlinked.
`utils/exif_text.py` answers the `png_text` shape from those tags, and
both metadata readers (the scan's `_extract_comfyui_metadata` and the
monitor's `extract_metadata`) ask it when a file has no text chunks. Only a
value shaped like a record counts, so camera EXIF stays out. PNG is
unchanged: its records are text chunks and `exif_text` answers `{}`.
The tests write real still and animated WebP, AVIF (where Pillow has it) and
JPEG files in ComfyUI's layout, and hold both readers to them.
* docs(images): AVIF is read but not yet collected (#652)
The EXIF reader handles ComfyUI's AVIF files, verified against files
written by ComfyUI's own _save_avif. No scan, monitor or gallery list
collects .avif yet, so say so and point at #652.
---------
Co-authored-by: Vito Sansevero <vito.sansevero@gmail.com>
|
||
|
|
1d509c885e |
chore: release 3.7.0 (refuse permanent delete off Linux/BSD, #644) (#645)
* fix(images): refuse permanent delete where the review does not offer it (#644) The apply accepted mode "permanent" on every OS; only the workspace hid the option. A direct call on Windows or macOS unlinked files although the README says Windows can only remove images from the library. The apply now answers 400 unless the Freedesktop trash backend is in use, before any backup or file change. The review and the apply share one check. The README describes the new option and its limit. * chore: release 3.7.0v3.7.0 |
||
|
|
96ce361b82 |
fix(paths): a backslash inside a name works on Linux and macOS servers (#646) (#649)
* fix(paths): a backslash inside a name works on Linux and macOS servers (#646) On POSIX a backslash is an ordinary character, and a Windows-style filename_prefix makes a folder whose name holds one. The listing named such a file, but the workspace and the tag, favorite, collection, delete, thumbnail and folder-filter routes refused it or split the name at the backslash. Separators are now the server's own: / always, \ only on Windows. Windows keeps every refusal it had. The listing marks a path holding a backslash with path_style "posix", and the workspace accepts the backslash only with that mark. Scan rows, duplicate keys and the folder tree no longer turn \ into /, so a\b.png and a/b.png stay two files. * fix(paths): Needs review and tagging take a backslash name too (#646) Needs review built its own image entries without the POSIX mark, so Open and Info still failed there for a name holding a backslash (Codex P2). The review target now carries path_style like the Images listing, and imageOf passes it on. The capture store, which tagging and review read through, refused every backslash; it now refuses one only on Windows. Before this, such a file could not be tagged and never reached Needs review. * fix(tests): shared-listing tests wait for the workspace cache build before teardown A read that stores a listing starts the workspace cache build on a worker thread, and cancelling its task at cleanup does not stop the thread. A test that ended on that read could reach teardown while the thread opened a database connection, and the leak check failed (queue run 44164234834, py3.14). Teardown now stops new builds and waits for the running one. On one busy CPU the test failed 8 of 60 runs before and 0 of 60 after. * fix(tests): the pool-reuse test makes its first job run on both threads ThreadPoolExecutor starts threads lazily and skips a new one while another is idle. The first job's tiny tasks could all run on worker 0 and leave worker 1 to start in the second job, so second <= first failed although the pool was reused (queue run 44169912829: first {worker_0}, second {worker_1}). A two-party barrier now makes the first job run on both. |
||
|
|
9d058a0035 |
fix(viewer): a file the viewer refuses no longer stops it opening for every image (#646) (#648)
The viewer checked every loaded image before opening and threw on the first identity it refused, such as a folder name holding a backslash. It now leaves those files out of the arrow-through list, and clicking one shows its details panel instead of the viewer. |
||
|
|
4aa71c4026 |
Add permanent delete mode for images (Linux/BSD) (#643)
- Adds a "permanent" mode to the delete preview plan and apply job that unlinks files from disk (Linux/BSD only). - Unlinks media files with os.remove; refused unlinks leave files intact. - Flags permanent_delete_supported based on the Freedesktop backend. - Frontend offers the mode only when the server supports it. - Includes Python and JavaScript test coverage for the new mode. - Update TESTING.md claims around the use of `unlink` to reflect this new mode. |
||
|
|
a695457cce |
fix: Windows dev machines: pinned files survive a default clone; four tests stop depending on the machine (#636) (#637)
* fix: a default Windows clone keeps pinned files byte for byte; LoRA test no longer depends on TEMP (#636) Git for Windows converts text files to CRLF on checkout by default, so a fresh clone failed npm run --prefix tools/vendor check with Viewer.js drift. .gitattributes now marks the pinned Viewer.js, Toolkit and concept stylesheet files as never converted, and a test holds that for every tracked file under them. .gitattributes stays out of the Registry package. test_preview_writes_nothing_and_makes_no_requests expected the full settings path, which only holds when the temp folder is outside the home folder. On Windows %TEMP% is under the profile, so the review showed ~\... and the test failed. It now pins the home folder beside the temp root. * fix(tests): the Built-in instructions test reads Python source with either line ending (#636) In a default Windows clone py/tagging_defaults.py is checked out with CRLF, so the test's search for the closing paren missed and JSON.parse failed on a carriage return: 1453 of 1454 frontend tests passed. The test now normalizes CRLF before it slices the source. * fix(tests): two more Windows machine failures: killed test servers, nearby ComfyUI (#636) On a Windows machine with a virtual environment, the tests that start tests/browser/server.py failed their cleanup with WinError 32 on the server's log file, 3 of 3 runs. The venv's python.exe is a launcher that runs the real interpreter as a child; killing the launcher returns while Windows is still ending that child. The temp folder is now removed by remove_when_released, which waits until the files are released, up to 30 s. CI never saw it: its Windows job runs a plain interpreter. The diagnostics tests that expect no output folder ran in the temp root, so the fallback's ../../ComfyUI/output could reach a real ComfyUI next to it. They now run two folders deep inside the temp folder. * docs(testing): what a Windows development machine needs for the suite (#636) * fix(tests): one import style in test_process_cleanup; the line-ending test ignores GIT_* (#636) Code quality flagged unittest imported both ways. The line-ending test shells out to git, which inside the pre-push hook would follow the exported GIT_DIR; it now runs git without GIT_* variables, proved with GIT_DIR and GIT_INDEX_FILE pointing at a decoy repository that stays untouched. |
||
|
|
c9d2b9c66b |
ci: test only changes that can affect code (#639) (#640)
* ci: test only changes that can affect code (#639) Each gating workflow starts with a change class job that sorts the pull request, merge group or push by the files it touches (tools/ci/change_class.py): inert (nothing reads them), docs (a Python test reads them) or code (anything else and every case of doubt). - inert: only the classifier and the two gates do work. The required py3.12 leg starts and skips its steps, because a skipped matrix job would never report that context. - docs: the Python 3.12 suite runs as well; it holds the README tests. - code: everything runs, as before. The gates require the classifier to succeed and every job to do what the class asks; an unknown class fails them. bandit has no gate, so it runs unless the class is docs or inert. The required contexts are unchanged. The pre-push hook skips the suite for an inert push. * test(ci): keep the classifier tests out of a git hook's repository (#639) Inside the pre-push hook git exports GIT_DIR and GIT_INDEX_FILE for the repository being pushed. The test's own git calls inherited them and so ran git init, add and commit against that repository instead of their temp one. They now drop every GIT_ variable, and the tests run with those variables pointing at another repository that must stay absent. * test(ci): import unittest.mock one way * fix(ci): find the pre-push command through PATH before running it The pre-push wrapper ran its command with subprocess and a bare name. On Windows the frontend hook's npm is npm.cmd, which subprocess does not find without a PATH and PATHEXT lookup, so every non-inert push failed with FileNotFoundError (Codex review). The wrapper now resolves the program with shutil.which first, and says so when it is missing. Reproduced and verified on Windows 11: before, FileNotFoundError; after, npm --version runs. * test(inspect): keep trying until a video is seen still starting at loadstart (#641) A busy WebKit fired the viewer video's loadstart after it already had HAVE_ENOUGH_DATA (merge-queue run 43732282629, readyState 4), so the per-attempt readyState === 0 assertion failed although the settled path behaved correctly. The three #483 tests now count the attempts that saw the video still starting, run up to twice as many pages until one does, and fail only if none did. |
||
|
|
98ba01d670 | Update Buy Me a Coffee username to 'veets' (#638) | ||
|
|
6c19f0a228 |
fix(tests): System specs wait for the save's answer before reading the status (#634) (#635)
Every System spec that saved to the server and then read the status line gave it five seconds, the same wait that failed in the LoRA import review spec (#631) when the durable config write took longer on a busy CI disk. A shared helper (tests/browser/settings-save.mjs) waits for the host's answer to the save: 23 sites in the sources, backups, integrations, tagging and system specs now use it, and so does the import review spec. Saves kept in the browser send nothing and are unchanged. Under a 20 IOPS write throttle the five specs went from 11 failures, four of them the stale status, to 7, all of them the 30 s test limit. |
||
|
|
a387643946 |
feat(brand): new logo in the README, Registry icon and browser tabs (#632) (#633)
The README opens with the PromptManager banner, the Comfy Registry icon is the new app icon from this repository, and every page Prompt Manager serves links a 32 px favicon and a 128 px touch icon. Only small files are added: the two page icons (12 KB) ship in the Registry package, the banner is a 26 KB WebP and the Registry icon a 43 KB PNG. |
||
|
|
1a177e39a2 |
fix(tests): browser fixtures seed on Windows; import review spec waits for its save (#629, #631) (#630)
* fix(tests): seed browser fixtures in the host's path style (#629) The concept and history fixtures recorded their outputs with a hardcoded posix path style. On Windows the server's temp root is not an absolute POSIX path, so the root key was None, the output bundle was refused and both reset endpoints answered 500. They now use the host's style, as production does. A Python test starts the test server and seeds both fixtures, so the Windows job covers it. * fix(tests): wait for the LoRA save's answer in the import review spec (#631) The spec clicked Save preferences and gave the saved status five seconds. The save commits config.json durably, and on a busy CI disk that write alone took 6.4 s, so the status still read Unsaved changes. It now waits for the /lora/enable response first, as TESTING.md asks of disk-bound steps. Under a 20 IOPS write throttle the commit takes 10.4 s: 3 of 12 runs failed before, 12 of 12 pass now. |
||
|
|
faac2d6f52 |
ci(deps): stop Dependabot raising pip version floors (#625) (#626)
A custom node's requirements install into ComfyUI's shared environment, so raising a floor force-upgrades the package for every other custom node there. Our >= floors already allow each new release, so leave them alone and only widen a requirement that excludes it. |
||
|
|
2bf3e5202d |
deps(pip)(deps-dev): update coverage requirement (#624)
Updates the requirements on [coverage](https://github.com/coveragepy/coveragepy) to permit the latest version. - [Release notes](https://github.com/coveragepy/coveragepy/releases) - [Changelog](https://github.com/coveragepy/coveragepy/blob/main/CHANGES.rst) - [Commits](https://github.com/coveragepy/coveragepy/compare/7.17.0...7.17.2) --- updated-dependencies: - dependency-name: coverage dependency-version: 7.17.2 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
71b55bc630 |
chore: release 3.6.0 (#622)
Adds Recently used, Most used and Name Z-A sorting to the Prompt library and fixes network-share readers, model unload and bad save requests (#620). Adds an OS classifier.v3.6.0 |
||
|
|
4c9cb7f5ea |
Cleanup: dead code, small fixes, Library sorts, old-UI links (#620) (#621)
* refactor: remove dead and test-only code and the write-only prompt registry (#620) Removes helpers nothing calls, test-only wrappers and their tests, the unused config writer, three unused images, and the prompt registry the nodes wrote to but nothing read, which grew with every run. * fix: network-share readers, model unload off the loop, bad save requests (#620) Every read-only SQLite open now uses one URI helper, so a library on a Windows network share works in backups, restores, moves and history reads. Unloading a model no longer blocks the server. A malformed /save body gets a 400, not a 500. * feat(library): add Recently used, Most used and Name Z-A sorting (#620) The old Dashboard's sorts the community asked for, on the Prompt library, in saved views, and with paging through the whole list. * feat(workspace): stop linking the old pages (#620) They show a removal notice since 3.5.1. System no longer links them, the load failure offers a reload and ComfyUI instead, and the README says they are going away. The pages still work at their URLs. |
||
|
|
56d1072e58 |
chore: release 3.5.1 (#617)
Ships the smaller Registry package and the notice that the old pages will be removed in a future release (#615).v3.5.1 |
||
|
|
e71d0ca6b6 |
Smaller Registry package and old-UI removal notice (#615) (#616)
* chore(package): leave development files out of the Registry package (#615) The package held tests, tools, docs and images used only on GitHub. A .comfyignore drops them, taking the download from 17.4 MB to about 3.9 MB, and a test holds the rules to what ComfyUI needs at run time. * feat(legacy): say the old pages will be removed in a future release (#615) Each old page shows a notice with a link to where its job lives in the workspace. The pages keep working. |
||
|
|
6f442bf423 |
chore(deps-dev): flake8 7.5.0, pre-commit 4.7.0, coverage 7.17.0 (#614)
* chore(deps-dev): bump flake8 to 7.5.0 (#598) * chore(deps-dev): update pre-commit to >=4.7.0 (#601) * chore(deps-dev): update coverage to >=7.17.0 (#602) |
||
|
|
bf2fa3f50e |
chore: release 3.5.0 (#608)
Adds the thumbnail location and move (#320), Send to All (#542), skipped tags and saved instructions (#431), the Pair category repair (#550) and lower image memory use (#523). Raises the Pillow minimum to 10.1.0 (#604).v3.5.0 |
||
|
|
2e9322d5c4 |
fix(thumbnails): never let an older folder check overwrite a newer answer (#611) (#612)
Two refresh() callers could publish out of order. A check that looked before the folder was removed could set "available" after a newer check said "missing", and the state stayed wrong until the next probe. Each check now has an order number, and an older answer is dropped. |
||
|
|
a1377cec36 |
ci: pin the Playwright image by digest (#609) (#610)
The v1.64.1-noble tag was re-pushed with Node 26, which fails the Node 24 guard in every browser job. Pin the last green image's digest so the browsers, fonts and Node only change through a reviewed bump. |
||
|
|
fa98d0644d |
Match ComfyUI's dependency floors (#604) and fix the stalled store test race (#603) (#606)
* chore(deps): match ComfyUI's Pillow, aiohttp and numpy floors (#604) PromptManager never fights ComfyUI on versions: the floors follow its requirements.txt and Dependabot no longer raises them. The full suite passes on Pillow 10.1.0 and aiohttp 3.11.8; numpy was tested at 1.26.4, the first with Python 3.12 wheels. A test that left response bodies unread hung the aiohttp client before 3.11.11, so it reads them now. * test(thumbnails): the stalled store call test runs without the probe (#603) note_failure() wakes the probe, which finds the healthy test folder again at once, so the next lookup could do store I/O and the test failed intermittently. |
||
|
|
043403d09e |
feat(thumbnails): choose where thumbnails are kept and move them (#320) (#592)
* refactor(thumbnails): one resolver for where previews live on disk (#320) Add py/api/preview_store.py: the store of a source, a preview's path, URL parts to disk, containment (owns), a write generation and the lock around every preview's final rename. Every preview reader, writer and remover now asks it instead of joining <source>/thumbnails by hand: serve, on-demand, capture (its path resolved when the write starts), the after-scan queue, the thumbnail plans and job payloads, clear, the temp sweep, History covers, the auto-tag listing and the owned-preview lookups. Source mode only: every path is the one built before, so nothing changes on disk or on the wire. A structural test keeps new thumbnails joins out of the backend. * refactor(thumbnails): keep the after-scan queue's store rule and pin the write lock (#320) A planned target keeps the plan's own containment rule (inside the store, as the thumbnail job writes it); captures keep the serve rule. The structural test also covers PREVIEW_FOLDER joins and the repo-root modules; the write-lock test asserts the lock instead of waiting on a timer; new tests cover nested roots in the after-scan queue and a legacy upper-case preview served through the resolver. * feat(thumbnails): keep previews in one folder, set from config.json (#320) thumbnails.location in config.json can now name one folder for every source's previews: <folder>/<source key>/<rel>_thumb<ext>. A source key is a readable slug plus a short hash of the source's identity, stored in the folder's marker (.promptmanager-thumbnails.json) with the install that made it. Serving, on-demand and capture writes, listings, clear, delete, duplicates, the temp sweep and History covers all follow it; a leftover in <source>/thumbnails is never served and other text under thumbnails/ is refused. A missing, unplugged or foreign folder is unavailable (a probe checks it every 5 s within 2 s; a stalled or failing store call flips it at once): originals are served, nothing is written anywhere, the folder is never re-created, and generate, convert and clear answer 409 location-unavailable. A bad config value is unavailable too, never a fall-back to the sources. No UI yet: POST /settings refuses thumbnail_location (409 location-needs-move); GET /settings reports it with its path, the thumbnail status without one. Sources inside or around the folder and a library move into it are refused. * fix(thumbnails): never follow a marker or a link out of the thumbnail folder (#320) Marker keys are data, not paths: only a single <slug>-<hex> folder name is ever joined onto the thumbnail folder; anything else is dropped and logged. Every preview write and delete passes one ownership check (below a key folder, lexically and resolved, no link, junction or reparse point on the way); make_parent refuses anything else and writes nothing while the folder lacks this install's marker (an unmounted mount point). Clear never descends into a junction. The configured location is in force before any request (unchecked folder mode is unavailable), and a startup check that fails leaves it invalid, never the sources. Older listings that run on the event loop no longer touch the store in folder mode. A leftover under another case of thumbnails/ on a case-insensitive disk is refused too. * test(memory): let the musl test fake os.confstr on Windows (#523) The portability run on main fails since #523: Windows has no os.confstr, so patching it without create=True raises before the test runs. * feat(thumbnails): move thumbnails between the sources and one folder (#320) POST /images/thumbnails/plan reviews a move (what is copied, removed and left, free space, too-long Windows paths, sources no longer listed) and hands out a token; POST /jobs/thumbnails {mode: move} runs it as a thumbnails job: hold automatic previews, copy and check every preview on the job pool, switch with one config commit that records the old copies, then remove them. Per-file errors still switch; a folder-wide error, a cancel before the switch or a crash leaves nothing changed (a journal is undone at the next start); old copies that could not go are removed by a finishing job at the next start. Leaving a folder removes the previews of this install's sources that are no longer listed (Q320-8). Recreate folder and Use this folder answer an unavailable folder; the Thumbnail maintenance scope prune removes the thumbnails of removed sources. * feat(system): choose where thumbnails are kept and move them (#320) System › Sources & scans gains the Thumbnail location row (D196): Inside each source or One folder, the folder path, the status line and Review move…, whose review (D197) lists what is copied, removed and left before Move thumbnails starts; a refused folder is explained under the field, a folder of your own asks for a confirmation first. Activity shows a move and a prune with their own tiles and step line (D198). An unavailable folder shows a notice on Overview and Sources & scans with Recreate folder or Use this folder (D199). Thumbnail maintenance offers Remove thumbnails of removed sources in folder mode (D200), and Move library's review says where the thumbnails stay (D201). Closes #320 * fix(thumbnails): keep a move's own previews and never walk out of a store (#320) A cleanup that waited from an earlier move never names a key folder the new move just filled, so moving back keeps the previews. Removing empty folders walks top-down and never into a link or junction. Any error while copying undoes the copies; once the switch is committed, a journal that cannot be removed no longer undoes it. Hand-edited cleanup entries and marker keys never name a folder outside the stores; removal stops at interpreter exit. The path field carries aria-invalid with its reason, and a review that went stale reviews again. * test(thumbnails): cover the prune scope, the Overview notice and the space refusal (#320) The frontend coverage gate counted the new branches of thumbnail maintenance, the Activity views, the notices' Change location and the api-client's space refusal as uncovered; page and unit tests now drive them. * fix(thumbnails): report removals that fail and explain the quiet excepts (#320) An old thumbnail the finishing move cannot remove (held open on Windows) is now an error row of the job with its path, and logged; a failed copy's temp that cannot go is logged with its path. Every except that only passes says why, and the thread runners say their caller re-raises. * fix(thumbnails): never plan or delete through a linked key folder (#320) Review finding P1 on #591: in folder mode a source key folder that is a link or junction to a folder outside was still handed to the planner, so Convert outdated could remove an older-format file outside the thumbnail folder. ensure_store now refuses a linked store before any planning, and each removal of an old preview passes may_write at the moment it runs. * fix(thumbnails): the temp sweep never walks into a link (#320) Review finding P2 on #591: Clear thumbnails and the startup sweep removed crashed-write temps with a plain os.walk, which on Windows walks into a junction even without followlinks. The sweeper now skips a folder that is a link, junction or reparse point (the top one too), and each temp passes may_write before it is removed. * fix(thumbnails): lock the folder marker across processes (#320) Review finding P2 on #591: two installs sharing one thumbnail folder could each read the marker, add a key and replace it, so the last writer dropped the other's key. write_marker now re-reads, changes and replaces the marker under a lock file made with O_CREAT | O_EXCL beside it (atomic on shares, unlike flock); a lock older than 30 s, left by a writer that died, is taken over, and a wait past 1.5 s fails as a TimeoutError like an unreachable folder. Tested with three processes adding keys at once. * test(thumbnails): cover the space refusal, Overview's Use this folder and the prune review (#320) The frontend coverage floors of activity-kinds, system-overview and thumbnail-review: a disk without the space shows the review but cannot move (a fixture route fakes the free space), Use this folder on Overview reloads the host values, the prune review's text and rows are pure functions with unit tests, and Overview takes the System drafts it is always mounted with. * fix(thumbnails): never copy through a linked folder; refuse a target inside the folder in use (#320) Moving back to Inside each source followed an existing linked folder in the destination and could replace a file outside the source (Codex P1). A target nested inside the thumbnail folder in use was accepted, and the old-copy cleanup then removed the previews just copied there (Codex P2). Every copy now checks the whole destination chain for links, also when the folders exist, and the move refuses a folder inside the one in use with location-inside-current. The cancelled branches no longer mix explicit and implicit returns (code-quality note). * fix(system): one full stop in the move-back review (#320) * fix(thumbnails): a folder check answers for the folder as it is now (#320) Probe.check() joined a check already running, or a finished one nobody had collected. A folder deleted right after configure() woke the probe therefore stayed available until the next probe, which failed the Overview notice spec in the merge queue. It now waits for a running check and starts a new one, still never two at once, and a stuck check still times out. The spec also asserts the fixture's removal took effect. |
||
|
|
7e11d9cae2 |
Protected rows (#586), review-bot fixes (#593) and LoRA cancel tests (#575) (#597)
* test(lora): hold the import job to test cancel before and after the commit (#575) Squashed from PR #594. Closes #575. * fix: address review-bot findings on merged PRs (#593) Squashed from PR #595. Closes #593. * fix(maintenance): list every protected item with its reason (#586) Squashed from PR #596. Closes #586. |
||
|
|
3295ff8b20 |
Pair category repair (#550) and saved instructions + dialog picker (#431) (#590)
* feat(maintenance): repair old Pair prompts' empty category and tags (#550) Squashed from PR #579. Closes #550. * feat(tagging): saved instructions with a default per engine (#431) Squashed from PR #587. * feat(tagging): pick saved instructions in the tagging dialogs (#431) Squashed from PR #588. Closes #431. |
||
|
|
9640ca86f8 |
feat(tagging): skipped tags hide matching suggestions (#431) (#585)
* feat(tagging): skipped tags hide matching suggestions (#431) A Skipped tags list in System > Auto-tagging (D202) hides every suggested tag whose words contain an entry's words, on every suggestion path (Tag image, Auto-tag selected, the System batch, the legacy single and batch routes), before the limit. Jobs snapshot the list at their start. A read-only preview route counts what a list hides among the library's tags and the downloaded WD14 label lists. The draft store compares list and object drafts by value (sameDraft). * test(tagging): count the Skipped tags block as one concept difference (#431) * fix(tagging): skip a damaged WD14 label list in the preview (#431) * test(tagging): classify the Skipped tags preview route as reading no media (#431) |
||
|
|
8a81114dfc |
perf(images): run image work on two own pools and trim after jobs (#523) (#582)
* perf(images): read PNG text without decoding pixels (#523) Pillow's PngImageFile.text loads every pixel to reach text chunks written after IDAT. The scan's metadata batch and the image monitor now read PNG text through utils/png_text.py, which runs Pillow's own chunk handlers after the first IDAT and seeks over the pixel data. The legacy .text read is the floor: a differential test compares both readers on every fixture image, a curated corpus and a seeded fuzz. The only difference is a file whose pixel data is undecodable or cut short: it now keeps the text read before its pixels instead of reading nothing. Animated PNGs still use .text. * test(images): cover the text budget, XMP and layout guard of the PNG text walk (#523) * perf(images): run image work on two own pools and trim after jobs (#523) Image work no longer spreads over the default executor's threads, where glibc kept an image-sized malloc arena per thread. - Interactive image work (view previews behind their gate, workspace card facts, both inspector routes) runs on the API's fixed pm-image pool of 3 threads; the on-demand preview pool is merged into it. - map_parallel (scan metadata, thumbnail and convert jobs, the legacy gallery generation, capture previews) shares one long-lived pm-worker pool of Worker threads, reused between jobs. The package teardown stops it within its bound (part "workers"). - After a scan, thumbnail or convert job, glibc's malloc_trim(0) returns free pages once; a no-op on Windows, macOS and musl. - tools/perf/memory_drive.py measures RSS, heap, threads and arenas under the #523 load on the disposable browser test server (manual only). * fix(images): start no image thread after the teardown; join retired job pools (#523) |
||
|
|
7a2a04b752 |
feat(send): send a prompt to all eligible nodes of a window (#542) (#578)
* feat(send): send a prompt to all eligible nodes of a window (#542) The Destination node select offers "All N eligible nodes" when a window has two or more nodes that can receive the prompt. It is never selected for you. Apply previews every node first and writes nothing if one refuses; then it sends one node after another in node id order, each later node with a fresh ticket checked against the reviewed text, and reports "Sent to X of N" naming each refusal. A lost reply stops the run and names the node whose outcome is unknown. Recorded as D191. * fix(send): refresh held tickets and compare the reviewed composition for All (#542) A review held longer than the host's 30 s ticket lifetime would have refused the first node while sending the rest. Every node now takes a fresh ticket except the first of a pass taken in the same click, and that ticket must show the reviewed Before texts and composition. The revision is checked until something has been posted. Node review sections are labelled by their h4 heading. |
||
|
|
cb94b12c1b |
fix(system): keep a restore review's upload form alive until it is answered (#583) (#584)
* fix(system): keep a restore review's upload form alive until it is answered (#583) WebKit can read a FormData's file part after fetch() returned, and with a request interceptor armed it does. uploadRestore held its FormData only in a local that was dead after the call, so a garbage collection in between dropped the form and the server got an empty file ("Uploaded file is empty"); the Restore preview never opened. The page now holds each upload's form until the upload is answered. * docs(system): say what the #583 regression spec proves in each browser (#583) |
||
|
|
3cb90b0c1e |
perf(images): read PNG text without decoding pixels (#523) (#577)
* perf(images): read PNG text without decoding pixels (#523) Pillow's PngImageFile.text loads every pixel to reach text chunks written after IDAT. The scan's metadata batch and the image monitor now read PNG text through utils/png_text.py, which runs Pillow's own chunk handlers after the first IDAT and seeks over the pixel data. The legacy .text read is the floor: a differential test compares both readers on every fixture image, a curated corpus and a seeded fuzz. The only difference is a file whose pixel data is undecodable or cut short: it now keeps the text read before its pixels instead of reading nothing. Animated PNGs still use .text. * test(images): cover the text budget, XMP and layout guard of the PNG text walk (#523) |
||
|
|
9a43b67008 |
test: reset a disposed fixture package's exit actions (#580) (#581)
load_package imports the package under a test-only name; its exit actions stayed registered after cleanup_package removed it from sys.modules, so the suite ended with a ModuleNotFoundError from _kill_encoders_at_exit. cleanup_package now resets the package's exit signal. |
||
|
|
c3c75c3369 |
fix(monitor): never store PromptSearchList search text as a prompt (#548) (#576)
A PromptSearchList wired straight into CLIPTextEncode left the legacy-parser
fallback tracing the positive to the node's search query ("fox"). Both the
output scan and the live monitor stored that query as a prompt and linked
every image of the batch to it.
The fallback now leaves such files unlinked (the usual unresolved outcome)
when its answer is the search text of a PromptSearchList upstream of a
sampler's positive. An empty search text, and a search feeding only the
negative, keep their previous outcome. The parity gate states f22 as a
deliberate departure from the #170 parser, and the README says to wire the
Search List through Prompt Manager Text to get the images linked.
|
||
|
|
93bf24f47d |
fix(monitor): keep watchdog threads from holding the exit (#561) (#569)
* fix(monitor): keep watchdog threads from holding the exit (#561) watchdog 7.0.0 on Windows starts a plain threading.Thread per watch for its ReadDirectoryChangesW reader (DirectoryChangeReader.start). Created from ComfyUI's main thread it is not a daemon, and the interpreter joins every non-daemon thread before it runs any atexit callback, so the package teardown that would stop the observer never ran and the process never exited. Start the observer from a short-lived daemon thread, so every thread it creates inherits the daemon flag. Run observer.stop(), which joins the emitters without a limit, on a daemon thread and wait for it only until the stop deadline; a later stop waits for the same call. Lift the watchdog<7 cap. Closes #561 * test(exit): exempt watchdog 7's process-wide inotify reader (#561) watchdog 7 on Linux reads every inotify watch through one InotifyFD daemon thread per process that no observer stop ends, by design. The exit and package tests counted every watchdog BaseThread as the package's, so the singleton failed them once the cap was lifted. Exclude it, and require instead that no non-daemon thread is left at exit. |
||
|
|
e29c23de8d |
chore(init): print a one-line startup banner (#574)
Replace the version line, one Loaded line per node and the total with "[ComfyUI-PromptManager] Version: <v> - <n> tools loaded". Closes #573 |
||
|
|
b82e68a9d0 |
ci: stop testing macOS in CI (#572)
macOS is not a popular ComfyUI platform. Drop the macOS legs from the portability workflow and its native-trash proof; Windows keeps its Python 3.12-3.14 legs. The macOS code stays, and README calls its support best-effort. Closes #571 |