Skip to content

Remove the merged configuration - #2700

Open
kmcginnes wants to merge 7 commits into
mainfrom
remove-merge-configuration
Open

kmcginnes wants to merge 7 commits into
mainfrom
remove-merge-configuration

Conversation

@kmcginnes

Copy link
Copy Markdown
Collaborator

Summary

Every page that only wanted the active connection's name still read it through useConfiguration(), which rebuilt and re-sorted every schema type (about 10k on a large schema) whenever the schema or the saved connection changed.

User-facing: The Exported Connection File is smaller. Each node and edge type now carries only its schema fields, without the app's default style values. Nothing else changes.

Each reader now goes to the state it needs:

-mergedConfigurationSelector (schema laid over defaults + saved connection)
-  useConfiguration()           → page subtitles, ExportGraphButton, UserPrefixes,
-                                  SchemaDiscoveryBoundary, useSchemaSync, Connections
-  allVertex/EdgeTypeConfigsSelector → vertex/edgeTypeConfigSelector(type)
-  vertexTypesSelector / edgeTypesSelector → EntitiesFilter
+useActiveSavedConnection()     → page subtitles, ExportGraphButton, UserPrefixes,
+                                  SchemaDiscoveryBoundary, useSchemaSync, Connections
+vertex/edgeTypeConfigSelector(type) → reads activeSchemaAtom per type, defaults applied
+EntitiesFilter                 → reads activeSchemaAtom in one pass
+Export Connection click        → prepareConnectionForExport(savedConnection, schema)
  • mergeConfiguration, mergedConfigurationSelector, useConfiguration, MergedConfiguration, ConfigurationContextProps, and the unused array-keyed useVertexTypeConfigs / useEdgeTypeConfigs families are gone.
  • ConnectionDetail and CreateConnection take a SavedConnection. Edit mode applies the connection defaults itself, so saving an unchanged stored connection still keeps its schema.
  • A type's config keeps its identity when the saved connection or a user style changes.
  • GLOSSARY.md and the user-preferences ADR no longer describe a merge.

Evidence

Before: renaming a connection or switching to it rebuilt every schema type, and the exported file repeated the default color, shape, and icon fields on every type.

After: new tests pin the behavior that moved:

  • the Connections page export, as an inline snapshot
  • SPARQL-only prefixes
  • the "Connection: none" subtitle
  • per-type defaults and display label removal
  • edit mode with a stored URL that has a trailing slash
  • config identity across style and connection changes

A new golden fixture, connection-file-export-golden-schema-types.txt, pins the new export shape, and the existing fixtures still import.

Verified live: agent-tested in Chrome and Safari against a local dev server.

  • Imported old-shape Gremlin and SPARQL connection files, then exported them. The output is sorted, with no display labels or style fields, and has prefixes only for SPARQL.
  • Exporting a 10k-type connection took about 13 ms.
  • Toggling a filter over 10k node types took about 28 ms.
  • A file exported from this branch passes the import check of every release from v1.0.0 to v3.3.2.

Merge Danger

Door: two-way

Impact: export-format

Files exported before and after this change import in this build and in every release back to v1.0.0. Older builds apply their own defaults to a type without style fields, so a re-imported file looks the same.

Upgrade Notes

  • Exported connection files no longer include default style fields. A file you export now lists each node and edge type with only its schema fields (type, attributes, counts). Your custom styles travel in the styling file, not the connection file, and every release fills in the default styles when it reads a type, so importing the file, here or in an earlier release, looks the same as before. Files exported by earlier releases still import.

Related


🤖 Written by an AI agent on my behalf.

Layer: 1-remove-merge-configuration
Layer: 1-remove-merge-configuration
Layer: 1-remove-merge-configuration
Layer: 1-remove-merge-configuration

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove mergedConfigurationSelector and legacy schema-style coupling

1 participant