Skip to content

Persist schema view layout selection - #2144

Open
mjuarros wants to merge 1 commit into
aws:mainfrom
mjuarros:save-layout-in-schema-explorer
Open

Persist schema view layout selection#2144
mjuarros wants to merge 1 commit into
aws:mainfrom
mjuarros:save-layout-in-schema-explorer

Conversation

@mjuarros

@mjuarros mjuarros commented Sep 2, 2026

Copy link
Copy Markdown

Description

Persist the selected Schema View layout algorithm as an application-level preference so reopening the Schema Explorer restores the user's last choice. The change also centralizes valid layout names and safely normalizes legacy or unrecognized persisted values to F_COSE.

Per-connection persistence is intentionally excluded because there is no evidence that different connections need different Schema View defaults, and introducing keyed state would add lifecycle complexity without a demonstrated requirement.

Current behavior (No layout persistence)
NotSavedSchemaLayout

New behavior (persisted layout for the session)

SaveSchemaLayout

How to read

  1. packages/graph-explorer/src/core/graphLayout.ts — canonical layout names, type, default, and runtime validation
  2. packages/graph-explorer/src/core/StateProvider/schemaViewLayoutDefaults.ts — persisted preference and backward-compatible normalization
  3. packages/graph-explorer/src/modules/SchemaGraph/schemaGraphLayout.ts — focused writable atom consumed by the Schema Graph and toolbar

Validation

  • pnpm checks
  • pnpm test (220 files, 2677 tests)
  • Formal Standards + Spec review
  • Independent Devin code review

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

@mjuarros
mjuarros marked this pull request as ready for review September 2, 2026 16:11
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.

Save layout algorithm choice in schema explorer

1 participant