Skip to content

feat(erd): the diagram keeps its layout: positions, collapsed and hidden tables, detail level, viewport #1275

Closed

Description

@ZhuchkaTriplesix

Part of #1286.

Problem

Positions of the cards, collapsed and hidden tables are lost when the Diagram tab (or the app) closes. Every open starts from the computed layout, so arranging a diagram is wasted work. This is the main reason the diagram feels unfinished next to dbdiagram, where the layout is part of the document.

Scope

  • Store per connection + database + schema: card positions, collapsed tables, hidden tables, detail level, zoom and scroll offset.
  • A new LocalDb table (erd_layouts: connection_id, database, schema, JSON payload, updated_at), removed with its connection.
  • Save on drag end, collapse, hide / show and detail-level change (debounced); restore on open.
  • Tables that appeared since the layout was saved are placed by the layout engine next to their neighbours, without moving the saved ones; tables that no longer exist are dropped from the saved layout.
  • Auto layout keeps working and replaces the saved positions (one undoable step is enough: Restore saved layout until the next change).

Acceptance

  • Arrange, close the tab, reopen: same positions, collapsed / hidden tables, detail level and viewport.
  • A new table in the database is placed without moving the arranged ones.
  • Removing the connection removes its layouts.
  • Tests: save / restore round trip, new and dropped tables, migration.

Activity

  1. added
    enhancementNew feature or request
    frontendTheme parser epic label: frontend
    storageTheme parser epic label: storage
    P2Medium priority / Parity & Refactoring
    on Oct 10, 2026
  2. added 2 commits that reference this issue on Oct 10, 2026
  3. ZhuchkaTriplesix commented on Oct 11, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Done in #1287 (merged into dev).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority / Parity & RefactoringenhancementNew feature or requestfrontendTheme parser epic label: frontendstorageTheme parser epic label: storage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions