From b411f093832fb85ac869da30f8303dca28426a28 Mon Sep 17 00:00:00 2001 From: TJ Date: Tue, 2 Jun 2026 07:17:06 -0700 Subject: [PATCH] fix(site/src/pages/AgentsPage): use sentence case for UI labels (#25941) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Converts all title-case UI labels in the Coder Agents area to sentence case for consistency. Also renames the "New Agent" sidebar button to "New chat". ## Changes ### Settings headings | Before | After | |---|---| | Personal Instructions | Personal instructions | | Chat Layout | Chat layout | | Keyboard Shortcuts | Keyboard shortcuts | | Thinking Display | Thinking display | | Shell Output Display | Shell output display | | Code Diff Display | Code diff display | | Autostop Fallback | Autostop fallback | | Workspace Autostop Fallback | Workspace autostop fallback | | Auto-Archive Inactive Conversations | Auto-archive inactive conversations | | Conversation Retention Period | Conversation retention period | | Chat Debug Data Retention | Chat debug data retention | | System Instructions | System instructions | | Context Compaction | Context compaction | | Cost Tracking | Cost tracking | | Provider Configuration | Provider configuration | | Virtual Desktop | Virtual desktop | ### Select/option labels | Before | After | |---|---| | Always Expanded | Always expanded | | Always Collapsed | Always collapsed | ### Sidebar and nav labels | Before | After | |---|---| | New Agent | New chat | | Personal Skills | Personal skills | | Manage Agents | Manage agents | | MCP Servers | MCP servers | | Back to Settings | Back to settings | | Back to Agents | Back to agents | ### Form field labels | Before | After | |---|---| | Display Name | Display name | | Client Secret | Client secret | | Header Name | Header name | | Tool Allow List | Tool allow list | | Tool Deny List | Tool deny list | | Spend Limit | Spend limit | | Cache Read | Cache read | | Cache Write | Cache write | | Model Identifier | Model identifier | | Context Limit | Context limit | | Compression Threshold | Compression threshold | ### Model form titles | Before | After | |---|---| | Add Model | Add model | | Edit Model | Edit model | | Duplicate Model | Duplicate model | ### Admin/limits labels | Before | After | |---|---| | Group Limits | Group limits | | Per-User Overrides | Per-user overrides | | Default Spend Limit | Default spend limit | ### Other | Before | After | |---|---| | Weekly/Workspace Usage | Weekly/Workspace usage | | View Usage | View usage | | attached image / attached file | Attached image / Attached file | ### Not changed (server-provided labels) Model config field labels like "Reasoning Effort", "Max Completion Tokens", "Send Reasoning", etc. are provided by the server via `field.label` and rendered as-is by `snakeToPrettyLabel`. These require a server-side change to use sentence case. All corresponding story and test assertions updated to match. > 🤖 Generated by Coder Agents on behalf of @tracyjohnsonux --- ...entSettingsExperimentsPageView.stories.tsx | 2 +- .../AgentSettingsGeneralPageView.stories.tsx | 12 +++--- ...ntSettingsInstructionsPageView.stories.tsx | 4 +- ...AgentSettingsLifecyclePageView.stories.tsx | 16 ++++---- .../AgentSettingsMCPServersPage.tsx | 2 +- .../pages/AgentsPage/AgentSettingsPage.tsx | 2 +- .../AgentSettingsPersonalSkillsPageView.tsx | 2 +- .../AgentsPage/AgentsPageView.stories.tsx | 12 +++--- .../AgentsPage/components/AgentCreateForm.tsx | 2 +- .../components/AutoArchiveSettings.tsx | 2 +- .../LiveStreamTail.stories.tsx | 3 +- .../ChatConversation/LiveStreamTail.tsx | 2 +- .../components/ChatCostSummaryView.tsx | 14 +++---- .../components/ChatFullWidthSettings.tsx | 2 +- .../ChatModelAdminPanel.stories.tsx | 29 +++++++------- .../ChatModelAdminPanel/ModelConfigFields.tsx | 8 ++-- .../ChatModelAdminPanel/ModelForm.tsx | 20 +++++----- .../ModelIdentifierField.tsx | 2 +- .../ModelsSection.stories.tsx | 40 +++++++++---------- .../components/ChatSendShortcutSettings.tsx | 2 +- .../ChatsSidebar/ChatsSidebar.stories.tsx | 6 +-- .../ChatsSidebar/chats/ChatsPanel.tsx | 2 +- .../ChatsSidebar/settings/SettingsPanel.tsx | 14 +++---- .../components/DebugRetentionSettings.tsx | 2 +- .../components/DisplayModeSettings.tsx | 20 +++++----- .../LimitsTab/DefaultLimitSection.tsx | 2 +- .../LimitsTab/GroupLimitsSection.tsx | 6 +-- .../LimitsTab/UserOverridesSection.tsx | 6 +-- .../components/MCPServerAdminPanel.tsx | 12 +++--- .../AgentsPage/components/MCPServerPicker.tsx | 2 +- .../PersonalInstructionsSettings.tsx | 2 +- .../components/RetentionPeriodSettings.tsx | 2 +- .../components/SystemInstructionsSettings.tsx | 2 +- .../AgentsPage/components/UsageIndicator.tsx | 2 +- .../UserCompactionThresholdSettings.tsx | 2 +- .../components/VirtualDesktopSettings.tsx | 2 +- .../components/WorkspaceAutostopSettings.tsx | 4 +- 37 files changed, 132 insertions(+), 134 deletions(-) diff --git a/site/src/pages/AgentsPage/AgentSettingsExperimentsPageView.stories.tsx b/site/src/pages/AgentsPage/AgentSettingsExperimentsPageView.stories.tsx index a7ccad7758..fefec646f8 100644 --- a/site/src/pages/AgentsPage/AgentSettingsExperimentsPageView.stories.tsx +++ b/site/src/pages/AgentsPage/AgentSettingsExperimentsPageView.stories.tsx @@ -153,7 +153,7 @@ export const ForcedByDeployment: Story = { export const DesktopSetting: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - await canvas.findByText("Virtual Desktop"); + await canvas.findByText("Virtual desktop"); await canvas.findByText( /Allow agents to use a virtual, graphical desktop within workspaces./i, ); diff --git a/site/src/pages/AgentsPage/AgentSettingsGeneralPageView.stories.tsx b/site/src/pages/AgentsPage/AgentSettingsGeneralPageView.stories.tsx index 311df2eb8c..04ab698b8d 100644 --- a/site/src/pages/AgentsPage/AgentSettingsGeneralPageView.stories.tsx +++ b/site/src/pages/AgentsPage/AgentSettingsGeneralPageView.stories.tsx @@ -55,7 +55,7 @@ export const InvisibleUnicodeWarningUserPrompt: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - await canvas.findByText("Personal Instructions"); + await canvas.findByText("Personal instructions"); const alert = await canvas.findByText(/invisible Unicode/); expect(alert).toBeInTheDocument(); expect(alert.textContent).toContain("2"); @@ -128,7 +128,7 @@ export const RendersChatLayoutSection: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - expect(await canvas.findByText("Chat Layout")).toBeInTheDocument(); + expect(await canvas.findByText("Chat layout")).toBeInTheDocument(); expect( await canvas.findByRole("switch", { name: "Full-width chat" }), ).toBeInTheDocument(); @@ -160,7 +160,7 @@ export const TogglesSendShortcut: Story = { name: "Require Cmd/Ctrl+Enter to send messages", }); - expect(await canvas.findByText("Keyboard Shortcuts")).toBeInTheDocument(); + expect(await canvas.findByText("Keyboard shortcuts")).toBeInTheDocument(); expect(toggle).not.toBeChecked(); await userEvent.click(toggle); @@ -177,9 +177,9 @@ export const RendersAgentDisplayModeSettings: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - expect(await canvas.findByText("Thinking Display")).toBeVisible(); - expect(await canvas.findByText("Shell Output Display")).toBeVisible(); - expect(await canvas.findByText("Code Diff Display")).toBeVisible(); + expect(await canvas.findByText("Thinking display")).toBeVisible(); + expect(await canvas.findByText("Shell output display")).toBeVisible(); + expect(await canvas.findByText("Code diff display")).toBeVisible(); }, }; diff --git a/site/src/pages/AgentsPage/AgentSettingsInstructionsPageView.stories.tsx b/site/src/pages/AgentsPage/AgentSettingsInstructionsPageView.stories.tsx index 2919b4e193..ea8088311a 100644 --- a/site/src/pages/AgentsPage/AgentSettingsInstructionsPageView.stories.tsx +++ b/site/src/pages/AgentsPage/AgentSettingsInstructionsPageView.stories.tsx @@ -117,7 +117,7 @@ export const InvisibleUnicodeWarningSystemPrompt: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - await canvas.findByText("System Instructions"); + await canvas.findByText("System instructions"); const alert = await canvas.findByText(/invisible Unicode/); expect(alert).toBeInTheDocument(); expect(alert.textContent).toContain("4"); @@ -138,7 +138,7 @@ export const NoWarningForCleanPrompt: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - await canvas.findByText("System Instructions"); + await canvas.findByText("System instructions"); await canvas.findByDisplayValue("You are a helpful coding assistant."); expect(canvas.queryByText(/invisible Unicode/)).toBeNull(); }, diff --git a/site/src/pages/AgentsPage/AgentSettingsLifecyclePageView.stories.tsx b/site/src/pages/AgentsPage/AgentSettingsLifecyclePageView.stories.tsx index 187929e207..638ac04cd4 100644 --- a/site/src/pages/AgentsPage/AgentSettingsLifecyclePageView.stories.tsx +++ b/site/src/pages/AgentsPage/AgentSettingsLifecyclePageView.stories.tsx @@ -46,7 +46,7 @@ export const Default: Story = {}; export const DefaultAutostopDefault: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - await canvas.findByText("Workspace Autostop Fallback"); + await canvas.findByText("Workspace autostop fallback"); await canvas.findByText( /Set a default autostop for agent-created workspaces/i, ); @@ -55,7 +55,7 @@ export const DefaultAutostopDefault: Story = { name: "Enable default autostop", }); expect(toggle).not.toBeChecked(); - expect(canvas.queryByLabelText("Autostop Fallback")).toBeNull(); + expect(canvas.queryByLabelText("Autostop fallback")).toBeNull(); }, }; @@ -70,7 +70,7 @@ export const DefaultAutostopCustomValue: Story = { }); expect(toggle).toBeChecked(); - const durationInput = await canvas.findByLabelText("Autostop Fallback"); + const durationInput = await canvas.findByLabelText("Autostop fallback"); expect(durationInput).toHaveValue("2"); }, }; @@ -90,7 +90,7 @@ export const DefaultAutostopSave: Story = { ); }); - const durationInput = await canvas.findByLabelText("Autostop Fallback"); + const durationInput = await canvas.findByLabelText("Autostop fallback"); expect(durationInput).toHaveValue("1"); await userEvent.clear(durationInput); @@ -126,7 +126,7 @@ export const DefaultAutostopExceedsMax: Story = { }); await userEvent.click(toggle); - const durationInput = await canvas.findByLabelText("Autostop Fallback"); + const durationInput = await canvas.findByLabelText("Autostop fallback"); const ttlForm = durationInput.closest("form"); if (!(ttlForm instanceof HTMLFormElement)) { throw new Error( @@ -180,7 +180,7 @@ export const DefaultAutostopSaveDisabled: Story = { }); expect(toggle).toBeChecked(); - const durationInput = await canvas.findByLabelText("Autostop Fallback"); + const durationInput = await canvas.findByLabelText("Autostop fallback"); expect(durationInput).toHaveValue("2"); const ttlForm = durationInput.closest("form"); @@ -229,7 +229,7 @@ export const DefaultAutostopToggleOffFailure: Story = { }); expect(toggle).toBeChecked(); - const durationInput = await canvas.findByLabelText("Autostop Fallback"); + const durationInput = await canvas.findByLabelText("Autostop fallback"); expect(durationInput).toHaveValue("2"); await userEvent.click(toggle); @@ -634,7 +634,7 @@ export const RetentionBelowMin: Story = { export const DebugRetentionLoadedDefault: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - await canvas.findByText("Chat Debug Data Retention"); + await canvas.findByText("Chat debug data retention"); await canvas.findByText(/debug runs and debug steps/i); await canvas.findByText(/does not control chat message retention/i); diff --git a/site/src/pages/AgentsPage/AgentSettingsMCPServersPage.tsx b/site/src/pages/AgentsPage/AgentSettingsMCPServersPage.tsx index 4523b6ed4a..dbb9b11839 100644 --- a/site/src/pages/AgentsPage/AgentSettingsMCPServersPage.tsx +++ b/site/src/pages/AgentsPage/AgentSettingsMCPServersPage.tsx @@ -23,7 +23,7 @@ const AgentSettingsMCPServersPage: FC = () => { return ( { const sidebarView = sidebarViewFromPath(location.pathname); const mobileBack = section ? sidebarView.panel === "settings-admin" - ? { to: "/agents/settings/admin", label: "Manage Agents" } + ? { to: "/agents/settings/admin", label: "Manage agents" } : { to: "/agents/settings", label: "Settings" } : undefined; diff --git a/site/src/pages/AgentsPage/AgentSettingsPersonalSkillsPageView.tsx b/site/src/pages/AgentsPage/AgentSettingsPersonalSkillsPageView.tsx index fd83d035a4..ccb1d5d585 100644 --- a/site/src/pages/AgentsPage/AgentSettingsPersonalSkillsPageView.tsx +++ b/site/src/pages/AgentsPage/AgentSettingsPersonalSkillsPageView.tsx @@ -224,7 +224,7 @@ export const AgentSettingsPersonalSkillsPageView: FC< return (
diff --git a/site/src/pages/AgentsPage/AgentsPageView.stories.tsx b/site/src/pages/AgentsPage/AgentsPageView.stories.tsx index d2a2359b97..fcb3de9286 100644 --- a/site/src/pages/AgentsPage/AgentsPageView.stories.tsx +++ b/site/src/pages/AgentsPage/AgentsPageView.stories.tsx @@ -726,7 +726,7 @@ export const EmptyStateZoom200Desktop: Story = { }); await expect(canvas.getByRole("link", { name: "Settings" })).toBeVisible(); - await expect(canvas.getByRole("link", { name: "New Agent" })).toBeVisible(); + await expect(canvas.getByRole("link", { name: "New chat" })).toBeVisible(); await expect( canvas.getByRole("button", { name: "Collapse sidebar" }), ).toBeVisible(); @@ -1014,7 +1014,7 @@ export const OpensSettingsForNonAdmins: Story = { }); expect( - screen.queryByRole("link", { name: "Manage Agents" }), + screen.queryByRole("link", { name: "Manage agents" }), ).not.toBeInTheDocument(); }, }; @@ -1032,7 +1032,7 @@ export const OpensAdminSubPanelOnMobile: Story = { }, play: async () => { await userEvent.click( - await screen.findByRole("link", { name: "Manage Agents" }), + await screen.findByRole("link", { name: "Manage agents" }), ); await expect( @@ -1059,7 +1059,7 @@ export const SettingsViewResets: Story = { }); // Navigate to the admin panel, then open the Spend section. - await userEvent.click(screen.getByRole("link", { name: "Manage Agents" })); + await userEvent.click(screen.getByRole("link", { name: "Manage agents" })); await userEvent.click(await screen.findByRole("link", { name: "Spend" })); await waitFor(() => { expect( @@ -1071,11 +1071,11 @@ export const SettingsViewResets: Story = { // Step back to the top-level settings panel, then back to conversations. const backToSettingsButton = await screen.findByRole("link", { - name: "Back to Settings", + name: "Back to settings", }); await userEvent.click(backToSettingsButton); const backToAgentsButton = await screen.findByRole("link", { - name: "Back to Agents", + name: "Back to agents", }); await userEvent.click(backToAgentsButton); diff --git a/site/src/pages/AgentsPage/components/AgentCreateForm.tsx b/site/src/pages/AgentsPage/components/AgentCreateForm.tsx index f52703d58a..d4ec3b5956 100644 --- a/site/src/pages/AgentsPage/components/AgentCreateForm.tsx +++ b/site/src/pages/AgentsPage/components/AgentCreateForm.tsx @@ -476,7 +476,7 @@ export const AgentCreateForm: FC = ({ severity="info" actions={ } > diff --git a/site/src/pages/AgentsPage/components/AutoArchiveSettings.tsx b/site/src/pages/AgentsPage/components/AutoArchiveSettings.tsx index 9ab2578d82..9718df9577 100644 --- a/site/src/pages/AgentsPage/components/AutoArchiveSettings.tsx +++ b/site/src/pages/AgentsPage/components/AutoArchiveSettings.tsx @@ -112,7 +112,7 @@ export const AutoArchiveSettings: FC = ({

- Auto-Archive Inactive Conversations + Auto-archive inactive conversations

- View Usage + View usage } > diff --git a/site/src/pages/AgentsPage/components/ChatCostSummaryView.tsx b/site/src/pages/AgentsPage/components/ChatCostSummaryView.tsx index 16f854e82f..6066768571 100644 --- a/site/src/pages/AgentsPage/components/ChatCostSummaryView.tsx +++ b/site/src/pages/AgentsPage/components/ChatCostSummaryView.tsx @@ -174,7 +174,7 @@ export const ChatCostSummaryView: FC = ({

- Cache Read + Cache read

{formatTokenCount(summary.total_cache_read_tokens)} @@ -182,7 +182,7 @@ export const ChatCostSummaryView: FC = ({

- Cache Write + Cache write

{formatTokenCount(summary.total_cache_creation_tokens)} @@ -206,7 +206,7 @@ export const ChatCostSummaryView: FC = ({

- {usageLimitPeriodLabel} Spend Limit + {usageLimitPeriodLabel} spend limit

{usageLimitCurrentPeriod && (

@@ -288,8 +288,8 @@ export const ChatCostSummaryView: FC = ({ Messages Input Output - Cache Read - Cache Write + Cache read + Cache write @@ -344,8 +344,8 @@ export const ChatCostSummaryView: FC = ({ Messages Input Output - Cache Read - Cache Write + Cache read + Cache write diff --git a/site/src/pages/AgentsPage/components/ChatFullWidthSettings.tsx b/site/src/pages/AgentsPage/components/ChatFullWidthSettings.tsx index 4a58f77f25..12627a4787 100644 --- a/site/src/pages/AgentsPage/components/ChatFullWidthSettings.tsx +++ b/site/src/pages/AgentsPage/components/ChatFullWidthSettings.tsx @@ -8,7 +8,7 @@ export const ChatFullWidthSettings: FC = () => { return (

- Chat Layout + Chat layout

diff --git a/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ChatModelAdminPanel.stories.tsx b/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ChatModelAdminPanel.stories.tsx index 09a5386369..7d6fce9b0e 100644 --- a/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ChatModelAdminPanel.stories.tsx +++ b/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ChatModelAdminPanel.stories.tsx @@ -965,8 +965,7 @@ export const SubmitModelConfigExplicitly: Story = { await body.findByLabelText(/Max output tokens/i), "32000", ); - // Reasoning Effort is a provider option under "Provider Configuration". - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); const effortGroup = await body.findByRole("radiogroup", { name: "Reasoning Effort", }); @@ -1192,7 +1191,7 @@ const ensureCostTrackingOpen = async (body: ReturnType) => { if (body.queryByLabelText(/^Input$/i)) { return; } - await expandSection(body, "Cost Tracking"); + await expandSection(body, "Cost tracking"); await body.findByLabelText(/^Input$/i); }; @@ -1271,7 +1270,7 @@ const ensureProviderConfigurationOpen = async ( if (body.queryByLabelText(/Max Completion Tokens/i)) { return; } - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); await body.findByLabelText(/Max Completion Tokens/i); }; @@ -1321,7 +1320,7 @@ export const OpenAIKnownModelHappyPath: Story = { ); await expect(body.getByLabelText(/Context limit/i)).toHaveValue("1050000"); - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); await expect( await body.findByLabelText(/Max Completion Tokens/i), ).toHaveValue("128000"); @@ -1384,7 +1383,7 @@ export const AnthropicKnownModelHappyPath: Story = { "128000", ); - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); const sendReasoningGroup = await body.findByRole("radiogroup", { name: "Send Reasoning", }); @@ -1409,7 +1408,7 @@ export const AnthropicHaikuKnownModelUsesThinkingBudgetNotEffort: Story = { await openAddModelForm(body, "Anthropic"); await selectKnownModel(body, "claude-haiku-4-5"); - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); // Reasoning Effort should remain empty because Haiku 4.5 uses the // thinking budget path instead of Anthropic adaptive thinking. @@ -1981,7 +1980,7 @@ export const ModelFormOpenAI: Story = { play: async ({ canvasElement }) => { const body = within(canvasElement.ownerDocument.body); await openAddModelForm(body, "OpenAI"); - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); await expect( await body.findByLabelText(/Reasoning Effort/i), ).toBeInTheDocument(); @@ -1996,7 +1995,7 @@ export const ModelFormAnthropic: Story = { play: async ({ canvasElement }) => { const body = within(canvasElement.ownerDocument.body); await openAddModelForm(body, "Anthropic"); - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); await expect( await body.findByLabelText(/Send Reasoning/i), ).toBeInTheDocument(); @@ -2011,7 +2010,7 @@ export const ModelFormGoogle: Story = { play: async ({ canvasElement }) => { const body = within(canvasElement.ownerDocument.body); await openAddModelForm(body, "Google"); - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); await expect( await body.findByLabelText(/Thinking Config Thinking Budget/i), ).toBeInTheDocument(); @@ -2026,7 +2025,7 @@ export const ModelFormOpenAICompat: Story = { play: async ({ canvasElement }) => { const body = within(canvasElement.ownerDocument.body); await openAddModelForm(body, "OpenAI-compatible"); - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); await expect( await body.findByLabelText(/Reasoning Effort/i), ).toBeInTheDocument(); @@ -2038,7 +2037,7 @@ export const ModelFormOpenRouter: Story = { play: async ({ canvasElement }) => { const body = within(canvasElement.ownerDocument.body); await openAddModelForm(body, "OpenRouter"); - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); await expect( await body.findByLabelText(/Reasoning Enabled/i), ).toBeInTheDocument(); @@ -2053,7 +2052,7 @@ export const ModelFormVercel: Story = { play: async ({ canvasElement }) => { const body = within(canvasElement.ownerDocument.body); await openAddModelForm(body, "Vercel AI Gateway"); - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); await expect( await body.findByLabelText(/Reasoning Enabled/i), ).toBeInTheDocument(); @@ -2068,7 +2067,7 @@ export const ModelFormAzure: Story = { play: async ({ canvasElement }) => { const body = within(canvasElement.ownerDocument.body); await openAddModelForm(body, "Azure OpenAI"); - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); // Azure aliases to OpenAI fields. await expect( await body.findByLabelText(/Reasoning Effort/i), @@ -2084,7 +2083,7 @@ export const ModelFormBedrock: Story = { play: async ({ canvasElement }) => { const body = within(canvasElement.ownerDocument.body); await openAddModelForm(body, "AWS Bedrock"); - await expandSection(body, "Provider Configuration"); + await expandSection(body, "Provider configuration"); // Bedrock aliases to Anthropic fields. await expect( await body.findByLabelText(/Send Reasoning/i), diff --git a/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ModelConfigFields.tsx b/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ModelConfigFields.tsx index f56ecf81be..5c253f3254 100644 --- a/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ModelConfigFields.tsx +++ b/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ModelConfigFields.tsx @@ -49,8 +49,8 @@ const unsetSelectValue = "__unset__"; const shortLabelOverrides: Record = { "cost.input_price_per_million_tokens": "Input", "cost.output_price_per_million_tokens": "Output", - "cost.cache_read_price_per_million_tokens": "Cache Read", - "cost.cache_write_price_per_million_tokens": "Cache Write", + "cost.cache_read_price_per_million_tokens": "Cache read", + "cost.cache_write_price_per_million_tokens": "Cache write", }; /** @@ -99,8 +99,8 @@ function snakeToPrettyLabel(field: FieldSchema): string { if (shortLabelOverrides[field.json_name]) { return shortLabelOverrides[field.json_name]; } - return field.json_name - .split(/[._]/) + const words = field.json_name.split(/[._]/); + return words .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) .join(" "); } diff --git a/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ModelForm.tsx b/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ModelForm.tsx index 53543797d3..43dc08ca35 100644 --- a/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ModelForm.tsx +++ b/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ModelForm.tsx @@ -129,10 +129,10 @@ export const ModelForm: FC = ({ selectedProviderState.providerConfig.allow_user_api_key), ); const formTitle = isEditing - ? "Edit Model" + ? "Edit model" : isDuplicating - ? "Duplicate Model" - : "Add Model"; + ? "Duplicate model" + : "Add model"; const formDescription = isDuplicating ? "Review the copied settings, then save to create a new model." : undefined; @@ -403,7 +403,7 @@ export const ModelForm: FC = ({ autoComplete="off" >

- {/* Model ID + Context Limit + Pricing */} + {/* Model ID + Context limit + Pricing */}
{" "} @@ -419,7 +419,7 @@ export const ModelForm: FC = ({ htmlFor={contextLimitField.id} className="inline-flex items-center gap-1 text-sm font-medium text-content-primary" > - Context Limit{" "} + Context limit{" "} * @@ -464,7 +464,7 @@ export const ModelForm: FC = ({
- {/* Usage Tracking */} + {/* Cost tracking */}