Skip to content

frontend: align strict lint and type safety - #2723

Open
malinskibeniamin wants to merge 4 commits into
masterfrom
t3/upgrade-biome-enable-rules
Open

malinskibeniamin wants to merge 4 commits into
masterfrom
t3/upgrade-biome-enable-rules

Conversation

@malinskibeniamin

@malinskibeniamin malinskibeniamin commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Upgrade Console UI to Biome 2.6.8 and Ultracite 8.1.1, enforcing types, async safety and UI policies across authored frontend sources.

flowchart LR
  UI[UI and query hooks] --> Domains[Typed API domains]
  Domains --> Transport[Existing REST and Connect transports]
  UI --> Settings[Validated persisted settings]
Loading
  • Review: 555 Biome + 50 native rules, plus CSS checks. Review API domains, persisted settings, async/federation ownership and KIP-848 compatibility. Preserve headers; fix TLS mapping and parallel secret outcomes. Generated/Registry untouched.
  • Packaging: Keep frontend/scripts tracked for downstream image builds. Rebased onto master, preserving cluster fencing, failover and the topic READ guard.
  • Review fixes: Keep unavailable Schema Registry settings readable without submitting them, preserve valid references after partial lookup failures, show errors for failed timestamp deletes, and keep the topic-list cluster-health refresh best-effort on clusters without the debug-bundle endpoint. License headers are back above imports in 74 files that the migration had reordered.
  • Verification: Lint/types, 2,129 unit + 1,720 integration + 2 federation tests, both frontend builds, and 9 bundle + 4 browser + 9 canary tests passed on 47eb142e, as did hosted downstream Enterprise E2E and the full image build. On b6b0c0b4, lint/types and the 22 affected test files pass locally (95 integration + 124 unit tests), and all hosted checks pass, including Enterprise E2E and the image build. The new topic-list regression test fails on 47eb142e.
  • Risk: Broad migration, as requested. Hosted downstream verification passed on the current head; code-owner review remains required. Rollback: revert this commit.
Recent-rule audit and explicit applicability decisions

Reviewed every published 2.6.0–2.6.8 schema and release note, including all 209 configurable additions after the repository's 2.6.2 baseline, 59 promotion events, rule options and scoped overrides. Across that wider range, 260 added configuration names comprise 259 new rules plus one rename: 128 are enabled, 119 target unused frameworks, and 13 have the explicit decisions below. No item remains unreviewed. Ultracite 8.0.2–8.1.1 changes were also checked. The KIP-848 rebase preserves master’s Members tab/sort state, Type/State filters, status-dot lifecycle tooltips and required group type/optional epoch/member fields in the typed API domain.

The 2.6.8 delta contains 25 rules: 16 enabled, seven Vue and one Drizzle rule inapplicable, and one Tailwind denylist rule deliberately off.

Rule(s) Decision
noTailwindRestrictedClasses Existing color/arbitrary-value gates own class policy; no additional denylist is adopted. Empty options would be inert.
noUnsafeReturn Enforced by stricter typed Oxlint instead.
noNull, noDynamicDelete, noMapSpread Preserve JSON/React null contracts, keyed-object removal and immutable projections.
noDisabledAttribute Preserve native activation/submission protection; ARIA alone is not equivalent.
noScssNullComparison Sass false and null are distinct.
noShortTimeValues No universal minimum is adopted; reduced-motion near-zero durations are intentional. Enabling without a minimum is inert.
useConsistentBooleanName, noDanglingUnderscore Keep established helper/state naming; no blanket naming-policy migration.
noPlaywrightNthMethods Preserve intentional positional/order assertions, not equivalent selector evasions.
useIteratorZip, usePackageJsonCpu No Iterator.zip runtime guarantee/polyfill; the browser app is CPU-architecture neutral.

