Admin pages: one shared specification, builders, fragments, caps and live refresh

Adds admin_sections registry, shared admin partials, WorkspaceList, admin CLAUDE.md spec,
capped node/flag listings, and api/unit tests enforcing the spec.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 01:50:50 +01:00
co-authored by Claude Sonnet 5.5
parent 8d4d06de61
commit 1a9201cb91
93 changed files with 2396 additions and 1278 deletions
+11 -2
View File
@@ -592,14 +592,23 @@ def raise_flag(kind: str, *, device_uid: str = "", user_uid: str = "", detail: s
return table.find_one(uid=uid)
def list_flags(status: str = FLAG_OPEN) -> list[dict]:
def list_flags(status: str = FLAG_OPEN, limit: int | None = None) -> list[dict]:
window = {} if limit is None else {"_limit": limit}
return list(
get_table("node_flags").find(
status=status, deleted_at=None, order_by=["-created_at"]
status=status, deleted_at=None, order_by=["-created_at"], **window
)
)
def count_flags(status: str = FLAG_OPEN) -> int:
return get_table("node_flags").count(status=status, deleted_at=None)
def count_all_devices() -> int:
return get_table("node_devices").count(deleted_at=None)
def resolve_flag(flag_uid: str, actor_uid: str) -> bool:
return (
_execute(