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
+23
View File
@@ -182,3 +182,26 @@ def test_devii_tasks_shows_the_owner_24h_usage(seeded_db):
assert entry["quota"]["runs_used"] >= 1
assert entry["quota"]["runs_limit"] == 100
assert entry["quota"]["creates_used"] >= 1
def test_devii_tasks_list_is_paginated(seeded_db):
owner = _admin_uid(seeded_db)
uids = [_seed_task(owner) for _ in range(27)]
admin = _admin_dt(seeded_db)
first = admin.get(f"{BASE_URL}/admin/devii-tasks", headers=JSON_dt).json()
assert first["pagination"]["per_page"] == 25
assert first["pagination"]["total"] >= 27
assert len(first["items"]) == 25
second = admin.get(
f"{BASE_URL}/admin/devii-tasks", headers=JSON_dt, params={"page": 2}
).json()
assert second["items"]
assert not {i["uid"] for i in first["items"]} & {i["uid"] for i in second["items"]}
assert uids
def test_devii_tasks_page_is_server_rendered_with_admin_empty_classes(seeded_db):
admin = _admin_dt(seeded_db)
html = admin.get(f"{BASE_URL}/admin/devii-tasks").text
assert "empty-state" not in html
assert 'class="admin-table-wrap"' in html