PUT /panels/ carries a version and refuses a stale one with 409

The Panels dialog re-reads the list on 409. A panels.json without a
version reads as 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-15 10:07:50 +02:00
co-authored by Claude Opus 5.5
parent 0da9a65eac
commit ccc7081b08
10 changed files with 108 additions and 10 deletions
+3
View File
@@ -96,6 +96,9 @@ class PanelsConfig(BaseModel):
"""Every panel this instance knows about."""
panels: list[PanelDef] = Field(default_factory=list)
#: Bumped on every save; a save based on an older one is refused, as a
#: dashboard's is. A file written before there was one reads as 0.
version: int = 0
#: Held across a read-modify-write of the panels file.