diff --git a/site/src/pages/AgentsPage/AgentSettingsSystemInstructionsPageView.tsx b/site/src/pages/AgentsPage/AgentSettingsSystemInstructionsPageView.tsx
index 984c1ad98ab7e..b344fa23991d5 100644
--- a/site/src/pages/AgentsPage/AgentSettingsSystemInstructionsPageView.tsx
+++ b/site/src/pages/AgentsPage/AgentSettingsSystemInstructionsPageView.tsx
@@ -43,7 +43,7 @@ export const AgentSettingsSystemInstructionsPageView: FC<
return (
}
/>
diff --git a/site/src/router.tsx b/site/src/router.tsx
index efbb8d94deef9..9f67d7ea02fb5 100644
--- a/site/src/router.tsx
+++ b/site/src/router.tsx
@@ -736,6 +736,8 @@ export const router = createBrowserRouter(
path="instructions"
element={
}
/>
+ {/* Permanent backward-compat for bookmarks to the old URL. Do not remove. */}
+ {/* If /agents/settings/instructions is renamed, update this redirect target. */}
}
From 2e2c852fded4529c2930f61506a52a65ef231fa3 Mon Sep 17 00:00:00 2001
From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com>
Date: Tue, 21 Apr 2026 18:09:08 +0000
Subject: [PATCH 07/22] chore: nudge CI
From 1f72ce7f75fdba69c46e5210b0b1749f1a5276e8 Mon Sep 17 00:00:00 2001
From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com>
Date: Tue, 21 Apr 2026 19:47:18 +0000
Subject: [PATCH 08/22] test(site/src/pages/AgentsPage/components/Sidebar): fix
settings sidebar stories
---
.../components/Sidebar/AgentsSidebar.stories.tsx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.stories.tsx b/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.stories.tsx
index e80240e272a40..1cce646b7357c 100644
--- a/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.stories.tsx
+++ b/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.stories.tsx
@@ -772,7 +772,7 @@ export const RenameChatGenerateLateResponseDoesNotClobberOtherChat: Story = {
});
expect(inputB).toHaveValue("Chat B");
await userEvent.clear(inputB);
- await userEvent.type(inputB, "User edit for B");
+ await userEvent.paste("User edit for B");
await new Promise((resolve) => setTimeout(resolve, 250));
expect(inputB).toHaveValue("User edit for B");
@@ -833,7 +833,7 @@ export const RenameChatGenerateLateResponseDoesNotClobberSameChatReopen: Story =
});
expect(input).toHaveValue("Chat same");
await userEvent.clear(input);
- await userEvent.type(input, "User edit");
+ await userEvent.paste("User edit");
await new Promise((resolve) => setTimeout(resolve, 250));
expect(input).toHaveValue("User edit");
@@ -1510,7 +1510,9 @@ export const SettingsAPIKeysAdmin: Story = {
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
- await expect(canvas.getByText("API Keys")).toBeInTheDocument();
+ await expect(
+ canvas.getByRole("link", { name: "Secrets (API keys)" }),
+ ).toBeInTheDocument();
},
};
@@ -1541,6 +1543,8 @@ export const SettingsAPIKeysNonAdmin: Story = {
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
- await expect(canvas.getByText("API Keys")).toBeInTheDocument();
+ await expect(
+ canvas.getByRole("link", { name: "Secrets (API keys)" }),
+ ).toBeInTheDocument();
},
};
From 7b62af959505cac277b374cc20e9821343dcdabf Mon Sep 17 00:00:00 2001
From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com>
Date: Tue, 21 Apr 2026 19:59:51 +0000
Subject: [PATCH 09/22] test(site/src/pages/AgentsPage): harden settings reset
story
---
site/src/pages/AgentsPage/AgentsPageView.stories.tsx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/site/src/pages/AgentsPage/AgentsPageView.stories.tsx b/site/src/pages/AgentsPage/AgentsPageView.stories.tsx
index 0618bb89967a5..10c765b9e26a9 100644
--- a/site/src/pages/AgentsPage/AgentsPageView.stories.tsx
+++ b/site/src/pages/AgentsPage/AgentsPageView.stories.tsx
@@ -702,8 +702,8 @@ export const SettingsViewResets: Story = {
});
// Navigate to the admin panel, then open the Spend section.
- await userEvent.click(screen.getByText("Agent admin"));
- await userEvent.click(screen.getByText("Spend"));
+ await userEvent.click(screen.getByRole("link", { name: "Agent admin" }));
+ await userEvent.click(screen.getByRole("link", { name: "Spend" }));
await waitFor(() => {
expect(
screen.getByText(
@@ -713,9 +713,13 @@ export const SettingsViewResets: Story = {
});
// Step back to the top-level settings panel, then back to conversations.
- const backToSettingsButton = screen.getByLabelText("Back to Settings");
+ const backToSettingsButton = screen.getByRole("link", {
+ name: "Back to Settings",
+ });
await userEvent.click(backToSettingsButton);
- const backToAgentsButton = screen.getByLabelText("Back to Agents");
+ const backToAgentsButton = screen.getByRole("link", {
+ name: "Back to Agents",
+ });
await userEvent.click(backToAgentsButton);
// Re-open settings, should reset to General
From d3393e4b79fab79b3a07ce7a0c818395c014a83b Mon Sep 17 00:00:00 2001
From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com>
Date: Wed, 22 Apr 2026 09:50:10 +0000
Subject: [PATCH 10/22] refactor(site/src): rename agent admin sub-panel and
link from deployment settings
---
site/src/modules/management/DeploymentSidebarView.tsx | 5 +++++
site/src/pages/AgentsPage/AgentsPageView.stories.tsx | 2 +-
.../pages/AgentsPage/components/Sidebar/AgentsSidebar.tsx | 4 ++--
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/site/src/modules/management/DeploymentSidebarView.tsx b/site/src/modules/management/DeploymentSidebarView.tsx
index 30336d746da3b..82a038fa8e30f 100644
--- a/site/src/modules/management/DeploymentSidebarView.tsx
+++ b/site/src/modules/management/DeploymentSidebarView.tsx
@@ -106,6 +106,11 @@ export const DeploymentSidebarView: FC
= ({
{!hasPremiumLicense && (
Premium
)}
+ {permissions.editDeploymentConfig && (
+
+ Manage Coder Agents
+
+ )}
);
diff --git a/site/src/pages/AgentsPage/AgentsPageView.stories.tsx b/site/src/pages/AgentsPage/AgentsPageView.stories.tsx
index 10c765b9e26a9..29ded435d25d4 100644
--- a/site/src/pages/AgentsPage/AgentsPageView.stories.tsx
+++ b/site/src/pages/AgentsPage/AgentsPageView.stories.tsx
@@ -702,7 +702,7 @@ export const SettingsViewResets: Story = {
});
// Navigate to the admin panel, then open the Spend section.
- await userEvent.click(screen.getByRole("link", { name: "Agent admin" }));
+ await userEvent.click(screen.getByRole("link", { name: "Manage agents" }));
await userEvent.click(screen.getByRole("link", { name: "Spend" }));
await waitFor(() => {
expect(
diff --git a/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.tsx b/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.tsx
index dc65a342b1fda..48629705adb6d 100644
--- a/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.tsx
+++ b/site/src/pages/AgentsPage/components/Sidebar/AgentsSidebar.tsx
@@ -1060,7 +1060,7 @@ export const AgentsSidebar: FC