Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 76cc762

Browse filesBrowse files
committed
🤖 fix(site): tidy storybook coverage and copy on the AI settings entry points
Smaller review-pass cleanup that didn't fit the security / a11y buckets: * NavbarView.stories: pass `canViewAISettings` to every story that enumerates the `canView*` flags, including the admin default, auditor, org admin, single-org OSS admin, member, agents-only member, and the support-link stories. The new flag was missing from these stories, so the AI Settings link never appeared in Chromatic / interaction snapshots. * DeploymentDropdown: restore the braces around the early `return null;` after the multi-line condition. The braces were dropped accidentally when `canViewAISettings` was inserted into the guard. This is the only braceless multi-line `if` in the file and clashes with the local style. * Page copy: the providers list and the add-provider page both said "OpenAI, Anthropic, or Google", but the type selector only offers OpenAI, Anthropic, and Bedrock. Swap "Google" for "Amazon Bedrock" so the copy matches the form.
1 parent 5166702 commit 76cc762
Copy full SHA for 76cc762

4 files changed

+15-6Lines changed: 15 additions & 6 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx‎

Copy file name to clipboardExpand all lines: site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
3737
!canViewAIBridge &&
3838
!canViewAISettings &&
3939
!canViewHealth
40-
)
40+
) {
4141
return null;
42+
}
4243

4344
return (
4445
<DropdownMenu>
Collapse file

‎site/src/modules/dashboard/Navbar/NavbarView.stories.tsx‎

Copy file name to clipboardExpand all lines: site/src/modules/dashboard/Navbar/NavbarView.stories.tsx
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const meta: Meta<typeof NavbarView> = {
3434
canViewDeployment: true,
3535
canViewHealth: true,
3636
canViewOrganizations: true,
37+
canViewAISettings: true,
3738
canCreateChat: true,
3839
supportLinks: [],
3940
},
@@ -59,6 +60,7 @@ export const ForAuditor: Story = {
5960
canViewDeployment: false,
6061
canViewHealth: false,
6162
canViewOrganizations: false,
63+
canViewAISettings: false,
6264
},
6365
play: async ({ canvasElement }) => {
6466
const canvas = within(canvasElement);
@@ -75,6 +77,7 @@ export const ForOrgAdmin: Story = {
7577
canViewDeployment: false,
7678
canViewHealth: false,
7779
canViewOrganizations: true,
80+
canViewAISettings: false,
7881
},
7982
play: async ({ canvasElement }) => {
8083
const canvas = within(canvasElement);
@@ -90,6 +93,7 @@ export const ForSingleOrgOSSAdmin: Story = {
9093
canViewOrganizations: false,
9194
canViewConnectionLog: false,
9295
canViewAIBridge: false,
96+
canViewAISettings: false,
9397
},
9498
play: async ({ canvasElement }) => {
9599
const canvas = within(canvasElement);
@@ -106,6 +110,7 @@ export const ForMember: Story = {
106110
canViewDeployment: false,
107111
canViewHealth: false,
108112
canViewOrganizations: false,
113+
canViewAISettings: false,
109114
canCreateChat: false,
110115
},
111116
};
@@ -117,6 +122,7 @@ export const ForMemberWithAgentsAccess: Story = {
117122
canViewDeployment: false,
118123
canViewHealth: false,
119124
canViewOrganizations: false,
125+
canViewAISettings: false,
120126
canCreateChat: true,
121127
},
122128
};
@@ -139,6 +145,7 @@ export const SupportLinks: Story = {
139145
canViewDeployment: false,
140146
canViewHealth: false,
141147
canViewOrganizations: false,
148+
canViewAISettings: false,
142149
supportLinks: [
143150
{
144151
name: "This is a bug",
@@ -179,6 +186,7 @@ export const DefaultSupportLinks: Story = {
179186
canViewDeployment: false,
180187
canViewHealth: false,
181188
canViewOrganizations: false,
189+
canViewAISettings: false,
182190
supportLinks: [
183191
{ icon: "docs", name: "Documentation", target: "" },
184192
{ icon: "bug", name: "Report a bug", target: "" },
Collapse file

‎site/src/pages/AISettingsPage/ProvidersPage/AddProviderPage/AddProviderPageView.tsx‎

Copy file name to clipboardExpand all lines: site/src/pages/AISettingsPage/ProvidersPage/AddProviderPage/AddProviderPageView.tsx
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ const AddProviderPageView: React.FC = () => {
3232
<PageHeader className="pt-6 pb-0">
3333
<PageHeaderTitle>Add a provider</PageHeaderTitle>
3434
<PageHeaderSubtitle>
35-
Connect third-party LLM services like OpenAI, Anthropic, or Google.
36-
Each provider supplies models that users can select for their
37-
conversations.
35+
Connect third-party LLM services like OpenAI, Anthropic, or Amazon
36+
Bedrock. Each provider supplies models that users can select for
37+
their conversations.
3838
</PageHeaderSubtitle>
3939
</PageHeader>
4040
<div className="border border-solid p-6 rounded-lg">
Collapse file

‎site/src/pages/AISettingsPage/ProvidersPage/ProvidersPageView.tsx‎

Copy file name to clipboardExpand all lines: site/src/pages/AISettingsPage/ProvidersPage/ProvidersPageView.tsx
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ const ProvidersPageView: React.FC<ProvidersPageViewProps> = ({
4646
>
4747
<PageHeaderTitle>Providers</PageHeaderTitle>
4848
<PageHeaderSubtitle>
49-
Connect third-party LLM services like OpenAI, Anthropic, or Google.
50-
Each provider supplies models that users can select for their
49+
Connect third-party LLM services like OpenAI, Anthropic, or Amazon
50+
Bedrock. Each provider supplies models that users can select for their
5151
conversations.
5252
</PageHeaderSubtitle>
5353
</PageHeader>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.