Skip to content

Commit 3a11886

Browse files
author
Andres Aristizabal
authored
Merge pull request #2028 from redpanda-data/fix/frontend-verify
fix: remove ignored branches from frontend verification workflow
2 parents 3104f2c + 2b501ad commit 3a11886

File tree

12 files changed

+91
-83
lines changed

12 files changed

+91
-83
lines changed

.github/workflows/frontend-verify.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ on:
77
paths:
88
- "frontend/**"
99
- ".github/workflows/frontend-verify.yml"
10-
branches-ignore:
11-
- "dependabot/**"
12-
- "snyk-upgrade-**"
13-
- "gh-readonly-queue/**"
1410
pull_request:
1511
paths:
1612
- "frontend/**"
@@ -204,10 +200,10 @@ jobs:
204200
- name: Install Playwright browsers
205201
run: bun run install:chromium
206202
- name: Install Go dependencies
207-
working-directory: ../backend/cmd/api
203+
working-directory: backend/cmd/api
208204
run: go get .
209205
- name: Build Go server
210-
working-directory: ../backend/cmd/api
206+
working-directory: backend/cmd/api
211207
run: go build -v ./...
212208
- name: Log networks
213209
if: runner.debug == '1'

frontend/bun.lock

Lines changed: 41 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@
148148
"@testing-library/dom": "^10.4.1",
149149
"@testing-library/jest-dom": "^6.9.1",
150150
"@testing-library/react": "^16.3.0",
151+
"@testing-library/user-event": "^14.6.1",
151152
"@types/node": "^22.19.1",
152153
"@types/react": "^18.3.26",
153154
"@types/react-beautiful-dnd": "^13.1.8",

