Skip to content

feat(settings): workspace leaders card on the Policies page - #150

Merged
agent-relay-code[bot] merged 2 commits into
mainfrom
feat/workspace-leaders
Nov 17, 2026
Merged

agent-relay-code[bot] merged 2 commits into
mainfrom
feat/workspace-leaders

Conversation

@agent-relay-code

@agent-relay-code agent-relay-code Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a Workspace leaders card to Settings › Policies. Owners and admins enter agent-name patterns (one per line) whose direct messages the hosts in the workspace treat as instructions from a lead. The card lists the agents the patterns match right now.

  • New client methods getWorkspaceLeaders / setWorkspaceLeaders against Control's GET|PUT /api/v1/workspaces/{id}/leaders (body { "patterns": [...] }, same response shape both ways).
  • Local pre-validation mirrors Control: at most 64 patterns, 1..128 characters after trimming, duplicates collapsed, * and ? the only wildcards, whole-name and case-sensitive. Invalid input never reaches the API.
  • Control's 400 invalid_request and 502 workspace_leaders_unavailable messages are shown as is, with "nothing was saved".
  • Admin-only, like the rest of the Policies page. No revision/If-Match on this route.

The Control route lands in a companion relay-control PR; this card is inert against a Control build without it (the load shows the error with a retry).

Verification

  • tsc -b clean, eslint --max-warnings 0 clean on the touched files.
  • src/admin/policies.test.tsx: 21 passed (9 new: load, member never reads, PUT body exactly { patterns } from padded/duplicated input, 65th pattern and 129-char pattern blocked before any write, 502 and 400 messages, URL encoding, normaliser unit test).

🤖 Generated with Claude Code


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

Preview

Policies page card, dark theme, rendered from this branch against a stubbed GET /workspaces/{id}/leaders answer (*grok and lead set; lead and reviewgrok matched):

Workspace leaders card

View guided diff

Owners and admins set the agent-name patterns whose direct messages the
hosts treat as instructions from a lead, one per line, checked locally
against the same limits Control enforces (64 patterns, 1..128 characters,
`*` and `?` wildcards, whole name, case-sensitive). The card shows the
agents the patterns match right now and surfaces Control's invalid_request
and workspace_leaders_unavailable messages as is.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 98971d04-2cc5-4d82-bdbc-d8f8674c397a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous styling issue is fixed and no new blocking issues were found.

Summary

Adds a Workspace leaders card to Settings › Policies.

  • Workspace leaders cards let admins choose which agents count as leads.

Reviews (2) · Last reviewed commit: "fix(settings): keep the leader patterns ..." · Reviewed by Greptile

Comment thread src/admin/admin.css Resolved
…ayer

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@agent-relay-code
agent-relay-code Bot merged commit fb1443d into main Nov 17, 2026
6 checks passed
@agent-relay-code
agent-relay-code Bot deleted the feat/workspace-leaders branch November 17, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants