main
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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. |
||
|
|
4f37af209c |
feat(collections): store collections and add their routes and Images filter (#331, PR 1) (#400)
* feat(collections): store collections in the library database * feat(collections): add, remove and rename collections and keep members through duplicate cleanup * feat(collections): add collection routes and the Images collection filter * feat(images): store images' own categories in the library database (#332) One new table, image_categories, and its category index, created empty by a forward-only migration that reads and writes only its own objects. Startup checks the structure; restore also checks the values. The store sets, clears and reads own categories by file key (the deepest output source holding the file and the path below it), and copies a removed duplicate's category to a kept copy that has none. * feat(images): duplicate cleanup keeps images' own categories (#332) The kept copy's own category wins; a kept copy without one receives the removed copy's, keyed by the deepest output source holding each file. The removed copy's row is never deleted, so a give-back or a failed delete loses nothing. The job log reports how many were kept. * feat(images): set, remove and list images' own categories (#332) PUT /prompt_manager/images/category sets the own category of up to 500 listed files, DELETE removes it (listed or not), and GET /prompt_manager/images/categories lists the values whose file is listed. Targets are the Images listing identity of an output source, checked by media_target (shared with Collections). The routes never touch prompts, recipes or links; POST /prompt_manager/bulk/category is unchanged. * fix(images): key symlinked output folders and keep key work off the event loop (#332) Review fixes: a source matches by its configured spelling too, so a detected output folder that is a symlink keys its files (routes and duplicate cleanup). File keys are computed in the executor. A path no source holds is a plain 403, a lone surrogate a 400. The install repairs a table that lacks its category index instead of refusing to open. * fix(collections): address review findings * feat(images): set or remove a category on all N matching images (#332) The category routes also accept the Images listing filter of "Select all N matching" (#392) instead of explicit items, resolved now and capped at 500 images like an explicit selection. * test(vendor): count the #332 host case in the execution matrix image-attribution.spec.mjs gains the image category route case, so the execution config lists 92 tests (3 attribution cases per project). * test(browser): install the slideshow clock before wrapping setTimeout The slideshow fixture wrapped window.setTimeout before page.clock.install(), so the viewer's timer ran on real time and clock.runFor() did not drive it; a late WebKit timer failed 'slideshow exposes exact state labels' on CI. * test(legacy): record the image category routes in the legacy contract snapshot (#332) #332 adds PUT/DELETE /prompt_manager/images/category and GET /prompt_manager/images/categories; the legacy pages' routes are unchanged. * test(duplicates): a removed copy with a collection and a category moves both (#331, #332) |