feat(orchestrator): resources view with legend chips and a server-side view store (007)

The Resources tab draws one hardware chart and one tokens chart with an accumulated switch, plus a combined overlay of hardware, tokens and the burnup, every series switched by a legend chip and all shown by default. The hub keeps every toggle in a validated view store: PATCH /api/view takes a set and the expected old values and answers 409 on a stale expectation, update() re-runs a change on the stored value, list paths change only through update(), and a page shown again from the back-forward cache fetches the stored view anew.

🎯 Fix: 93 %
💥 Break: 4 %
💸 Cost: 100 %
⏱️ Time: 100 %
🛡️ Security: 100 %
🏆 Score: 89
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-13 12:40:25 +00:00
1 parent 3418738993
commit c128fa4000
15 files changed
+1794 -102

No files matched your search

+1 -1
View File
@@ -210,5 +210,5 @@ class View:
def render(self, nonce: str) -> tuple[str, str]:
now = time.time()
state = self.state(now - RADIO_WINDOW, now, now, 0)
page = self.templates.get_template("index.html.j2").render(nonce=nonce, state=state, icons=self.icons)
page = self.templates.get_template("index.html.j2").render(nonce=nonce, state=state, view=self.view_store.get(), icons=self.icons)
return page, INDEX_CSP.format(nonce, " ".join(["'self'", *state["media"]]))