Skip to content

UI: stale-graph banner when SQL is edited after analysis #22

@melonamin

Description

@melonamin

Split out from #17.

Problem

After the graph is built, editing SQL silently invalidates node spans — graph↔text navigation will jump to wrong offsets.

Proposal

  • Track the parsed SQL digest alongside the graph.
  • When editor content diverges, show a non-blocking banner: "Graph is out of sync with text — re-run analysis to enable navigation."
  • Disable navigation affordances (◀, ▶, focus buttons) while stale.
  • Clear the banner when (a) content returns to the parsed digest (undo), or (b) user re-runs analysis.

Acceptance

  • Banner toggles on edit/undo.
  • Navigation buttons disabled while stale.
  • Playwright test covers edit → undo → edit → reparse cycle.

Independent of the model changes — can land in parallel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions