feat(sessions): relaygate group badge on session rows and header

Merged
KH
5d ago
+177-8

What

Shows the owning relaygate group's label (e.g. "pit") as a badge on sessions.

  • sessionRow reads relaygate: {gid, label} into SessionRow.group (only a non-negative integer gid and a label in relaygate's charset, <=24 chars; anything else is ignored).
  • Session list: an info Badge (GroupBadge) on the row's meta line (with Subagent / N subagents).
  • Session header: the badge in the "Session identity" group, from the catalog's relaygate field (SessionCatalog.group).
  • Filter: group:<label> search token (negatable), plus a "Group" sidebar section that appears only when a loaded session has a label. It filters in the browser over loaded rows, like the harness-alias filters.

Depends on AgentWorkforce/relaygate#39 (annotation) and AgentWorkforce/relay-control#204 (catalog pass-through), both merged. With no groupLabels in the relaygate policy, or without relaygate, nothing renders.

Agents: relay-web has no agent roster view (agents only appear as a session's recorded agent name), so agent badges are left as a follow-up.

Tests

npm run lint, tsc -b, vitest run (988 pass). New src/sessions/group-badge.test.tsx: parsing and rejection of malformed labels, group: filter and suggestions, list-row badge and sidebar filter, header badge, no badge or filter without labels.

馃 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith 路 Need help on this PR? Tag @codesmith-bot with what you need.