frontend/src/components/pages/mcp-servers/details/remote-mcp-toggle-button.test.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ vi.mock('config', () => ({
3838

3939
import { RemoteMCPToggleButton } from './remote-mcp-toggle-button';
4040

41-
const START_BUTTON_REGEX = /start/i;
42-
4341
describe('RemoteMCPToggleButton', () => {
4442
test('should stop a running MCP server from the details page', async () => {
4543
const serverId = 'server-1';
@@ -253,7 +251,7 @@ describe('RemoteMCPToggleButton', () => {
253251
);
254252

255253
await waitFor(() => {
256-
const startButton = screen.getByRole('button', { name: START_BUTTON_REGEX });
254+
const startButton = screen.getByTestId('start-mcp-server-button');
257255
expect(startButton).toBeVisible();
258256
expect(startButton).toBeDisabled();
259257
});
@@ -294,7 +292,7 @@ describe('RemoteMCPToggleButton', () => {
294292
);
295293

296294
await waitFor(() => {
297-
const startButton = screen.getByRole('button', { name: /start/i });
295+
const startButton = screen.getByRole('button', { name: 'Start' });
298296
expect(startButton).toBeVisible();
299297
expect(startButton).toBeEnabled();
300298
});

frontend/src/components/pages/secrets/create-secret-modal.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,7 @@ export const CreateSecretModal = ({ isOpen, onClose, customSecretSchema, helperT
5454
};
5555

5656
// Form type
57-
type Secret = {
58-
id: string;
59-
value: string;
60-
labels: string[];
61-
scopes: Scope[];
62-
};
57+
type Secret = z.infer<typeof finalSchema>;
6358

6459
const defaultValues: Secret = {
6560
id: '',
@@ -71,6 +66,7 @@ export const CreateSecretModal = ({ isOpen, onClose, customSecretSchema, helperT
7166
const formOpts = formOptions({
7267
defaultValues,
7368
validators: {
69+
// @ts-expect-error - Zod schema type incompatibility with @tanstack/react-form validators
7470
onChange: finalSchema,
7571
},
7672
onSubmit: async ({ value }) => {
@@ -169,8 +165,10 @@ export const CreateSecretModal = ({ isOpen, onClose, customSecretSchema, helperT
169165
<FormErrorMessage>
170166
<UnorderedList>
171167
{state.meta.errors?.map((error) => (
172-
<li key={error.path}>
173-
<Text color="red.500">{error.message}</Text>
168+
// biome-ignore lint/suspicious/noExplicitAny: error type from @tanstack/react-form is not properly typed
169+
<li key={(error as any)?.path ?? ''}>
170+
{/* biome-ignore lint/suspicious/noExplicitAny: error type from @tanstack/react-form is not properly typed */}
171+
<Text color="red.500">{(error as any)?.message ?? 'Validation error'}</Text>
174172
</li>
175173
))}
176174
</UnorderedList>

frontend/src/components/pages/secrets/update-secret-modal.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ export const UpdateSecretModal = ({ isOpen, onClose, secretId }: UpdateSecretMod
6161
.map(([key, value]) => ({ key, value }))
6262
: [{ key: '', value: '' }];
6363

64+
const updateSchema = secretSchema(z.string().optional());
65+
6466
const formOpts = formOptions({
6567
defaultValues: {
6668
id: secretId,
@@ -69,7 +71,8 @@ export const UpdateSecretModal = ({ isOpen, onClose, secretId }: UpdateSecretMod
6971
labels: existingLabels.length > 0 ? existingLabels : [],
7072
},
7173
validators: {
72-
onChange: secretSchema(z.string().optional()),
74+
// @ts-expect-error - Zod schema type incompatibility with @tanstack/react-form validators
75+
onChange: updateSchema,
7376
},
7477
onSubmit: async ({ value }) => {
7578
const labelsMap: { [key: string]: string } = {};
@@ -141,8 +144,10 @@ export const UpdateSecretModal = ({ isOpen, onClose, secretId }: UpdateSecretMod
141144
<FormErrorMessage>
142145
<UnorderedList>
143146
{state.meta.errors?.map((error) => (
144-
<li key={error.path}>
145-
<Text color="red.500">{error.message}</Text>
147+
// biome-ignore lint/suspicious/noExplicitAny: error type from @tanstack/react-form is not properly typed
148+
<li key={(error as any)?.path ?? ''}>
149+
{/* biome-ignore lint/suspicious/noExplicitAny: error type from @tanstack/react-form is not properly typed */}
150+
<Text color="red.500">{(error as any)?.message ?? 'Validation error'}</Text>
146151
</li>
147152
))}
148153
</UnorderedList>

frontend/src/components/pages/shadowlinks/edit/get-update-values-for-connection.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const baseFormValues: FormValues = {
3636
mechanism: ScramMechanism.SCRAM_SHA_256,
3737
},
3838
useTls: true,
39-
useMtls: false,
4039
mtlsMode: TLS_MODE.PEM,
4140
mtls: {
4241
ca: undefined,
@@ -51,6 +50,7 @@ const baseFormValues: FormValues = {
5150
consumers: [],
5251
aclsMode: 'all',
5352
aclFilters: [],
53+
excludeDefault: false,
5454
};
5555

5656
describe('getUpdateValuesForConnection', () => {
@@ -138,7 +138,7 @@ describe('getUpdateValuesForConnection', () => {
138138
ca: undefined,
139139
clientCert: undefined,
140140
clientKey: undefined,
141-
}
141+
},
142142
};
143143
const updated = {
144144
...baseFormValues,
@@ -147,7 +147,7 @@ describe('getUpdateValuesForConnection', () => {
147147
ca: { pemContent: 'ca-cert-content' },
148148
clientCert: undefined,
149149
clientKey: undefined,
150-
}
150+
},
151151
};
152152

153153
const result = getUpdateValuesForConnection(updated, original);
@@ -163,7 +163,7 @@ describe('getUpdateValuesForConnection', () => {
163163
ca: { pemContent: 'ca-cert-content' },
164164
clientCert: undefined,
165165
clientKey: undefined,
166-
}
166+
},
167167
};
168168
const updated = {
169169
...baseFormValues,
@@ -172,7 +172,7 @@ describe('getUpdateValuesForConnection', () => {
172172
ca: undefined,
173173
clientCert: undefined,
174174
clientKey: undefined,
175-
}
175+
},
176176
};
177177

178178
const result = getUpdateValuesForConnection(updated, original);
@@ -188,7 +188,7 @@ describe('getUpdateValuesForConnection', () => {
188188
ca: { pemContent: 'ca-cert-content' },
189189
clientCert: undefined,
190190
clientKey: undefined,
191-
}
191+
},
192192
};
193193
const updated = {
194194
...baseFormValues,
@@ -197,7 +197,7 @@ describe('getUpdateValuesForConnection', () => {
197197
ca: { pemContent: 'ca-cert-content' },
198198
clientCert: undefined,
199199
clientKey: undefined,
200-
}
200+
},
201201
};
202202

203203
const result = getUpdateValuesForConnection(updated, original);

frontend/src/react-query/api/acl.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ const useInvalidateAclsList = () => {
444444

445445
const invalid = async () => {
446446
await queryClient.invalidateQueries({
447+
// @ts-expect-error - createConnectQueryKey return type incompatibility with invalidateQueries
447448
queryKey: createConnectQueryKey({
448449
schema: ACLService,
449450
cardinality: 'finite',

frontend/src/react-query/api/remote-mcp.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,7 @@ export const createMCPClientWithSession = async (
253253
version: '1.0.0',
254254
},
255255
{
256-
capabilities: {
257-
tools: {},
258-
},
256+
capabilities: {},
259257
}
260258
);
261259

frontend/vitest.config.integration.mts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@ export default defineConfig(({ mode }) => {
3535
},
3636
server: {
3737
deps: {
38-
inline: ['katex'],
38+
inline: [
39+
'katex',
40+
'streamdown',
41+
'rehype-harden',
42+
'character-entities',
43+
'decode-named-character-reference',
44+
'parse-entities',
45+
'stringify-entities',
46+
'character-entities-html4',
47+
'character-entities-legacy',
48+
],
3949
},
4050
},
4151
alias: [

0 commit comments

Comments
 (0)