feat: collapsible domain groups on focus page

Domain headers are now clickable to expand/collapse their item rows,
with a chevron indicator and item count badge. State persists via
localStorage, matching the sidebar toggle pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 16:00:01 +00:00
parent 1a6b3fac1d
commit 9833f131e1
3 changed files with 35 additions and 8 deletions

View File

@@ -71,7 +71,7 @@ async def focus_view(
dl = item.get("domain_name") or "General"
dc = item.get("domain_color") or ""
if dk not in domain_map:
domain_map[dk] = {"label": dl, "color": dc, "rows": []}
domain_map[dk] = {"key": dk, "label": dl, "color": dc, "rows": []}
domain_map[dk]["rows"].append(item)
hierarchy = list(domain_map.values())