Patch release: agent transitions no longer collapse to when_no_intent_matched when a personalized agent project is imported, and free-hand edits to a personalized variant are no longer discarded when switching between the base and a variant. This is a frontend-only release — no metamodel, generator, or backend API changes; the only backend-repo change is the web-modeling-editor submodule pointer bump (frontend PR #139, thanks to Aaron).
Fixes
- Imported agent base models flattened every transition: agent transitions exist in a legacy flat shape (top-level
condition/conditionValue) and the canonical nested shape (transitionType+predefined/custom). The editor upgrades flat → nested on load, but theagentBaseModelssnapshot bundled in an imported project was written straight tolocalStoragein the flat shape, bypassing that upgrade. The backend agent processor only understands the nested shape, so on Save & Apply it defaulted every flat transition towhen_no_intent_matched. Models are now normalized to the canonical nested shape at the single storage write boundary (reusing the editor's ownAgentStateTransitionserializer), so the flat shape can no longer be persisted. A one-timev3 → v4storage migration upgrades snapshots already in users'localStorage, and the flat shape is purged from the bundled project and agent templates at rest. - Variant edits lost on base ⇄ variant switch: switching replaced the live diagram with the stored snapshot without first writing back the current canvas edits. The switch handler now persists the live model back into its source — the active variant's inline snapshot, or the stored base model — before loading the target.
- BAF generation now ships the un-personalized base: generating with "Personalization (all)" previously shipped whichever variant was active in the editor; it now injects the stored un-personalized base model. "None" mode is unchanged.
Tests
- Frontend unit tests cover the agent-model normalizer (flat → nested across each predefined condition type, idempotency, geometry preservation,
AgentStateTransitionInituntouched) and the storage normalization path (saveAgentBaseModeland thev4migration).