Skip to content

Keep schema diagram cards from overlapping - #10

Merged
robertsolves merged 4 commits into
mainfrom
claude/project-thread-2nbi0q
Nov 3, 2026
Merged

robertsolves merged 4 commits into
mainfrom
claude/project-thread-2nbi0q

Conversation

@robertsolves

@robertsolves robertsolves commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Robert · project thread

What & why

Cards in the Schema view (View ▸ Schema) and the Linked view could end up drawn on top of each other.

  • Schema view. cascadeSeparate pushes neighbours apart when a card is expanded or dragged. It stopped after 8 passes, so in a long column every card past the 8th was left overlapping. It also never checked a pushed card against the pinned card the push started from. It now runs until everything settles, checks every pushed card against every other card, and picks the shortest push that lands on free space (or at least clear of pinned cards). That last part stops a card squeezed against a pinned one from bouncing between its neighbours.
  • Linked view. Nothing separated cards here at all. A card that widened on auto-fit, grew when its columns loaded, was resized or was dropped after a drag could cover its neighbours. The canvas now runs the same pass, with that card pinned, whenever a card appears, changes size or is dropped. On the first build it only records sizes, so a restored canvas keeps its layout.
  • The ranked layout's row gap now equals the separation margin (32 instead of 24), so expanding one card no longer nudges every untouched neighbour.

How it was tested

  • New test/schema_layout_test.dart, covering both layout modes, a 20-card push chain, 1000 random drops onto a tidy grid, and a card caught between two pinned cards. 5 of its 7 tests fail against the old schema_layout.dart.
  • Not run in the macOS app; this container has no macOS.

Checklist

  • fvm flutter analyze is clean
  • fvm flutter test passes
  • SQL safety invariants in CLAUDE.md still hold (no SQL touched)
  • No credentials, API keys or .dbscopeconn files in the diff

🤖 Generated with Claude Code

https://claude.ai/code/session_01EqzDdX3P6mdtFrhudiXLeR

cascadeSeparate (run on expand, drag and resize) stopped after 8 passes,
so a push down a long column left the 9th card onward on top of each
other, and it never checked a pushed card against the pinned card it
started from. It now runs until settled, checks every pushed card
against every other card, and prefers a push that lands on free space.

The Linked view never separated cards at all: a card that widened on
auto-fit, grew when its columns loaded, was resized or was dropped could
cover its neighbours. The canvas now runs the same pass whenever a card
appears, changes size or is dropped.

The ranked layout's row gap now matches the separation margin, so
expanding one card no longer nudges every untouched neighbour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EqzDdX3P6mdtFrhudiXLeR
@robertsolves
robertsolves changed the base branch from claude/project-thread-sroiel to main November 3, 2026 09:32
@robertsolves
robertsolves merged commit 195d46b into main Nov 3, 2026
4 checks passed
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.

2 participants