Remove the schema field from the stored configuration type#1823
Merged
Conversation
12504f8 to
b763385
Compare
8527f13 to
fd7daab
Compare
fd7daab to
e03128f
Compare
Slice 2 of the configuration-model simplification (epic #1839). A Connection's data has three shapes that were being conflated through one RawConfiguration type: the on-disk export file, the in-memory merged shape the UI reads, and the IndexedDB storage shape. This separates the storage shape from the in-memory merged shape. RawConfiguration (persisted / configurationAtom / IndexedDB) is now { id, displayLabel?, connection? } — no schema. The schema lives only in schemaAtom; nothing read it back off the stored config. MergedConfiguration = RawConfiguration & { schema } is the output of mergeConfiguration, with schema required since the merge always builds it; ConfigurationContextProps extends it. Tightening schema to required also drops the defensive ?.schema?. chaining across every consumer. Legacy IndexedDB blobs and exported files may still embed a schema on the config; three mutation-tested regression pins guard the storage round-trip, the import split, and the merge ignoring an embedded schema. Closes #1842
e03128f to
c77ccfe
Compare
arseny-kostenko
approved these changes
Jun 20, 2026
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.
Description
Slice 2 of the configuration-model simplification (Option B). Slice 1 (#1822) has merged, so this now targets
maindirectly.A Connection's data has three shapes that were being conflated through one
RawConfigurationtype: the on-disk export file, the in-memory merged shape the UI reads, and the IndexedDB storage shape. This slice separates the storage shape from the in-memory merged shape:RawConfiguration(persisted /configurationAtom/ IndexedDB) is now{ id, displayLabel?, connection? }— no schema. The schema lives only inschemaAtom; nothing read it back off the stored config.MergedConfiguration = RawConfiguration & { schema }is the output ofmergeConfiguration— the schema is required, since the merge always builds it.ConfigurationContextPropsextends it.Dropping the dead
schemafield from storage and tightening it to required on the merged shape also removes the defensive?.schema?.chaining that was scattered across every consumer.How to read
core/ConfigurationProvider/types.ts— the type split (start here).core/StateProvider/configuration.ts+core/ConfigurationProvider/useConfiguration.ts—mergeConfigurationreturn type and the consumers losing their optional chains.utils/saveConfigurationToFile.ts— reads schema off the merged shape;vertices/edgesdefaulting drops out.saveConfigurationToFile.test.tsgains a smallmakeConfig()factory that removes repeated fixture boilerplate.Backward compatibility
Removing a field from a persisted type. Legacy IndexedDB blobs and exported files may still embed a
schemaon the config; three regression pins guard the ends and were each mutation-tested:localDb.test.ts)useImportConnectionFile.test.tsx)configuration.test.ts)Validation
pnpm checksclean;pnpm testgreen (rebased onto currentmain).schemakey fails typecheck.Related Issues
Check List
pnpm checkspasses with no errors.pnpm testpasses with no failures.