Repository navigation
feat(agent-settings): lift policy, identity, grants, runtime and own key - #3248
Conversation
…key from the frame Identity, How it runs (machine, adapter/model/effort, own API key), Connector grants and Policy now render as the artboard's grouped lists: lrow rows, details.disc disclosures, .field/.sel controls and alert rows, styled from v2-agent-settings-surface.css. V2AgentRuntimeGrants.css and V2RuntimeControls.css are deleted; the identity/listing/owned rules leave v2-agent-settings.css and the trust/quota rules leave v2-agent-policy.css. Behaviour kept: every handler, API call and error path. New behaviour from the frame notes: trust mode is a segment with Saved/error in the action slot (Saved clears after a moment), the name refusal sits under the field, grant load failure is a row with Try again, and a failed revoke is its own line above the rows. Focus rings use --v2-focus-ring; 44px targets on phones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015AKgpMD6Qh13f7fj6mbGT3
The grant row printed the raw connector id, and capitalising it in CSS gave "Github". Name it from the logo table instead (GitHub, Linear, Sentry...), falling back to the id for connectors without a logo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015AKgpMD6Qh13f7fj6mbGT3
…-only runtime reads as values - A select now fills its .sel/.field box (height and line-height from --box-h: 28/34px, 44px on phones), so the whole box takes the click and the value stays centred. - Connector grants renders one h2.gtitle, named by its title alone. - Disabled runtime selects (read-only seats) drop the box ring and chevron, as they did before the lift. - A row with no confirmation reads "unconfirmed" instead of "confirmed unconfirmed". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015AKgpMD6Qh13f7fj6mbGT3
… on phones At 390 the confirm row's action slot spanned the whole row, so the end date fell under the logo. The slot now dissolves while confirming: the date stays in the name column and the Yes/Cancel pair takes the full row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015AKgpMD6Qh13f7fj6mbGT3
|
Caution Review failedThe pull request is closed. No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Shared settings presentation frontend/src/v2/agents/V2AgentSettingsIcon.tsx, frontend/src/v2/agents/v2-agent-settings-surface.css, frontend/src/v2/agents/v2-agent-settings.css, frontend/src/v2/components/V2AgentRuntimeGrants.css, frontend/src/v2/components/V2RuntimeControls.css, frontend/src/v2/__tests__/v2-layout-invariants.test.ts |
Adds a shared SVG icon and common settings styles, including responsive controls, focus states, forms, and feedback. Removes component-specific stylesheets and checks the revised layout invariants. |
Identity and listing settings frontend/src/v2/agents/V2AgentIdentitySection.tsx, frontend/src/v2/agents/v2-agent-settings.css, frontend/src/i18n/locales/en.json, frontend/src/i18n/locales/zh-CN.json, frontend/src/v2/__tests__/V2AgentSettingsPage.test.tsx |
Reworks identity and listing controls into collapsible sections. Name errors appear by the field, persona sections show specialty and boundary counts, and owners retain listing edit and retire or restore controls. Adds validation and permission-error tests. |
Policy and quota settings frontend/src/v2/agents/V2AgentPolicy.tsx, frontend/src/v2/agents/v2-agent-policy.css, frontend/src/v2/__tests__/V2AgentPolicy.test.tsx |
Presents trust options as radio controls and places saved or error feedback beside Save. Renders hosted and native quota values and errors in the shared settings list. |
Runtime, provider-key, and grant settings frontend/src/v2/components/V2RuntimeControls.tsx, frontend/src/v2/components/V2AgentProviderKey.tsx, frontend/src/v2/components/V2AgentRuntimeGrants.tsx, frontend/src/v2/connectors/ConnectorLogo.tsx, frontend/src/i18n/locales/en.json, frontend/src/i18n/locales/zh-CN.json, frontend/src/v2/__tests__/V2RuntimeControls.test.tsx, frontend/src/v2/__tests__/V2AgentRuntimeGrants.test.tsx |
Moves runtime controls, provider-key forms, and connector grants to the shared layout. Grant loading and revocation have separate errors; load failures offer retry, and grant rows show counts, connector names, and revoke controls. Adds machine, retry, count, and API-key labels and tests for these states. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Possibly related issues
- Team-Commonly/commonly, Issue 709 — Adds Simplified Chinese labels for parts of the v2 settings surface, addressing part of the translation scope.
- Team-Commonly/commonly, Issue 1400 — The provider-key section presents API-key status and key management in the v2 settings surface. The issue’s connect-flow requirements are not covered.
- Team-Commonly/commonly, Issue 632 — Adds a test that memory-editor “Saved” status remains visible after five seconds. The issue’s broader memory-management requirements are not covered.
- Team-Commonly/commonly, Issue 741 — Adds the agent Identity settings surface, but does not implement the described per-pod display-name deduplication fix.
- Team-Commonly/commonly, Issue 570 — Updates the agent Identity settings surface, but does not add the requested avatar control.
Merge Risk: 
Low · up to 63da4
-
Key removal, machine placement, and mobile button sizing need stronger regression tests. The remaining risk is low.
Pre-merge checks: 
4
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
…d and key states from main - Each grant row shows its tool list as visible text again, so two grants for one connector are told apart. - A revoke error clears on Cancel and when another confirm opens. - A revoked machine and a requested one show together, as on main. - Only the trust row's Saved auto-dismisses; the memory editor keeps its Saved until the next action. - The own-key set date and Remove show whenever the key is set and the agent is editable, including when the harness cannot take a key and while replacing it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015AKgpMD6Qh13f7fj6mbGT3
lilyshen0722
left a comment
There was a problem hiding this comment.
Fresh-context review (Opus) at 7cb9aad, then a second pass at 63da4be checking the fixes.
First pass, one defect: grant rows showed only the brand name, with the tool list hidden in a title, so two grants for one connector couldn't be told apart before revoking. Fixed: the tool list is visible again on its own line, and it wraps cleanly at 390 (browser-checked).
Nits fixed in the same commit:
- A revoke error now clears on Cancel and when another confirm opens.
- A revoked machine and a requested machine show together again, as on main.
- The 2.5 s auto-dismiss applies only to the trust save; the memory editor's "Saved" persists, as on main.
- The own-key "set · date" line and Remove show in the unavailable-harness row and inside the Replace form, behind main's
editable && setgate.
Each fix has a test that fails on the previous head.
Verified unchanged from main:
- Revoke still needs the inline confirm, and the
canRevokeand not-ended gates are unchanged. - The runtime Save and
editableconditions are identical. - A failed key save clears the field and leaves Save disabled.
- Owner and member listing controls are unchanged.
- The radiogroup is named, and there is one heading per section.
- New keys are in both locales, and the zh-CN follows the glossary.
- Deleted CSS has no remaining users, and no rule uses
--v2-accent-soft.
Token remap: --sf and --t resolve to identical values. Only dark-mode --ink moves, from #e8ebf1 to #f4f5f8.
Browser check: see the PR body. At 63da4be, mocked grants with a long tool list were checked at 1440 and 390, light and dark. Revoke, "Yes, revoke it" and Cancel are 44px at 390, with no scroll and no page errors.
Suites: v2 and i18n 2103/2103, frontend tsc clean.
GATE: PASS
Agent settings, the rest of the page. #3183 lifted the header, the Wake table and Identity & access. This lifts the five sections the frames in #3184 draw.
n / 80count, and its refusals show under the field. Persona is one disclosure, with tone, specialties and boundaries. One "Save identity" covers both. The marketplace listing opens to the owner's rename, Save, Retire/Restore and View public profile; other members see only the profile link.Deleted:
V2AgentRuntimeGrants.cssandV2RuntimeControls.css(both used only on this page), and the identity, listing and owned rules inv2-agent-settings.css. Also the old section, quota and select rules inv2-agent-policy.css, and the old focus-ring colour.Exceptions to the lifted frame:
Kept as live, not drawn:
Browser check against staging data (
claude-code/d215-wren, a read-only CLI seat) at 1440 and 390, light and dark, en and zh-CN:Grants were mocked: GitHub resting, Linear mid-confirm with a revoke error, and Sentry ended. Revoke, "Yes, revoke it" and Cancel are 44px at 390, and the confirm row keeps its date under the name.
At 390, the remaining sub-44px controls are outside these sections:
Tests: 13 new behaviour tests and layout guards, each reverse-verified (fails with its fix removed, passes restored). Old-markup assertions were updated; no behavioural assertion was weakened. v2 and i18n suites 2097/2097, frontend tsc clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_015AKgpMD6Qh13f7fj6mbGT3