The added SCSS, YAML, Markdown, forwarded-state and all 16 newly enabled 2.6.8 checks have executable positive/negative regression probes. Strengthen 99 call-only test assertions without dropping counts, negatives or completion waits. useSpyOn supports Jest/Vitest-style spellings but does not recognize bare Rstest rs.fn; the call-match rules do recognize Rstest. No new Biome JavaScript plugin is needed for existing policies. Markdown/YAML formatting and embedded Markdown code analysis stay off to preserve literal documentation/configuration examples. CSS Modules retain valid :global/:local syntax. Three secret-fixture test files retain literal ${secrets.NAME} strings through a narrowly scoped interpolation-rule exception.

Bun’s 72-hour release-age filter was overridden for this requested version only (--minimum-release-age 0); project policy remains unchanged. Frozen install passes; the version-specific OSV lookup returned no advisories. Upstream performance improvements are included, but no Console-specific speedup is claimed.

Primary references: Biome 2.6, 2.6.8 changelog, Ultracite 8.1.1 release. The schema audit also covers rules omitted from release announcement counts.

@malinskibeniamin

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @malinskibeniamin's task in 1m 7s —— View job


Review: frontend: enable biome 2.6.7 lint rules

  • Gather context (diff vs origin/master, frontend/AGENTS.md)
  • Review Biome config changes
  • Review behavioural code changes
  • Post review

I found no blocking issues. Almost all of the 95 files are mechanical (useCatchErrorName renames, forEach changed to for…of, removed ?? {} spreads, and catch {} with no binding). I checked every non-rename hunk to confirm it behaves the same as before. The notes below are mostly about readability.

