Panels become devices: per-device documents in the flow repo, a Devices tab
- flow/devices.py: DeviceDef in FLOWS_DIR/_devices/<id>.json, committed under
the flow store's write lock, 409 on a stale version; nonces in DEVICES_FILE
outside git; in-memory presence announced as device_status
- api/routes/devices.py: CRUD, pairing with an optional {name, board,
firmware}, a pending list adopted without a code from the LAN only, unpair;
/panels/pair, /panels/pair/{code} and GET /panels/{id} kept as aliases,
PUT /panels/ gone
- _device_may replaces _panel_may, JWT claims unchanged
- panels.json moves into devices once at startup, then .migrated
- MCP list_devices, get_device; search category device
- Devices tab (list, detail with presence, pairing, ordered dashboards,
touch, I/O), PanelsDialog removed, serialised optimistic saves
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
01495aed25
commit
ed06bdec6b
@@ -497,7 +497,8 @@ class FlowStore:
|
||||
"""Every flow the editor knows, published or not."""
|
||||
names = {path.parent.name for path in self.root.glob("*/flow.json")}
|
||||
names |= {path.parent.name for path in self.root.glob("*/flow.draft.json")}
|
||||
return sorted(names)
|
||||
# `_devices/flow.json` is a device named "flow", not a flow.
|
||||
return sorted(name for name in names if not name.startswith("_"))
|
||||
|
||||
def exists(self, name: str) -> bool:
|
||||
return self._flow_file(name).exists() or self._draft_file(name).exists()
|
||||
|
||||
Reference in New Issue
Block a user