messere1 opened a new pull request, #6730: URL: https://github.com/apache/rocketmq-dashboard/pull/6730
### Brief Description `tsc -b` — the first step of `npm run build`, which the Frontend Build CI job runs — currently **fails on the rocketmq-studio tip**: ``` src/pages/ops/__tests__/auditRiskInsights.test.ts(193,23): error TS2322: Type 'null' is not assignable to type 'string | undefined'. src/pages/ops/__tests__/auditRiskInsights.test.ts(195,23): error TS2322: Type 'null' is not assignable to type 'string | undefined'. ``` #6367 (merged today) pinned the missing-operator grouping with rows built as `operator: null`, while `AuditRecord.operator` / `AuditRiskRecord.operator` are declared as bare `string`. The test models the shape the model itself defends against — #6367's grouping fix is built on `record.operator?.trim() || null` and `normalizeText(record.operator, 'system')` — and the backing server column is a nullable Java `String` (`RmqOperationAudit.operator`), so the honest repair is the type, not the test: both interfaces now declare `operator: string | null`. Every existing consumer is already null-safe (the audit table sorts with `(a.operator ?? '')`, the model uses `.trim()` behind `?.`, and antd renders a null cell empty), so the widening only makes the compiler agree with what the code already handles — and unblocks the Frontend Build check for every open PR against the tip. ### How Did You Test This Change? - **Red on unpatched tip**: `npx tsc -b` in `web/` reports the two TS2322 errors above (verified on a clean checkout of 816dcb64). **Green after**: `tsc -b` completes with no output. - `auditRiskInsights.test.ts` + `AuditRiskInsights.test.tsx` 16/16 green (the #6367 grouping test passes unchanged at runtime — vitest never type-checked it, which is why the breakage only surfaced in the build job). - eslint and Prettier clean on both touched files. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
