Skip to content

0.4.0: grafli diagnose + live-reload, minimap, launch fixes#40

Open
MisterGC wants to merge 17 commits into
mainfrom
release/0.4.0
Open

0.4.0: grafli diagnose + live-reload, minimap, launch fixes#40
MisterGC wants to merge 17 commits into
mainfrom
release/0.4.0

Conversation

@MisterGC
Copy link
Copy Markdown
Owner

First batch of changes targeting 0.4.0: a new grafli diagnose static-layout checker plus a few unrelated reliability fixes uncovered while testing it.

  • Diagnose: new grafli diagnose <file> subcommand with checks for child-outside-parent, sibling overlap (incl. notes via real Qt font metrics), cramped containers, label-truncated heuristic, and missing @path / image refs. Human-readable output by default, --json for agents. SKILL.md gains a step 10 with "one fix-pass, then stop" guidance so agents don't loop on heuristic findings.
  • Live-reload fix: external edits to box positions were silently discarded by an unconditional override in _on_file_changed. Replaced with a 3-way merge — in-app drags survive only when the disk position itself didn't change.
  • Minimap fix: parents declared after their children (typical .grafli style) painted on top of the children, hiding them. Now ordered by parent-chain depth.
  • Launch fix: pin the window to the primary screen on launch so a sleeping/disconnected external display can't swallow it via macOS's cached window frame.
  • Showcase tweaks: small positioning adjustments; discussion/code notes pick up ~width=N.

Test plan

  • Full suite passes (317 tests, +30 in this PR)
  • grafli diagnose examples/showcase.grafli runs cleanly
  • Edit a .grafli externally with grafli open → box positions update live
  • Open a diagram with nested parents → minimap shows all boxes
  • Launch with external display asleep → window appears on built-in

MisterGC added 17 commits May 10, 2026 22:01
External edits (e.g. AI-driven Write/Edit on a .grafli file) were
silently discarded for box positions because _on_file_changed
unconditionally restored the in-memory positions over the new disk
ones. Notes/images/arrows worked fine — only boxes had this override,
intended to preserve in-app drags. Now we 3-way merge: in-memory
position survives only when the disk position itself didn't change.
…to-keep-gra

Quantize coordinates on save (#20)
Skill: install/check/uninstall subcommands (#37)
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.

1 participant