✅ Behaviour changes I checked

  • topic-produce-headers.ts: this is a real bug fix. The old guard !(h.value || h.value) dropped headers that had a key but an empty value. The new !(h.key || h.value) keeps them, and the regression test covers it. Headers with an empty key and a non-empty value were already sent before this change, so that part is unchanged.
  • consumers/modals.tsx: a - b === 0 became a === b. Same result for numbers.
  • shadowlinks/create/model.ts and yaml.test.ts: .trim().startsWith(x) became .trimStart().startsWith(x). Same result, since trailing whitespace can't affect a prefix check.
  • sql-workspace.tsx: return inside forEach became continue inside for…of. Same result.
  • schema-create.tsx: the let details lookup was restructured but still re-reads after refresh. Same result.
  • visual-editor-panel.tsx, pipeline-structure-tree.tsx, connect-config-fixtures.test.ts: .filter() loops became continue guards. Same result.
  • json-utils.ts copyDenseArray: copy.length = 1.5 throws RangeError just like new Array(1.5) did, and the new test locks that in. Good.
  • get-infinite-query-states.ts: removing the as QueryObserverSuccessResult cast is correct; that cast was wrong. The function now returns a union type, but it has no callers in src/ (it's only exported). Consider deleting it rather than keeping it lint-clean.

🟡 Readability

  1. noNegatedArrayPredicate makes 13 call sites harder to read. The autofix turns !xs.some(x => a === b) into xs.every(x => !(a === b)). Simple equality checks should be written as !==. For example, in schema-context-select.tsx:51:
    options.every((o) => !(o.value === value))   // current
    options.every((o) => o.value !== value)      // clearer
    The same pattern is in yaml.ts, sql-types.ts, schema-list.tsx, use-principal-list.ts (×2), use-role-membership.ts, and lint-rules/test-code.ts:207. For compound predicates (deprecation.ts, pipeline-flow-parser.ts, and the 4 debugBundleStatuses sites in backend-api.ts), !(a && b) is arguably worse than the original !some(...). Since this is a nursery rule, consider setting it to warn/off instead of accepting the rewrites. Fix this →
  2. useCatchErrorName creates error_ names in error-boundary.tsx and login.tsx:122 because an outer error is in scope. It works, but the trailing underscore is easy to misread. Something like decodeError or loginError would be clearer, if the rule's options allow it.
  3. rest-interfaces.ts RedpandaLicense: collapsing 'console' | 'cluster' | string to string drops the documentation and autocomplete hint. If you want to keep the hint, 'console' | 'cluster' | (string & {}) is the usual idiom. Check whether noRedundantTypeConstituents accepts it.
  4. copyDenseArray: setting length and then calling fill is a bit indirect. Keeping new Array(length).fill(null) with a targeted biome-ignore would read better, but this is minor.

🟢 Config and suppressions

  • The noSyncMethods ignore list is narrow and has a comment explaining it. Turning the rule off for scripts and tests makes sense.
  • The biome-ignore comments added in page.ts (useAccessorPairs), login.tsx (noMismatchedMapKey, which looks like a false positive), consumer-group.tsx/topic.tsx (noTanstackQueryRestDestructuring), and global-setup.mjs (useAtomicUpdates) all give a reason, as frontend/AGENTS.md requires.
  • The new tests/biome.test.ts cases cover one example each for the rules that would fail and the code that should pass. Good.
  • bun.lock and yarn.lock are both updated consistently for the 2.6.7 bump.

Not done

I only read the code. I did not run lint, type-check or tests in this job; I relied on the checks listed in the PR description.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🚨 Registry drift detected

App: frontend · Scope: diff vs origin/master · Files: 959

Count
⚠️ Outdated registry components 62
🛠 Locally-modified components 1
❓ Unknown to registry 6
🎨 Off-token palette colours 0
🔢 Ad-hoc utility classes 0
Components needing attention
Status Component Uses Detail
⚠️ outdated accordion 8× installed 4.2.3 → latest 8.2.0
⚠️ outdated alert 74× installed 4.2.3 → latest 8.2.0
⚠️ outdated alert-dialog 8× installed 4.2.3 → latest 8.2.0
⚠️ outdated avatar 1× installed 4.2.3 → latest 8.2.0
⚠️ outdated badge 44× installed 4.2.3 → latest 8.2.0
⚠️ outdated badge-group 5× installed 5.1.0 → latest 8.2.0
⚠️ outdated breadcrumb 1× installed 4.2.3 → latest 8.2.0
⚠️ outdated button 210× installed 4.2.3 → latest 8.2.0
⚠️ outdated calendar 1× installed 4.2.3 → latest 8.2.0
⚠️ outdated card 35× installed 4.2.3 → latest 8.2.0
⚠️ outdated chart 2× installed 4.2.3 → latest 8.2.0
⚠️ outdated checkbox 17× installed 4.2.3 → latest 8.2.0
❓ unknown-to-registry choicebox 4× not in registry manifest
⚠️ outdated code-block 10× installed 4.2.3 → latest 8.2.0
❓ unknown-to-registry code-block-dynamic 8× not in registry manifest
⚠️ outdated combobox 10× installed 4.2.1 → latest 8.2.0
⚠️ outdated command 4× installed 4.2.3 → latest 8.2.0
⚠️ outdated copy-button 12× installed 4.2.3 → latest 8.2.0
⚠️ outdated count-dot 4× installed 4.2.3 → latest 8.2.0
⚠️ outdated data-table 40× installed 5.1.0 → latest 8.2.0
⚠️ outdated data-table-filter 1× installed 4.2.3 → latest 8.2.0
⚠️ outdated dialog 44× installed 4.2.3 → latest 8.2.0
⚠️ outdated drawer 1× installed 4.2.3 → latest 8.2.0
⚠️ outdated dropdown-menu 15× installed 4.2.3 → latest 8.2.0
⚠️ outdated dropzone 2× installed 4.2.1 → latest 8.2.0
⚠️ outdated empty 24× installed 4.2.3 → latest 8.2.0
⚠️ outdated field 30× installed 4.2.3 → latest 8.2.0
⚠️ outdated form 35× installed 5.1.0 → latest 8.2.0
❓ unknown-to-registry group 6× not in registry manifest
❓ unknown-to-registry highlighted-input 1× not in registry manifest
⚠️ outdated icons 3× installed 5.1.0 → latest 8.2.0
⚠️ outdated input 85× installed 4.2.1 → latest 8.2.0
⚠️ outdated input-group 1× installed 4.2.3 → latest 8.2.0
⚠️ outdated item 4× installed 4.2.3 → latest 8.2.0
⚠️ outdated kbd 5× installed 4.2.3 → latest 8.2.0
⚠️ outdated key-value-field 3× installed 4.2.1 → latest 8.2.0
⚠️ outdated label 31× installed 4.2.3 → latest 8.2.0
⚠️ outdated list-layout 10× installed 4.2.3 → latest 8.2.0
❓ unknown-to-registry listbox 1× not in registry manifest
⚠️ outdated multi-select 8× installed 4.2.3 → latest 8.2.0
⚠️ outdated popover 14× installed 4.2.3 → latest 8.2.0
⚠️ outdated progress 3× installed 5.1.0 → latest 8.2.0
⚠️ outdated radio-group 8× installed 4.2.3 → latest 8.2.0
⚠️ outdated redpanda-logo 4× installed 5.1.0 → latest 8.2.0
⚠️ outdated resizable 4× installed 4.2.3 → latest 8.2.0
⚠️ outdated select 27× installed 4.2.3 → latest 8.2.0
⚠️ outdated separator 14× installed 5.1.0 → latest 8.2.0
⚠️ outdated sheet 3× installed 4.2.3 → latest 8.2.0
⚠️ outdated sidebar 3× installed 4.2.3 → latest 8.2.0
⚠️ outdated skeleton 29× installed 5.1.0 → latest 8.2.0
⚠️ outdated slider 4× installed 4.2.3 → latest 8.2.0
❓ unknown-to-registry sonner 2× not in registry manifest
⚠️ outdated spinner 32× installed 5.1.0 → latest 8.2.0
⚠️ outdated stat 8× installed 4.2.3 → latest 8.2.0
⚠️ outdated status-badge 5× installed 5.1.0 → latest 8.2.0
⚠️ outdated status-dot 3× installed 5.1.0 → latest 8.2.0
⚠️ outdated stepper 2× installed 4.2.3 → latest 8.2.0
⚠️ outdated switch 11× installed 4.2.3 → latest 8.2.0
⚠️ outdated table 32× installed 4.2.3 → latest 8.2.0
🛠 locally-modified tabs 24× no tagged release matches installed bytes
⚠️ outdated tags 3× installed 4.2.1 → latest 8.2.0
⚠️ outdated textarea 5× installed 4.2.3 → latest 8.2.0
⚠️ outdated theme 1× installed 5.1.0 → latest 8.2.0
⚠️ outdated theme-provider 4× installed 5.1.0 → latest 8.2.0
⚠️ outdated toast 5× installed 4.2.3 → latest 8.2.0
⚠️ outdated toggle-group 11× installed 4.2.3 → latest 8.2.0
⚠️ outdated tooltip 55× installed 4.2.3 → latest 8.2.0
⚠️ outdated typography 48× installed 4.2.3 → latest 8.2.0
⚠️ outdated waiting-redpanda 1× installed 5.1.0 → latest 8.2.0

Refresh command:

bunx shadcn@latest add @redpanda/accordion @redpanda/alert @redpanda/alert-dialog @redpanda/avatar @redpanda/badge @redpanda/badge-group @redpanda/breadcrumb @redpanda/button @redpanda/calendar @redpanda/card @redpanda/chart @redpanda/checkbox @redpanda/code-block @redpanda/combobox @redpanda/command @redpanda/copy-button @redpanda/count-dot @redpanda/data-table @redpanda/data-table-filter @redpanda/dialog @redpanda/drawer @redpanda/dropdown-menu @redpanda/dropzone @redpanda/empty @redpanda/field @redpanda/form @redpanda/icons @redpanda/input @redpanda/input-group @redpanda/item @redpanda/kbd @redpanda/key-value-field @redpanda/label @redpanda/list-layout @redpanda/multi-select @redpanda/popover @redpanda/progress @redpanda/radio-group @redpanda/redpanda-logo @redpanda/resizable @redpanda/select @redpanda/separator @redpanda/sheet @redpanda/sidebar @redpanda/skeleton @redpanda/slider @redpanda/spinner @redpanda/stat @redpanda/status-badge @redpanda/status-dot @redpanda/stepper @redpanda/switch @redpanda/table @redpanda/tags @redpanda/textarea @redpanda/theme @redpanda/theme-provider @redpanda/toast @redpanda/toggle-group @redpanda/tooltip @redpanda/typography @redpanda/waiting-redpanda --overwrite

Generated by lookout audit-changes.

@malinskibeniamin

Copy link
Copy Markdown
Contributor Author

Note

🤖 GPT-6.1 Sol responding on behalf of malinskibeniamin

Addressed the readability feedback in 20ecb39cb:

  • Simplified equality-only predicates to !== and restored license wire-value examples in comments. All 69 additional rules remain errors; the license fields still accept open strings without a string & {} workaround.
  • Kept the remaining compound predicates grouped and the naming rule strict. The shadow-safe error_ names avoid adding naming allowlists.
  • Kept explicit array-length assignment to preserve RangeError without another suppression. Unused-helper deletion and pre-existing registry drift remain outside this tooling upgrade.

Fresh lint:fix, application/test type checks, the full unit/integration/federation suite, and both production builds pass.

@malinskibeniamin
malinskibeniamin marked this pull request as ready for review November 12, 2026 11:49
@malinskibeniamin
malinskibeniamin force-pushed the t3/upgrade-biome-enable-rules branch from 20ecb39 to 9b10b4b Compare November 12, 2026 13:27
@malinskibeniamin

Copy link
Copy Markdown
Contributor Author

Note

🤖 GPT-6.1 Sol responding on behalf of malinskibeniamin

Addressed all code-review findings in 9b10b4b68, superseding the earlier dispositions:

  • Simplified equality and compound predicates; contextual catch names use a narrow five-name allowlist. All 69 additional nursery rules remain errors.
  • Restored open license literal unions. A TypeScript completion probe confirms the known values remain suggested and unknown future values still compile.
  • Restored the clearer array constructor with a targeted suppression; the fractional-index RangeError regression still passes.
  • Deleted the unused query-state helper after repository-wide symbol and module-path searches found no consumers.

Also upgraded Ultracite to 8.1.1, removed its obsolete patch, and aligned Oxlint/Node compatibility. Fresh frozen install, doctor, lint, application/test types, full unit/integration/federation suite, and both production builds pass; existing lint warnings remain.

The advisory registry audit reports pre-existing upstream version drift, with no local registry edits. Registry refreshes remain outside this tooling PR, consistent with root AGENTS.md.

@malinskibeniamin malinskibeniamin self-assigned this Nov 12, 2026

@malinskibeniamin malinskibeniamin left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated /review: 2 finding(s).

Comment thread frontend/package.json Resolved
@malinskibeniamin
malinskibeniamin force-pushed the t3/upgrade-biome-enable-rules branch from 9b10b4b to 23b8c72 Compare November 15, 2026 17:41
@malinskibeniamin malinskibeniamin changed the title frontend: enable biome 2.6.7 lint rules frontend: align strict lint and type safety Nov 15, 2026
@malinskibeniamin
malinskibeniamin force-pushed the t3/upgrade-biome-enable-rules branch 4 times, most recently from ab122f4 to c466543 Compare November 16, 2026 15:07

@malinskibeniamin malinskibeniamin left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated /review: 3 finding(s).

@malinskibeniamin
malinskibeniamin force-pushed the t3/upgrade-biome-enable-rules branch from c466543 to 8f788d1 Compare November 18, 2026 03:11
Make unsafe values, detached promises, and inconsistent UI styling fail
frontend checks rather than reach runtime. Upgrade Biome to 2.6.8 and
Ultracite to 8.1.1, align Oxlint's runner and plugin types, and enforce
warning-free typed, syntax, and CSS policies.

Migrate affected consumers and extract legacy API domains without
changing the transport or host contracts. Validate persisted settings,
preserve numeric fallback and message semantics, and retain the legacy
federation default exports. Map controlplane TLS certificates explicitly
instead of asserting incompatible messages into the wire schema.

Review new and promoted rules across Biome 2.6 and the Ultracite
upgrade. Include authored UI helpers, Sass, YAML and Markdown without
formatting literal documentation examples. Record contract and runtime
exclusions explicitly, and add the forwarded-effect state guard. Enable
the relevant 2.6.8 rules and strengthen call assertions with expected
arguments. Await every parallel secret-creation outcome rather than only
the latest mutation callback.

Keep generated and registry sources unchanged. Cover API failures,
ordered asynchronous work, persistence, and public exports with
regression tests and exercise real production bundles in native
browsers.
@malinskibeniamin
malinskibeniamin force-pushed the t3/upgrade-biome-enable-rules branch from 8f788d1 to 9d6b393 Compare November 21, 2026 14:01
@malinskibeniamin

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @malinskibeniamin's task in 58s —— View job


Review: frontend: align strict lint and type safety

  • Gather context (diff vs origin/master: 1 commit, 1,011 files, +40.7k/−30.1k)
  • Re-check open findings from the 2026-11-17 review
  • Spot-check the new API domain and contract code
  • Post review

Verdict: not ready to merge. The three findings from the 2026-11-17 automated review are still in the code at 9d6b393. I checked each against the backend source, and all three still apply. Fixed findings from earlier rounds stay fixed.

🔴 Still open

1. P1: the Schema Registry contract rejects "UNKNOWN". See frontend/src/api/schema-registry-contract.ts:6,16.
The backend sends the sentinel unknownSRConfigResponse = "UNKNOWN" whenever a mode or compatibility lookup fails (backend/pkg/console/schema_registry.go:62, returned at :592 and :609). The *WithDefaultSchema unions accept only the real values plus DEFAULT. Because of that, both of these now throw:

  • subjectDetailsSchema.parse (react-query/api/schema-registry.tsx:145)
  • parseRegistryContexts (:61)

Before this PR the UI showed "UNKNOWN" in that case. With this PR, a registry without per-subject /mode, a user without config read access, or a transient error breaks:

  • the subject details, edit-mode and edit-compatibility pages
  • the whole contexts query, and with it the schema list and the context pickers
export const registryModeWithDefaultSchema = registryModeSchema.or(z.enum(['DEFAULT', 'UNKNOWN']));
export const registryCompatibilityWithDefaultSchema = registryCompatibilitySchema.or(z.enum(['DEFAULT', 'UNKNOWN']));

Then widen the matching TS types and add a regression case to schema-registry-contract.test.ts. Fix this →

2. P2: usages: null breaks the whole "referenced by" query. See schema-registry-contract.ts:55.
SchemaReference.Usages has no omitempty (schema_registry.go:667). When a lookup fails, the entry has Error set and a nil Usages, which serializes as "usages": null. .optional().default([]) does not accept null, so referencedBySchema.parse (schema-registry.tsx:573) throws before the error-entry filter runs. One failed lookup then hides every other reference.

usages: z.array(usageSchema).nullish().transform((u) => u ?? []),

Fix this →

3. P2: a failed delete-by-timestamp on one partition fails silently. See DeleteRecordsModal/delete-records-modal.tsx:777-780.
When the request fails, api.deleteTopicRecords resolves to undefined: legacy-topics.ts:152 calls addError and returns nothing. The new if (result) guard then skips onResponse, so handleFinish never shows the "not allowed to delete records" error, and the dialog just stops its spinner. The sibling branches at :545, :557 and :563 call onResponse(await …) unconditionally, as master did.

onResponse(await api.deleteTopicRecords(topicName, partitionOffset, specifiedPartition));
return;

Fix this →

✅ Checked and fine

  • topic-produce-headers.ts: if (h.value.length === 0) continue; drops the same rows as master's !(h.value || h.value). The P2 from 11-12 is fixed.
  • user-permissions.ts identityUserData: I compared every flag with master's backend-api.ts:691-714 and they match. The only difference is that a missing permissions now gives false where it used to give undefined. Both are falsy, so nothing changes.
  • legacy-topics.ts delete helpers: the "no partitions" behaviour (addError, then return undefined) is the same as before.

Not done

  • I couldn't review all 1,011 files in this pass. backend-api.ts (−3k), index.scss, and the rp-connect pipeline/YAML rewrites were not read line by line.
  • I did not run lint, type checks or tests. Every finding above comes from reading the frontend and backend source.

@malinskibeniamin

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @malinskibeniamin's task in 36s —— View job


Review: frontend: align strict lint and type safety

  • Gather context (diff vs origin/master, 2 commits; new commit 47eb142 touches 8 files)
  • Re-check the 3 findings from the 2026-11-21 review
  • Spot-check the new code paths that UNKNOWN reaches
  • Post review

Verdict: all three open findings are fixed in 47eb142, and I found no new blocking issues. That commit is small and targeted, and each fix has a regression test.

✅ Previously open, now fixed

  1. P1: the Schema Registry contract rejected "UNKNOWN" (schema-registry-contract.ts:7,17). The read schemas now accept z.enum(['DEFAULT', 'UNKNOWN']) on both contextSchema and subjectDetailsSchema. They are separate from the write-side enums, so UNKNOWN can be read but never sent. SchemaRegistrySubjectDetails and SchemaRegistryContextResponse are widened to match. The mutation hooks still take *WithDefault, so the type checker blocks UNKNOWN from reaching a write.
    • edit-mode.tsx and edit-compatibility.tsx disable Save while the selection is UNKNOWN, and their click handlers also check for it. Picking a real option re-enables Save, because onValueChange only accepts values from allOptions. With no option preselected, a user can still recover by choosing one. This matches the "readable but not submittable" note in the PR description.
  2. P2: usages: null (schema-registry-contract.ts:56-59). Changed to .nullish().transform((u) => u ?? []). The test checks a mixed response (one failed entry, one valid) and confirms the valid reference survives.
  3. P2: a failed delete-by-timestamp on one partition failed silently (delete-records-modal.tsx:777). It now calls onResponse(await …) unconditionally, like the sibling branches. The new test resolves deleteTopicRecords to undefined and asserts three things: the "not allowed" error appears, the Ok button is enabled, and onFinish is not called.

🟢 Minor notes (non-blocking)

  • delete-records-modal.test.tsx: mockPartitionsFetch() uses rs.spyOn(config, 'fetch') with no explicit restore. The installFailedTimestampDelete restore only resets the store. This is fine if the suite restores mocks globally in afterEach; if it doesn't, the spy leaks into later tests in the file.
  • SchemaRegistrySubjectDetails['mode'] now also serves as the type for "context mode for reads". A named alias such as SchemaRegistryModeRead would show the read/write split more clearly than an indexed access type, but this is cosmetic.

✅ Still fine from earlier rounds

topic-produce-headers.ts drops empty-value rows as master did, the oxlint and @oxlint/plugins versions are aligned, and identityUserData flags still match master.

Not done

  • I couldn't run the tests. I tried bun run test:file:unit on the two changed test files, but dependencies weren't installed in this job (Cannot find module '@happy-dom/global-registrator'). Everything above comes from reading the code. CI and the PR description's verification cover the full suite.
  • As before, this pass did not re-read every file in the 1,011-file migration line by line. It focused on the delta since the last review and on the code paths UNKNOWN reaches.

@malinskibeniamin malinskibeniamin left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated /review: 1 finding(s).

malinskibeniamin and others added 2 commits November 25, 2026 19:52
GetClusterHealth is only served when the Redpanda Admin API backs the
debug-bundle service. On OSS builds and Kafka clusters every topic-list
refresh, including the one after a successful delete, showed an
"Action failed" toast. Match the overview, topic details and create
dialog callers, which already treat this refresh as best-effort.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lint migration inserted imports above the license header in 74
files. Move them back below the header; import order and module
evaluation order are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant