Skip to content

Show changes to the open file as they happen, marked - #90

Merged
raj-khan merged 1 commit into
mainfrom
fl-87-live
Sep 27, 2026
Merged

raj-khan merged 1 commit into
mainfrom
fl-87-live

Conversation

@raj-khan

Copy link
Copy Markdown
Owner

FL-87. Watch the agent draw.

  • The file store remembers what the open file held (canonical .flow) and its lastModified, on open, launch and save.
  • useWatchFile polls the handle every second (a browser cannot be told when a file changes), paused while the tab is hidden or a choice is pending. A newer file whose diagram differs from what was last saved is a change; the app's own saves compare equal and are ignored.
    • Nothing unsaved here: the file's version replaces the diagram as one undoable change ("Reload from disk"), and the canvas marks added, changed and moved shapes and added or changed connections in the diff colours for four seconds.
    • Unsaved edits here: a dialog asks which to keep. Keep mine leaves the file alone until Save and asks again at the next outside change; Use the file's version replaces (undoable).
    • A file that does not parse is refused with its line; the diagram stays.
  • README: how to watch an agent work through MCP.

Tests: e2e/live.spec.js (4), with a stand-in file handle whose contents the test changes. e2e 144, vitest 300, lint and typecheck.

A change on disk, such as an agent writing through MCP, replaces the
diagram as one undoable change with what changed glowing; unsaved edits
here ask which version to keep.
@raj-khan
raj-khan merged commit 720a78b into main Sep 27, 2026
4 checks passed
@raj-khan
raj-khan deleted the fl-87-live branch September 27, 2026 14:24
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