Repository navigation
feat(settings): workspace leaders card on the Policies page - #150
Merged
Merged
Conversation
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>
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
[Medium impact] The PR appears safe to merge; the previous styling issue is fixed and no new blocking issues were found.
|
…ayer Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
getWorkspaceLeaders/setWorkspaceLeadersagainst Control'sGET|PUT /api/v1/workspaces/{id}/leaders(body{ "patterns": [...] }, same response shape both ways).*and?the only wildcards, whole-name and case-sensitive. Invalid input never reaches the API.400 invalid_requestand502 workspace_leaders_unavailablemessages are shown as is, with "nothing was saved".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 -bclean,eslint --max-warnings 0clean 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
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Preview
Policies page card, dark theme, rendered from this branch against a stubbed
GET /workspaces/{id}/leadersanswer (*grokandleadset;leadandreviewgrokmatched):