phase 12: optional dataset-specification checkbox + CI fixes#645
Merged
Conversation
…n and ModelConfiguration - dataset-specification.ts: add Optional checkbox in edit form, 'optional' badge in read row - model-configuration.ts: explicit isOptional mapping in hasInput PUT path, informational note in Files section - custom-apis/model-configuration.ts: override get() to restore isOptional from raw API response (bypasses DatasetSpecificationFromJSON stripping)
- model-configuration-setup.ts: explicit isOptional mapping in hasInput PUT path, informational notes in Files section, setResourcesAsCopy at line 285 preserves isOptional via _loadedResources spread - custom-apis/model-configuration-setup.ts: override get() to restore isOptional from raw API response
…iden push trigger to '**'
The auto-generated @mintproject/modelcatalog_client v1.8.0 client strips isOptional from DatasetSpecification request bodies because the field is not in the v1.8.0 OpenAPI schema used to generate it. Monkey-patch DatasetSpecificationToJSON / FromJSON / FromJSONTyped on the SDK's models index module so internal API call sites pass the field through. This also covers ModelConfiguration / ModelConfigurationSetup PUTs because their ToJSON delegates to DatasetSpecificationToJSON for hasInput items.
…eckbox
The Optional flag lives on the configuration<->dspec junction row
(modelcatalog_configuration_input.is_optional), not on the DSpec entity.
PUT /datasetspecifications/{id} therefore cannot persist it -- the API
only updates the junction via the parent ModelConfiguration nested-write
path (junctionColumns mapping in resource-registry.ts).
Move the checkbox out of the DSpec edit dialog and into the inline input
list row in both ModelConfiguration and ModelConfigurationSetup editors.
Toggling now mutates the in-memory hasInput[].isOptional; the user clicks
Save Configuration to fire the PUT /modelconfigurations/{id} (or setup)
which carries hasInput[].isOptional, triggering the junction
delete-then-insert with the new flag.
…ation editor Base ModelCatalogResource.setResources lazy-refetches each row by id and stores the entity GET response in _loadedResources, which is what render and getResources read from. The DSpec entity GET has no isOptional (junction column on modelcatalog_configuration_input, hoisted only by the parent ModelConfiguration response mapper), so the lazy refetch wiped it from both render and save paths -- checkbox always showed unchecked even when DB had is_optional=true. Override setResources to capture inline isOptional per id into a _junctionOverlay map, override requestUpdate to merge the overlay onto _loadedResources when the entity GET resolves with isOptional undefined, and keep the overlay synced on user toggles. Same component is reused by ModelConfigurationSetup so the fix covers both editors.
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
Phase 12 work to surface and persist the
is_optionaljunction column on dataset specifications, plus CI workflow fixes that surfaced during the same plan.Feature work (12-05)
942ad36— Add isOptional checkbox + badge tomodel-configuration.ts.6ac722b— Mirror isOptional changes inmodel-configuration-setup.ts.854fa75— Move isOptional toggle from DSpec edit dialog to inline row checkbox (DSpec entity PUT cannot persist a junction column; toggle must save via the parent ModelConfiguration nested-write path).d8caed2— Patch the SDK serializer (DatasetSpecificationToJSON/FromJSON) to preserve isOptional. The current@mintproject/modelcatalog_clientbuild strips the field; long-term fix is a new SDK release.6a04cf4— Preserve isOptional across the lazy DSpec refetch inmodel-catalog-resource. BasesetResourceslazy-refetches each row by id; entity GET drops the junction column. Subclass override captures the inline isOptional and re-merges onrequestUpdateso render andgetResources(both read from_loadedResources) stay correct.c1fa149— Show optional checkbox only in edit mode; render a small grey badge in read mode (only whenisOptional=true). User feedback during dev cluster verification.CI fixes
e0547dd— Widendocker-publish.ymltrigger tobranches: '**'and tag withSAFE_BRANCH(sanitize/→-) so slashed feature branches publish images.9a4459e— Allow Trivy security scan to fail without blocking the workflow.Verification
213bc6c(response mapper hoists junction column as scalar) and migration1771200016000applied to dev Hasura.Test plan
gsd/phase-12-is-optional)mintproject/mint-ui-lit:c1fa149...published and deployed to dev clusterRelated PRs