Commit Graph
14 Commits
Author SHA1 Message Date
DumiFlex 710205768b feat(manager): detect server restart and prompt stale page reload 2026-06-03 03:24:26 +03:00
DumiFlex 00b0c735bb feat(api): run pending db move before migration on startup 2026-06-03 02:02:40 +03:00
DumiFlex dc839bfb99 feat(api): add GET /wp/api/database/info 2026-06-03 00:15:04 +03:00
DumiFlex 65080db689 feat(templates): add prompt template table, repository + REST API
Introduces a persisted prompt-template library: migration 012 creates the
templates table (name/description/category_id FK/tags/is_favorite/
template_string), TemplateRepository provides CRUD with partial-update
sentinel semantics, and wp_api/templates.py exposes list/get/create/update/
delete/favorite with FK violations mapped to 400. Bumps the migration-head
version assertions to 12.
2026-05-27 00:25:52 +03:00
DumiFlex 331062c0ee feat(wp_api): POST /wp/api/cascade/apply + /wp/api/cascade/undo endpoints 2026-05-24 03:06:25 +03:00
DumiFlex 909af12b0e feat(api,spa): phase d + push-to-library follow-ups
Phase D — alias removal:

- Dropped PUT /wp/api/modules/{id}/payload + library_save.py module.
  PushToLibraryModal now calls the canonical PUT /wp/api/modules/{id}
  with flattened meta fields (name, description, tags) instead of the
  nested meta sub-object the alias accepted. Lifetime ended at one
  workflow review cycle; no external consumers exist.
- Updated test_save_to_library_unified.py and test_payload_validation
  .py to point at the canonical route. Deleted test_library_save_
  endpoint.py.

Bug 3b — modal silent on description/tags:

- Workflow rows only carry meta.name + meta.library_name at insert
  time, so opening PushToLibraryModal on an existing library-tracked
  row left description/tags blank even when the library row had them.
- Added seedFromLibrary() that fetches /wp/api/modules/<id> on modal
  open and fills in any blanks. Respects in-modal edits: only writes
  to fields that are still empty when the response lands.

Bug 3c — wildcard binding override didn't surface as outer mod state:

- Combine already checked inst.variable_binding in isModified();
  wildcard didn't. Brought the wildcard branch in line so renaming
  the binding on a wildcard surfaces the same orange dot a combine
  rename does. INSTANCE_FIELDS_PER_KIND already listed binding on
  both kinds — this row brings the outer dot to match the modal's
  mod gauge.

Bug 3a — reset-icon semantics after Update existing:

- The right-click push-to-library flow updated the library entry but
  never refreshed the workflow row's meta.library_name; the per-field
  reset-to-library button then offered to revert to the pre-save
  name. Both right-click onPushSaved and the in-modal
  onPushToLibrarySaved now stamp library_name alongside name +
  payload_hash on Update mode so reset reflects the new library
  state.

Tests: 1665 SPA + 59 Python passing. Ruff + lint clean.
Bundle size: 306499 / 307200 (701 bytes headroom).
Live QA pending: needs ComfyUI restart to pick up the route removal +
Python validator paths.
2026-05-19 18:54:13 +03:00
DumiFlex a09a8e5833 feat(bundles): repository + CRUD API 2026-05-11 02:51:01 +03:00
DumiFlex dbfb7979bb feat(api): add PUT /wp/api/modules/<id>/payload for save-to-library round-trip
adds wp_api/library_save.py with a single route handler that validates the
incoming payload via the module type's registered handler, persists it through
ModuleRepository.update, and returns {"ok": true, "new_hash": "<sha256>"}.
covered by 5 new async tests in tests/wp_api/test_library_save_endpoint.py.

also fixes pre-existing ruff E501 violations in test_derivation_handler.py
and test_instance_schema_parity.py that were blocking the pre-commit hook.
2026-05-07 13:42:46 +03:00
DumiFlex 6921606570 feat(context): module picker + lock/internal + card indicators (#8)
Phase 5.5.4 (SPA library picker for ContextWidget) plus QA-driven polish.

* New ModulePickerModal with search, kind tabs, single + multi-pick, and
  compact filter UX (favorites/hide-added inline; category + tag chips
  behind popover with active-count badge).
* ModuleEditModal kind-aware body — wildcard option editor with
  enable/disable, weight overrides, mode picker (random/subset/pinned),
  sub-category multi-select.
* Lock + internal per-instance overrides ported and adapted: locked_seed
  derives a per-wildcard rng via sha256(seed:binding); internal hides
  bindings from the public PIPELINE_CONTEXT payload.
* Card indicators: modified dot (option-pool overrides), missing-from-
  library dot (polled hash check), in-card lock + internal toggles.
* RNG-faithful assembler preview via new /wp/api/preview/resolve; header
  shows "PREVIEW · 42". UNRESOLVED chips clickable to strip $var.
* Bulk collapse/expand toggle, focus toast w/ pulsing border overlay
  that tracks node bounds, friendly @name substitution in modal.
* Backend: new /wp/api/modules/import-from-workflow endpoint preserves
  uuid; engine emits per-module effective seeds via WP_Context UI
  payload for authoritative lock-toggle defaults.
2026-04-30 00:53:13 +03:00
DumiFlex 190e06aa35 fix(api): run migrations on register_routes so production db has tables 2026-04-26 20:23:42 +03:00
DumiFlex f1e3a5eb9d feat(api): spa fallback route + comfyui registration + coverage gates 2026-04-26 17:00:17 +03:00
DumiFlex e51e06f0d4 feat(api): test runner + library import/export endpoints 2026-04-26 16:53:49 +03:00
DumiFlex 27a526b5ce feat(api): snapshot + match + duplicate + favorite + categories endpoints 2026-04-26 16:47:25 +03:00
DumiFlex a97940f4f7 feat(api): /wp/api/modules crud endpoints 2026-04-26 16:40:46 +03:00