Grow a node with its ports, stop it flickering, draw what it reaches out to
- A node's height follows the ports on its busiest side. It is a function of the document, so `layoutGraph` reserves exactly what is drawn and nothing measured is fed back into the layout. - The three status controls now sit in slots that are there whether the control is or not. A node running many times a second mounted and unmounted the stop button on every execution, resizing the card each time. - A port bound to another flow's message is drawn as a label, naming the node at the far end and its type. Only the opposite direction was answered before. The scan behind both is now cached on the store's commit counter rather than reading every flow per request. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ZeGnqVsf5VHQqvz4HdUhN
This commit is contained in:
@@ -103,6 +103,12 @@ class FlowStore:
|
||||
# Draft writes are check-and-set, so two clients saving at once must not
|
||||
# interleave between reading the current version and writing the next.
|
||||
self._write_lock = threading.Lock()
|
||||
#: Bumped on every commit, so something derived from every flow at once
|
||||
#: can tell whether it is still current without reading them all again.
|
||||
#: In memory rather than `head()`, which is a git subprocess per call —
|
||||
#: it therefore counts from zero per process and misses an edit made on
|
||||
#: disk behind the API, which no writer here does.
|
||||
self.revision = 0
|
||||
if not (self.root / ".git").exists():
|
||||
self._git("init", "-q")
|
||||
self._commit("Initialise flow store", allow_empty=True)
|
||||
@@ -135,6 +141,10 @@ class FlowStore:
|
||||
)
|
||||
|
||||
def _commit(self, message: str, allow_empty: bool = False) -> None:
|
||||
# Before the commit rather than after it: what a reader has to notice
|
||||
# is that the files changed, which is already true whether or not git
|
||||
# is there to record it.
|
||||
self.revision += 1
|
||||
self._git("add", "-A")
|
||||
result = self._git(
|
||||
"-c",
|
||||
|
||||
Reference in New Issue
Block a user