Commit Graph
9 Commits
Author SHA1 Message Date
DumiFlex c13351d21c feat(context): type-aware drift/missing + id-clash state via classifyOne
Workflow drift/missing now runs through the shared classifyOne verdict: a same-id, DIFFERENT-kind library row surfaces as a distinct 'clash' state (violet badge) instead of a misleading drift/missing dot, and Refresh is suppressed + guarded in mergeRefresh so it can never clobber an unrelated item. Hybrid content-key: the workflow path compares payload_hash (drift semantics unchanged) while the import picker keeps fingerprint; classifyOne is content-key agnostic. /wp/api/modules/hashes now returns {type, payload_hash} per id; drift-store map + AppLayout fingerprint + setLibraryHash updated to the object shape.
2026-06-06 16:39:49 +03:00
DumiFlex 885f7fb98a feat(api): modules/hashes returns type + fingerprint per id 2026-06-06 16:10:33 +03:00
DumiFlex 93e644d466 feat(repo): backfill 8-hex ids for wildcard options on create/update 2026-05-24 06:23:43 +03:00
DumiFlex 17e29a77f5 fix(context): all-kind hashes + hide pipeline from picker
Two bugs surfaced by manual QA after picker unblock:

1. Every freshly-picked non-wildcard module rendered a red "missing"
   dot on the card. Root cause: GET /wp/api/modules/hashes hard-coded
   `type="wildcard"` (5.5.5 spec §4.2 reasoned "catalog only contains
   wildcards"), so when the in-graph WP_Context now embeds a combine /
   derivation / constraint / fixed_values, the resulting payload_hash
   never appeared in the libraryHashes map. The frontend predicate
   `isMissingFromLibrary` then flagged every non-wildcard as missing.
   Fix: drop the `type=` filter so the endpoint returns hashes for
   every kind. Cost: ~50% larger payload for typical libraries; still
   sub-10 KB for the largest libraries we've seen.

2. Picker enabled pipeline kind, contradicting the user-stated scope
   that pipelines stay deferred until the modal grows a pipeline
   preview. Fix: introduce a `HIDDEN_KINDS` set + `visibleModules`
   computed that filters pipeline rows out of the picker entirely.
   Pipeline tab dropped from the kind-tab strip. The defensive guard
   in `isPickable` reads from the same set so any future programmatic
   pick path inherits the gate.

Tests:
- Updated picker test to reflect 5 visible rows (pipeline filtered)
  + asserts the "Pipelines" tab and the literal pipeline row text are
  absent from the rendered picker.
- Renamed + updated the backend hashes test to lock the new
  every-kind contract; combine row now expected in the response map.

485 vitest + pytest green.
2026-04-30 12:40:52 +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 dc3e42ec2e test(api): pin uuid + payload_hash in list/get responses 2026-04-28 13:58:30 +03:00
DumiFlex 60d2a8956d feat(api): add /modules/hashes endpoint for drift detection 2026-04-28 13:55:09 +03:00
DumiFlex e66388968f fix(api): flatten embed-bundle response to match other endpoints 2026-04-28 13:47:18 +03:00
DumiFlex db8684166f feat(api): add embed-bundle endpoint for lazy walk + transitive deps 2026-04-28 13:44:11 +03:00