Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: normalize casing on UI titles & labels #398

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('App', () => {
)

const workspaceSelectionButton = screen.getByRole('button', {
name: 'Active workspace default',
name: 'Active workspace: default',
})
await waitFor(() => expect(workspaceSelectionButton).toBeVisible())

Expand Down
2 changes: 1 addition & 1 deletion src/components/Error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function ErrorFallbackContent() {
rel="noopener noreferrer"
target="_blank"
>
Github issues
GitHub issues
<LinkExternal02 />
</LinkButton>,
]}
Expand Down
6 changes: 3 additions & 3 deletions src/constants/empty-state-strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ export const emptyStateStrings = {
body: {
loading: 'Checking for the latest messages.',
errorDesc:
'Please try refreshing the page. If this issue persists, please let us know on Discord, or open a a new Github Issue',
'Please try refreshing the page. If this issue persists, please let us know on Discord, or open a a new GitHub issue.',
getStartedDesc: 'Learn how to get started with CodeGate in your IDE.',
tryChangingSearch: 'Try changing your search query or clearing the search.',
messagesWillShowUpWhenWorkspace:
'Messages will show up here when they are detected for this workspace.',
messagesDesc:
'Messages are issues that CodeGate has detected and mitigated in your interactions with the LLM.',
secretsDesc:
'CodeGate helps you protect sensitive information from being accidentally exposed to AI models and third-party AI provider systems by redacting detected secrets from your prompts using encryption.',
'CodeGate helps you protect sensitive information from being accidentally exposed to AI models and third-party AI provider systems by redacting detected secrets from your prompts.',
piiDesc:
'CodeGate helps you protect sensitive personally identifiable information (PII) from being accidentally exposed to AI models and third-party AI provider systems by redacting detected PII from your prompts using encryption.',
'CodeGate helps you protect sensitive personally identifiable information (PII) from being accidentally exposed to AI models and third-party AI provider systems by redacting detected PII from your prompts.',
maliciousDesc:
"CodeGate's dependency risk insight helps protect your codebase from malicious or vulnerable dependencies. It identifies potentially risky packages and suggests fixed versions or alternative packages to consider.",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const TEST_CASES: TestCase[] = [
actions: [
{
role: 'link',
name: 'Learn about Workspaces',
name: 'Learn about workspaces',
href: hrefs.external.docs.workspaces,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function SectionConversationSecrets({
<p className="mb-2">
CodeGate helps you protect sensitive information from being accidentally
exposed to AI models and third-party AI provider systems by redacting
detected secrets from your prompts using encryption.
detected secrets from your prompts.
</p>
<p className="mb-2">
The following secrets were detected in plain-text in the input provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function EmptyStateNoMessagesInWorkspace() {
target="_blank"
rel="noopener noreferrer"
>
Learn about Workspaces
Learn about workspaces
<LinkExternal02 />
</LinkButton>,
]}
Expand Down Expand Up @@ -151,7 +151,7 @@ export function EmptyStateError() {
rel="noopener noreferrer"
target="_blank"
>
Github issues
GitHub issues
<LinkExternal02 />
</LinkButton>,
]}
Expand Down
2 changes: 1 addition & 1 deletion src/features/dashboard-messages/lib/get-provider-string.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function getProviderString(provider: string | null): string {
switch (provider) {
case 'copilot':
return 'Github Copilot'
return 'GitHub Copilot'
case null:
return 'Unknown provider'
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function HeaderActiveWorkspaceSelector() {
return (
<DialogTrigger isOpen={isOpen} onOpenChange={(test) => setIsOpen(test)}>
<Button variant="tertiary" className="flex cursor-pointer">
Active workspace{' '}
Active workspace:{' '}
<span className="font-bold">{activeWorkspaceName ?? 'default'}</span>
<ChevronDown />
</Button>
Expand Down Expand Up @@ -131,7 +131,7 @@ export function HeaderActiveWorkspaceSelector() {
className="mt-2 flex h-10 justify-start gap-2 pl-2 text-secondary"
>
<Settings01 />
Manage Workspaces
Manage workspaces
</LinkButton>
</div>
</Popover>
Expand Down
4 changes: 2 additions & 2 deletions src/features/header/constants/help-menu-items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ export const HELP_MENU_ITEMS = [
{
icon: <Continue />,
id: 'continue-setup',
href: 'https://docs.codegate.ai/how-to/use-with-continue',
href: 'https://docs.codegate.ai/integrations/continue',
textValue: 'Use with Continue',
target: '_blank',
},
{
icon: <Copilot />,
id: 'copilot-setup',
href: 'https://docs.codegate.ai/how-to/use-with-copilot',
href: 'https://docs.codegate.ai/integrations/copilot',
textValue: 'Use with Copilot',
target: '_blank',
},
Expand Down
2 changes: 1 addition & 1 deletion src/features/providers/components/provider-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function ProviderForm({ provider, setProvider }: Props) {
validationBehavior="aria"
onChange={(description) => setProvider({ ...provider, description })}
>
<Label>Description (Optional)</Label>
<Label>Description (optional)</Label>
<Input
placeholder="Provider description"
value={provider.description}
Expand Down
2 changes: 1 addition & 1 deletion src/features/providers/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { match } from 'ts-pattern'
export const PROVIDER_AUTH_TYPE_MAP = {
[ProviderAuthType.NONE]: 'None',
[ProviderAuthType.PASSTHROUGH]: 'Passthrough',
[ProviderAuthType.API_KEY]: 'API Key',
[ProviderAuthType.API_KEY]: 'API key',
}

export function getAuthTypeOptions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test('renders muxing model', async () => {
expect(screen.getByText(/model muxing/i)).toBeVisible()
expect(
screen.getByText(
/select the model you would like to use in this workspace. This section applies only if you are using the MUX endpoint./i
/Select the model\(s\) to use in this workspace. This section applies only if you are using the mux endpoint./i
)
).toBeVisible()
expect(
Expand Down
2 changes: 1 addition & 1 deletion src/features/workspace/components/archive-workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function ArchiveWorkspace({
<Card className={twMerge(className, 'shrink-0')}>
<CardBody className="flex items-center justify-between">
<div>
<Text className="text-primary">Archive Workspace</Text>
<Text className="text-primary">Archive workspace</Text>
<Text className="mb-0 flex items-center text-balance text-secondary">
Archiving this workspace removes it from the main workspaces list,
though it can be restored if needed.
Expand Down
12 changes: 6 additions & 6 deletions src/features/workspace/components/workspace-muxing-model.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function WorkspaceMuxingModel({
return (
<Card className={twMerge(className, 'shrink-0')}>
<CardBody className="flex flex-col gap-2">
<Text className="text-primary">Model Muxing</Text>
<Text className="text-primary">Model muxing</Text>
<MissingProviderBanner />
</CardBody>
</Card>
Expand All @@ -214,10 +214,10 @@ export function WorkspaceMuxingModel({
<Card className={twMerge(className, 'shrink-0')}>
<CardBody className="flex flex-col gap-6">
<div className="flex flex-col justify-start">
<Text className="text-primary">Model Muxing</Text>
<Text className="text-primary">Model muxing</Text>
<Text className="mb-0 flex items-center gap-1 text-balance text-secondary">
Select the model you would like to use in this workspace. This
section applies only if you are using the MUX endpoint.
Select the model(s) to use in this workspace. This section applies
only if you are using the mux endpoint.
<Link
variant="primary"
className="flex items-center gap-1 no-underline"
Expand All @@ -232,7 +232,7 @@ export function WorkspaceMuxingModel({
<div className="flex w-full flex-col gap-2">
<div className="flex gap-2">
<div className="w-12">&nbsp;</div>
<div className="w-2/5">Request Type</div>
<div className="w-2/5">Request type</div>
<div className="w-full">
<Label id="filter-by-label-id" className="flex items-center">
Filter by
Expand Down Expand Up @@ -282,7 +282,7 @@ export function WorkspaceMuxingModel({
onPress={addRule}
isDisabled={isArchived}
>
<Plus /> Add Filter
<Plus /> Add filter
</Button>

<LinkButton className="w-fit" variant="tertiary" href="/providers">
Expand Down
6 changes: 3 additions & 3 deletions src/routes/route-certificate-security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ export function RouteCertificateSecurity() {
<PageContainer className="max-w-4xl">
<Breadcrumbs>
<BreadcrumbHome />
<Breadcrumb>Certificate Security</Breadcrumb>
<Breadcrumb>Certificate security</Breadcrumb>
</Breadcrumbs>

<PageHeading title="Certificate Security" level={1} />
<PageHeading title="Certificate security" level={1} />

<Card className="mb-8">
<CardBody>
<div className="mb-4 flex justify-center">
<SecurityShieldIcon />
</div>
<h2 className="mb-4 text-xl font-semibold">
Robust Certificate Security
Robust certificate security
</h2>
<p className="mb-4 text-secondary">
Security is a top priority for us. We have designed CodeGate's local
Expand Down
2 changes: 1 addition & 1 deletion src/routes/route-provider-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function RouteProviderCreate() {
}

return (
<ProviderDialog title="Add Provider">
<ProviderDialog title="Add provider">
<Form
onSubmit={handleSubmit}
validationBehavior="aria"
Expand Down
2 changes: 1 addition & 1 deletion src/routes/route-provider-update.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function RouteProviderUpdate() {
if (provider === undefined) return

return (
<ProviderDialog title="Manage Provider">
<ProviderDialog title="Manage provider">
<Form
onSubmit={handleSubmit}
validationBehavior="aria"
Expand Down
2 changes: 1 addition & 1 deletion src/routes/route-providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function RouteProvider({ className }: { className?: string }) {
</Breadcrumbs>
<PageHeading level={4} title="Providers">
<LinkButton className="w-fit" href="/providers/new">
<PlusSquare /> Add Provider
<PlusSquare /> Add provider
</LinkButton>
</PageHeading>
<Card className={twMerge(className, 'shrink-0')}>
Expand Down
6 changes: 3 additions & 3 deletions src/routes/route-workspace-creation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export function RouteWorkspaceCreation() {
<PageContainer>
<Breadcrumbs>
<BreadcrumbHome />
<Breadcrumb href="/workspaces">Manage Workspaces</Breadcrumb>
<Breadcrumb>Create Workspace</Breadcrumb>
<Breadcrumb href="/workspaces">Manage workspaces</Breadcrumb>
<Breadcrumb>Create workspace</Breadcrumb>
</Breadcrumbs>

<PageHeading level={1} title="Create Workspace" />
<PageHeading level={1} title="Create workspace" />
<WorkspaceCreation />
</PageContainer>
)
Expand Down
4 changes: 2 additions & 2 deletions src/routes/route-workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export function RouteWorkspace() {
<PageContainer>
<Breadcrumbs>
<BreadcrumbHome />
<Breadcrumb href="/workspaces">Manage Workspaces</Breadcrumb>
<Breadcrumb>Workspace Settings</Breadcrumb>
<Breadcrumb href="/workspaces">Manage workspaces</Breadcrumb>
<Breadcrumb>Workspace settings</Breadcrumb>
</Breadcrumbs>

<PageHeading level={1} title={`Workspace settings for ${name}`}>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/route-workspaces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export function RouteWorkspaces() {
<PageContainer>
<Breadcrumbs>
<BreadcrumbHome />
<Breadcrumb>Manage Workspaces</Breadcrumb>
<Breadcrumb>Manage workspaces</Breadcrumb>
</Breadcrumbs>

<PageHeading level={1} title="Manage Workspaces">
<PageHeading level={1} title="Manage workspaces">
<div className="flex gap-2">
<WorkspaceUploadButton />
<TooltipTrigger delay={0}>
Expand Down
Loading