ui: rename key type Default to Full Access

Co-authored-by: Shivam Rawat <shivamrawat1@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-03-13 23:50:14 +00:00
parent 6549b4583f
commit 3616c97100
No known key found for this signature in database
4 changed files with 23 additions and 4 deletions

View file

@ -287,6 +287,19 @@ describe("CreateKey", () => {
});
});
it("should display 'Full Access' label for the default key type option", async () => {
renderWithProviders(<CreateKey {...defaultProps} />);
act(() => {
fireEvent.click(screen.getByRole("button", { name: /create new key/i }));
});
await waitFor(() => {
expect(screen.getByText("Full Access")).toBeInTheDocument();
expect(screen.queryByText(/^Default$/)).not.toBeInTheDocument();
});
});
it("should include access_group_ids in keyCreateCall payload when access groups are selected", async () => {
renderWithProviders(<CreateKey {...defaultProps} />);

View file

@ -924,9 +924,9 @@ const CreateKey: React.FC<CreateKeyProps> = ({ team, teams, data, addKey, autoOp
}
}}
>
<Option value="default" label="Default">
<Option value="default" label="Full Access">
<div style={{ padding: "4px 0" }}>
<div style={{ fontWeight: 500 }}>Default</div>
<div style={{ fontWeight: 500 }}>Full Access</div>
<div style={{ fontSize: "11px", color: "#6b7280", marginTop: "2px" }}>
Can call AI APIs + Management routes
</div>

View file

@ -528,6 +528,12 @@ describe("KeyEditView", () => {
const hasAIAPIs = optionTexts.some((text) => text?.includes("AI APIs"));
expect(hasAIAPIs).toBe(true);
const hasFullAccess = optionTexts.some((text) => text?.includes("Full Access"));
expect(hasFullAccess).toBe(true);
const hasDefault = optionTexts.some((text) => text?.includes("Default"));
expect(hasDefault).toBe(false);
// Verify old "LLM API" label does NOT appear
const hasLLMAPI = optionTexts.some((text) => text?.includes("LLM API"));
expect(hasLLMAPI).toBe(false);

View file

@ -361,9 +361,9 @@ export function KeyEditView({
}
}}
>
<Select.Option value="default" label="Default">
<Select.Option value="default" label="Full Access">
<div style={{ padding: "4px 0" }}>
<div style={{ fontWeight: 500 }}>Default</div>
<div style={{ fontWeight: 500 }}>Full Access</div>
<div style={{ fontSize: "11px", color: "#6b7280", marginTop: "2px" }}>
Can call AI APIs + Management routes
</div>