* 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.
9.6 KiB
Application Redesign Development Plan
The maintainer approved the interactive concept on 2026-10-17. It is a design reference with simulated operations, not production code. This plan proposes implementation order and acceptance gates.
Delivery status
- Foundation merged in #198.
- #200 delivers native Images browsing, physical-file details, infinite scroll, Grid/List/Masonry, Viewer.js and video playback. The workspace opens on Images; original application entry points remain available.
- Shared role-aware sending and the physical-file prompt inspector merged in #203 and #206.
- The native Prompt Library merged in #210 for #208: one positive parent, saved negative variants, full selected text and a shared filtered image gallery. It does not invent chronological runs from counters or scan dates.
- Durable history storage records job attempts and outcomes from #212, frozen prompt contexts from #213, and observed run-owned output locators from #214. Those locators do not verify file bytes or establish gallery-image associations. That association contract and the chronological execution timeline remain pending under #209.
- #215 brings the shell, Images and natural-height Prompt Library presentation into the approved geometry and themes while retaining their existing operations. #216 adds the shared current-file inspector with exact generation facts, scoped provenance, raw/download evidence and loaded-collection viewer controls, including a slideshow that pauses at native video. This delivery does not establish whole-application parity, change the default entry point or constitute a release. Recorded chronological run/context browsing continues under #209; image tagging/review, System consolidation and remaining organization capabilities continue under #196.
- Local Inspect (#249, PRs L1–L3) replaces the
#/inspecthandoff with the concept's native "Inspect a file" page: one local image or video previews inline and opens the shared viewer and full inspector on a record read entirely in the browser, with nothing uploaded, imported or stored. The legacy metadata page (web/metadata.html, served at/prompt_manager/gallery.html) was removed in #668, and its address now opens this page; its capabilities map to the shared inspector, including its one-click COPY ALL summary, which is the shared inspector's "Copy settings summary" (D117, LI-4). PR L3 (#286) shipped that button and local roles equal to the server's resolver (web/js/workspace/local-resolver.mjs, TESTING.md "Local roles (#249 PR L3, decision LI-1)"). Recorded deviations D60–D66 and D117 are in TESTING.md. - Collections (#331, three PRs) adds named, hand-picked groups of images, stored in the library database by file location as favorites are: a COLLECTIONS sidebar group whose rows open Images filtered to one collection (
#/collection/<id>) with rename and delete, Add to collection and Remove from collection in the Images selection bar, a Collections… checklist in the shared inspector for the side panel and the viewer, and saved views that keep a collection. Membership survives restarts, source reordering and System › Maintenance duplicate cleanup; no file is copied, moved or changed.
Scope and compatibility
Rebuild the standalone application around one shared shell. Preserve existing node schemas, saved workflows, backend capabilities, pinned Viewer.js and the ComfyAssets toolkit. Keep existing application entry points usable during the transition. Do not change the running maintainer instance during automated tests.
Use the concept's feature inventory as a parity checklist. Each row needs an implementation issue, observable acceptance criteria and automated test coverage. Record any intentional behavior change explicitly; no silent feature removal.
Proposed delivery sequence
Use a tracking issue and small issue-linked branches and PRs. Dependencies may require splitting these milestones further.
| Milestone | Deliverable and acceptance focus |
|---|---|
| 1. Foundation | Production shell, routing, shared theme and disposable page-test harness. Verify startup, navigation, dark/light changes, cleanup and existing entry points. Establish discovered-test and coverage baselines before changes. |
| 2. Image workspace | Real API-backed filters, Grid/List/Masonry, readable thumbnails, selection and shared Viewer.js inspector. Continuous infinite scroll only, with accessible Load more fallback, stable ordering, retry and restored browsing context. Bound retained DOM and test large datasets. |
| 3. Prompt library and history | Real positive/negative associations, selected full negative, run history and shared image filtering. Design any missing execution-history persistence and migration before wiring the timeline; never invent historical runs from incomplete metadata. |
| 4. Send to ComfyUI | Shared paper-plane actions wherever prompt text appears; role-specific and pair sends, destination preview, acknowledgement and failure recovery. Cover explicit empty versus unknown negatives and connected inputs. Never queue or replace a workflow. |
| 5. Editing and review | Prompt editing, vocabulary management, per-image manual/auto-tag approval and Needs review. Preserve cancellation semantics and distinguish tag approval from prompt-association decisions. |
| 6. System and maintenance | Settings, sources/scans, integrations, jobs, diagnostics, backup/restore and maintenance impact previews. Cover existing capabilities before retiring their old controls. |
| 7. Additional organization | Favorites independent of ratings, collections, saved views, Activity, scheduled backups and portable import previews. Specify persistence, validation and recovery separately for each capability. |
| 8. Cutover | Complete the parity checklist, migration and upgrade validation, accessibility/performance checks, documentation and targeted maintainer live testing. Switch the default only after these pass; preserve compatible URLs. |
TDD and test layers
For each behavior, first write and run a meaningful failing test. Implement the smallest working change, verify it passes, then refactor with the suite green. Include failing-before/passing-after evidence in the PR.
- Unit: filtering and selection state, cursor handling, prompt roles, formatting, validation, navigation and lifecycle cleanup.
- Integration: real HTTP handlers and disposable SQLite/filesystem fixtures; persistence, migration from supported old schemas, idempotent scans, restore, rollback and reference-safe deletion. Mock inference and external services.
- Smoke: shipped production pages start and navigate with real fixture APIs; test populated, empty and error states, assets and unexpected console failures.
- Browser workflows: production HTML/JS across Chromium, Firefox, WebKit and touch; editing/reload, infinite append, viewer cleanup, tagging approval, keyboard access, delayed responses, cancellation and retries.
- Host integration: pinned disposable CPU ComfyUI, Classic and Nodes 2.0, switching both ways and workflow reload for host-facing changes. Exercise independent and combined pack installations for shared bridge/toolkit changes.
Retain existing test discovery and coverage gates. Carry forward database injection and open-handle checks into new fixtures. Add new frontend modules to coverage measurement and its baseline; do not lower floors or replace existing regression coverage with mockup-only tests.
GitHub and release gates
Extend existing required workflows: the Python suite on Linux (3.12 on a pull
request, 3.12–3.14 in the merge queue; Windows 3.12–3.14 runs in portability.yml
and does not gate a merge; macOS is not tested in CI, #571); 85% Python coverage;
formatting; frontend units and per-file coverage floors; vendor checks; browser
workflows; real ComfyUI compatibility. Python 3.12 is the floor.
Publish traces, screenshots, logs and coverage artifacts on failures. See
TESTING.md for commands and fixture isolation requirements.
Every PR must map acceptance criteria to tests, report relevant checks and describe visual changes in words; never attach screenshots or other images to a PR. All required checks must pass before merging. Use maintainer live review at meaningful visual and host-integration milestones; capture discovered regressions in automated tests. Notify the maintainer when Python changes require a ComfyUI restart.
Keep version/publication changes separate from intermediate UI work: the existing
registry workflow publishes on main/master changes to pyproject.toml or manual
dispatch. Do not trigger a release merely to preview a redesign milestone.