Fix CE6084: ToggleButtonGroup design property value must be an option, not custom - #40
Merged
Merged
Conversation
…, not custom
The typed-design-properties write path mapped a design property's BSON value
type from its declared control type: ToggleButtonGroup and ColorPicker both
became "custom". That is wrong for ToggleButtonGroup — a toggle-button-group
selection picks one of a fixed option set, so Studio Pro stores it as an Option.
A Custom value type mismatches the declaration and mx check fails CE6084
("Expected design property Flex container / Column gap / … to be of type Toggle
button group, but found Custom") on any Atlas flex/spacing/typography property,
e.g. 'Column gap': 'Medium'.
This broke TestMxCheck_DoctypeScripts on 12-styling-examples,
15c-fragment-bindings-examples, and 31-pluggable-datagrid-gallery-v010-examples
(both engines) — a make test-integration failure that unit tests didn't catch.
The value type is decided by the value, not the control type. Make
resolveDesignPropertyValueType value-aware: a value that is one of the
property's declared options serializes as "option" for every control type
(Dropdown, ToggleButtonGroup, and a ColorPicker's predefined swatches);
only a ColorPicker's off-list value (a free-form hex/color) is "custom";
everything else stays "option"; no metadata falls back to "option". Reuses the
validator's themeOptionAllowed helper for consistency.
Verified: all three doctype examples pass mx check with 0 errors on both the
legacy and modelsdk engines. TestAstDesignPropToValue_Typed extended with the
'Column gap': 'Medium' regression case and ColorPicker swatch-vs-hex cases.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
ako
pushed a commit
that referenced
this pull request
Jul 29, 2026
#40) A workflow "call microflow" activity that did not map a required parameter of its target microflow passed both `mxcli check --references` and `mx check`, but Studio Pro rejects it (CE6677) and the workflow fails at the activity — the mapped and unmapped forms were indistinguishable to the checker. Added a reference-phase validator (runs under --references, where the target microflow is introspectable): for each workflow call-microflow, look up the target microflow's parameters via ListMicroflows and report any parameter not present in the activity's `with (...)` mappings. Microflows created in the same script are skipped (not yet queryable); a target not in the project is left to the missing-reference check. Wired as a new CreateWorkflowStmt case in validateWithContext. Verified end to end: an unmapped `Item` parameter is now reported; the mapped form passes; full executor suite green. Repro mdl-examples/bug-tests/265-workflow-unmapped-microflow-param.mdl. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The typed-design-properties change (#36) regressed the integration suite —
mainhas been red on Build, Test & Lint ever since (it was green through #37). Unit tests passed; the failure is inmake test-integration.TestMxCheck_DoctypeScriptsfails with CE6084 on12-styling-examples.mdl,15c-fragment-bindings-examples.mdl, and31-pluggable-datagrid-gallery-v010-examples.mdl(bothlegacyandmodelsdkengines):Root cause
resolveDesignPropertyValueTypemapped the BSON value type from the declared control type —ToggleButtonGroupandColorPickerboth becamecustom. That is wrong forToggleButtonGroup: a toggle-button-group selection picks one of a fixed option set, so Studio Pro stores it as anOption. ACustomvalue type mismatches the declaration → CE6084 on any flat Atlas flex/spacing/typography property, e.g.'Column gap': 'Medium'.The value type is decided by the value, not the control type.
Fix
Make
resolveDesignPropertyValueTypevalue-aware (reusing the validator'sthemeOptionAllowed):optionColorPicker(free-form hex/color)customoptionoptionThis restores the pre-#36 behavior for ToggleButtonGroup while preserving the intended ColorPicker improvement (a free-form color still serializes as
custom).Verification
mx checkwith 0 errors on both engines (TestMxCheck_DoctypeScripts).TestAstDesignPropToValue_Typedextended with the'Column gap': 'Medium'regression case and ColorPicker swatch-vs-hex cases.go vetclean.Notes
fix-issue.mdrecords the corrected mapping, the CE6084 diagnosis pattern (never assert a BSON$Typemapping from a control-type name — verify againstmx check), and the process lesson (runmake test-integration, not just unit tests, for page/widget-serialization changes).🤖 Generated with Claude Code
Generated by Claude Code