Skip to content

frontend: enable landmines and ultracite 8.3 - #2731

Open
malinskibeniamin wants to merge 71 commits into
masterfrom
t3/enable-landmines-ultracite
Open

malinskibeniamin wants to merge 71 commits into
masterfrom
t3/enable-landmines-ultracite

Conversation

@malinskibeniamin

@malinskibeniamin malinskibeniamin commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Why

Keep low-value tests and test doubles from giving false confidence. Enforce the same rules locally and in CI, regardless of editor or AI tool.

Changes

  • Upgrades to Ultracite 8.3.0 and enables all ten Landmines rules as errors alongside existing Console policy.

  • Colocates tests and consolidates redundant cases. Schema, shadow-link, and federation tests exercise real UI and transport behavior with typed Connect and strict, test-only MSW handlers.

  • Federation has no Landmines findings. Its tests cover token refresh, host routing, cluster switches, cache teardown, and stale callbacks after unmount. Removing the route unsubscribe made the teardown test fail.

  • Removes return annotations TypeScript infers identically. The earlier batch preserved emitted JavaScript for 293 files. Useful protocol and host integration notes remain as public API docs. Compile-time equality checks verified the public mapper and schema shapes after moving type checks to data construction.

  • Partition-reassignment logic has no Landmines findings. Replica ranking and progress semantics are documented at their public boundaries; tests observe diagnostics without replacing them.

  • YAML and stop-condition utilities now pass Landmines. Pipeline lint tests use the real hook and typed Connect replies; removing either the blank-input guard or invalid-config handling makes them fail.

  • The pipeline inspector, graph parser, and layout now pass Landmines. No graph behavior or test coverage was removed.

  • Removes redundant narration, stale source comments, and an entirely commented-out transform example. Retains API contracts as public docs and keeps existing Biome directives active. Comment-only passes preserve emitted JavaScript. Reviewed truncated comment groups: retained recovery and data-integrity rationale in API docs or warnings, and removed fragments already explained by the code or test name. A follow-up removed whole blocks of redundant test narration. The source-comment pass also restored full compatibility and data-loss warnings where fragments were left behind. A follow-up repaired 107 more comment groups, preserving behavioral contracts on their public API and keeping warnings where a change could lose edits, break accessibility, or misroute requests. Syntax and compiler directives are unchanged. A further pass removed redundant comments from 59 test files, keeping the timing, compatibility, and teardown caveats that protect the existing assertions.

  • User creation and the shadow-link list now exercise typed Connect requests, real stores, routing, and toasts. The fence-list reload test fails if the first-load guard is removed.

  • Role, ACL, and permissions lists exercise actual delete confirmations, query recovery, and request payloads. Negative controls catch dropping role ACL deletion or exposing user deletion on a same-named group.

  • Pipeline onboarding now uses the real forms, typed RPC handlers, and strict MSW. Tests check topic defaults, grants, account reuse, and persisted credentials; wrong topic replication or a wrong account role makes them fail.

  • Pipeline create, view, and edit tests derive mode from real memory route matches. This removes the mode-hook stub; existing navigation and blocker doubles remain.

  • Connector validation tests use the real REST path and strict MSW. Three cases replace nine; removing the edit guard makes the saved-config test fail.

  • Live-tail tests use the real message-search hook and typed Connect streams to verify appended pages, backoff, and cancellation. Seven cases replace twelve. Removing the failure-budget reset makes the recovery test fail.

  • Pins 135 callback signatures on their typed declarations. Emitted JavaScript matches in all 70 changed files; all 967 emitted declaration files and pre-existing declaration-only diagnostics match. A follow-up moved 57 checks to the returned values or collection element types; emitted JavaScript matches across those 43 files and no newly inferred any or changed public declarations were accepted. A later pass moved 41 checks to typed values and collection builders with no runtime or public type changes.

  • Message-search tests use the real Connect client, payload conversion, and toast store. Ten cases replace fourteen and cover pagination, deadlines, cancellation, and error propagation. Removing the stale-stream guard makes the replacement-search case fail. The query-runner suite also uses real Connect requests for debounce, cancellation, and refresh. Twelve cases replace seventeen; removing the live-tail pagination override makes the request check fail.

  • Pipeline list tests exercise real config and typed draft actions; the log-search suite now exercises decoded Connect frames and the no-retry policy. Four overlapping cases were consolidated. Negative controls catch dropping the draft filter or enabling automatic log retries.

  • Shadow-link creation uses the real mutation, verifies the sent payload, and checks the success notification and list navigation. The embedded test sets a real host base path and checks window navigation; dropping the base path makes it fail.

  • A failed topic-form submission releases the in-flight guard so users can correct the form and retry. Four real-form tests replace nine mock-heavy cases. The retry test fails without the fix, and the cancellation test detects a late result being applied.

  • Notification tests use real Sonner and Registry toasts. Eight mocked lifecycle checks became three integration cases covering dismissal timers and resource-scoped updates. Broken variants produced duplicate toasts or missed the five-second dismissal and were caught by the tests.

  • Legacy message tests use decoded Connect streams for search, retry, offset changes, and oversized-record reload and download. Six behavior tests replace twelve cases across the viewer and preview suites. Removing the large-record request flag makes the reload test fail.

  • REST tests run the real fetch wrapper and topic queries against strict MSW. They verify token rotation, caller-supplied credentials, standalone requests, and mutation completion after a real configuration refetch. Negative controls caught an overwritten authorization header and an early save completion.

  • Topic creation now uses real Connect clients and strict MSW REST handlers. Thirteen cases replace eighteen while retaining validation, broker-count fallback, error, and configuration coverage. The reopen test caught a stale Kafka-only field on Redpanda; the dialog now subscribes to the refreshed distribution.

  • The Bun, Rstest, and E2E runner cleanup keeps network isolation, container readiness, and teardown constraints visible. All nine files retain the same executable syntax and directives; The E2E fixture and test comment cleanup keeps tracked skip reasons and sequencing constraints; assertions and collection are unchanged.

  • Rstest uses native Happy DOM storage and media queries; unused animation and document doubles are gone. Real storage exercises SQL history and developer mode across remounts. The isolation probe verifies MSW-served requests pass, unmatched requests fail despite a caught rejection, and storage is cleared between cases. Removing cleanup made the probe fail.

  • Connect, Shadow Link, and topic/message-viewer source pass the comment rule. Public docs and warnings retain compatibility, TLS round-tripping, recovery, and filtering constraints. SQL, consumer offset, and reassignment source also shed redundant comments; the existing reassignment Biome directive is intact. State and API cleanup keeps authorization, cache, and session contracts with their owners; existing directives are intact. Admin, connector, schema, quota, and security pages retain permission, validation, and recovery constraints. Layout, hooks, stores, and utilities retain complete rationale for layout measurement, settings persistence, and compatibility. Removed remaining fragments found in the review. Verified equivalent typed and emitted syntax and unchanged compiler/lint directives in all 256 source files.

  • The remaining production comment sweep preserves fencing, embedded startup, and degraded overview behavior. All 56 files retain equivalent typed and emitted syntax and unchanged compiler/lint directives.

  • Pipeline helpers infer return types from typed values and bindings. Compiler checks confirmed the call contracts, including readonly gateway maps and pipeline table callback types. Contextual typing preserves 32 additional arrow-function call contracts and 35 nested signatures. Explicit optional markers keep Biome's default-parameter check intact. Another 24 helpers infer from typed return values with the same call contracts and equivalent emitted behavior.

  • Wizard and schema suites use real Zustand with a test-local reset. The same 111 cases pass; omitting the reset reproduces a hydration-state leak. Removed unused Zustand and route mock helpers.

  • Build and lint tooling retain identical typed and emitted syntax.

  • Secrets Store cases exercise actual forms, routing, clipboard interactions, and Connect handlers. They verify submitted scopes and secret bytes, update with no replacement value, and delete followed by list refresh. Broken variants that dropped scopes or skipped refresh failed.

  • Cluster fence tests run the real guard, banner, source panel, and dialogs through typed RPC handlers. All 59 migrated cases pass. Negative controls catch stale outgoing revisions, including using the original revision to fence after a successful policy save.

  • Cleanup and retry tests check actual temporary-path removal, aggregation of filesystem errors, and retry timestamps. Mutations that serialize cleanup or reuse the first retry interval fail as expected.

  • Host-mode tests use real configuration, routing, secret queries, and strict MSW. Negative controls catch duplicate federated navigation events and an incorrect controlplane bearer header.

  • Reassignment scrolls to its mounted section instead of a global ID. Topic REST tests verify cache pruning and that manual record deletion sends only the selected partition’s low watermark. Negative controls caught a missing section ref and an offset of zero.

  • SQL catalog tests use actual column queries and consolidate three overlapping cases. Connector log tests open real streams through typed RPC handlers; disabling cancellation on refresh makes the old-stream assertion fail.

  • Keyboard shortcuts use the real test-environment clipboard. Login, legacy create pages, lag polling, and metrics exercise typed RPC handlers. Three overlaps were consolidated without dropping assertions.

  • ACL and role tests send actual RPCs. The YAML editor and harness tests exercise real parse refusal and live query cancellation.

  • Pipeline initialization uses real wizard state. Shadow-link edits assert the field mask sent over RPC; topic pagination follows real REST replies and refresh. Four redundant YAML cases were consolidated.

  • Consumer-group deletion now reports a real refetch failure separately from the delete result. Message tests verify focus across dock/sheet transitions and reload two same-offset records by partition.

  • The header uses real routing and per-load theme state. Topology sync reads Cloud and peer RPCs, retaining the same store value for equivalent refreshes and clearing it on unmount.

  • Pipeline navigation uses an actual router and blocker. Negative controls caught an intermediate route after saving a draft and a guard that failed to re-arm after resuming edits.

  • Chromium verifies catalog field help through the real YAML worker. E2E setup shares rollback logic, tested against real setup and cleanup failures; the enterprise authentication fixture still owns browser storage verification.

Verification

  • App and test types, Console policy, and both production frontend builds passed locally.
  • 1,880 unit, 1,509 integration, 24 Chromium component, and 2 federation runtime tests passed locally. E2E collection found 182 cases across four variants; Docker-backed E2E was not run.
  • Clean-tree lint passed locally on 0d066f713. Console policy and Landmines: 0 errors; Biome: 0 errors, 921 warnings. All ten Landmines rules remain enabled at error.
  • The registry drift notice is advisory and separate from the lint failure. The installed registry tree is byte-identical to master.

@malinskibeniamin malinskibeniamin self-assigned this Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🚨 Registry drift detected

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

Count
⚠️ Outdated registry components 59
🛠 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 68× installed 4.2.3 → latest 8.2.0
⚠️ outdated alert-dialog 6× installed 4.2.3 → latest 8.2.0
⚠️ outdated avatar 1× installed 4.2.3 → latest 8.2.0
⚠️ outdated badge 39× installed 4.2.3 → latest 8.2.0
⚠️ outdated badge-group 5× installed 5.1.0 → latest 8.2.0
⚠️ outdated banner 1× installed 4.2.3 → latest 8.2.0
⚠️ outdated breadcrumb 1× installed 4.2.3 → latest 8.2.0
⚠️ outdated button 163× installed 4.2.3 → latest 8.2.0
⚠️ outdated card 31× installed 4.2.3 → latest 8.2.0
⚠️ outdated chart 2× installed 4.2.3 → latest 8.2.0
⚠️ outdated checkbox 18× installed 4.2.3 → latest 8.2.0
❓ unknown-to-registry choicebox 4× not in registry manifest
⚠️ outdated code-block 5× installed 4.2.3 → latest 8.2.0
❓ unknown-to-registry code-block-dynamic 8× not in registry manifest
⚠️ outdated combobox 8× installed 4.2.1 → latest 8.2.0
⚠️ outdated command 4× installed 4.2.3 → latest 8.2.0
⚠️ outdated copy-button 11× installed 4.2.3 → latest 8.2.0
⚠️ outdated count-dot 4× installed 4.2.3 → latest 8.2.0
⚠️ outdated data-table 38× installed 5.1.0 → latest 8.2.0
⚠️ outdated dialog 38× installed 4.2.3 → latest 8.2.0
⚠️ outdated dropdown-menu 13× installed 4.2.3 → latest 8.2.0
⚠️ outdated dropzone 2× installed 4.2.1 → latest 8.2.0
⚠️ outdated empty 22× installed 4.2.3 → latest 8.2.0
⚠️ outdated field 25× installed 4.2.3 → latest 8.2.0
⚠️ outdated form 41× installed 5.1.0 → latest 8.2.0
❓ unknown-to-registry group 5× not in registry manifest
❓ unknown-to-registry highlighted-input 1× not in registry manifest
⚠️ outdated icons 4× installed 5.1.0 → latest 8.2.0
⚠️ outdated input 69× installed 4.2.1 → latest 8.2.0
⚠️ outdated input-group 1× installed 4.2.3 → latest 8.2.0
⚠️ outdated item 5× installed 4.2.3 → latest 8.2.0
⚠️ outdated kbd 4× installed 4.2.3 → latest 8.2.0
⚠️ outdated key-value-field 3× installed 4.2.1 → latest 8.2.0
⚠️ outdated label 25× installed 4.2.3 → latest 8.2.0
⚠️ outdated list-layout 9× installed 4.2.3 → latest 8.2.0
❓ unknown-to-registry listbox 1× not in registry manifest
⚠️ outdated multi-select 7× installed 4.2.3 → latest 8.2.0
⚠️ outdated popover 15× 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 3× installed 5.1.0 → latest 8.2.0
⚠️ outdated resizable 4× installed 4.2.3 → latest 8.2.0
⚠️ outdated select 25× installed 4.2.3 → latest 8.2.0
⚠️ outdated separator 14× installed 5.1.0 → latest 8.2.0
⚠️ outdated sheet 2× installed 4.2.3 → latest 8.2.0
⚠️ outdated sidebar 4× installed 4.2.3 → latest 8.2.0
⚠️ outdated skeleton 24× 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 26× installed 5.1.0 → latest 8.2.0
⚠️ outdated stat 9× installed 4.2.3 → latest 8.2.0
⚠️ outdated status-badge 5× installed 5.1.0 → latest 8.2.0
⚠️ outdated status-dot 2× installed 5.1.0 → latest 8.2.0
⚠️ outdated stepper 3× installed 4.2.3 → latest 8.2.0
⚠️ outdated switch 11× installed 4.2.3 → latest 8.2.0
⚠️ outdated table 23× 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 4× installed 4.2.3 → latest 8.2.0
⚠️ outdated theme-provider 7× installed 5.1.0 → latest 8.2.0
⚠️ outdated toast 5× installed 4.2.3 → latest 8.2.0
⚠️ outdated toggle-group 9× installed 4.2.3 → latest 8.2.0
⚠️ outdated tooltip 49× installed 4.2.3 → latest 8.2.0
⚠️ outdated typography 38× 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/banner @redpanda/breadcrumb @redpanda/button @redpanda/card @redpanda/chart @redpanda/checkbox @redpanda/code-block @redpanda/combobox @redpanda/command @redpanda/copy-button @redpanda/count-dot @redpanda/data-table @redpanda/dialog @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-provider @redpanda/toast @redpanda/toggle-group @redpanda/tooltip @redpanda/typography @redpanda/waiting-redpanda --overwrite

Generated by lookout audit-changes.

@malinskibeniamin
malinskibeniamin requested a review from a team November 19, 2026 14:09
@malinskibeniamin

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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


Review: frontend: prepare tests for landmines

  • Gather context (diff, renames)
  • Check for remaining .spec.ts references (scripts, CI, lint policy, configs)
  • Review deleted rstest-migration.test.ts vs new runner-dependencies.test.ts
  • Check naming/classification consistency
  • Post review

Summary: The rename is consistent. Every runner glob I checked matches the new suffixes: rstest.config.browser.ts, rstest.config.e2e-canary.ts, tests/bundle/rstest.config.ts, and e2eConfig (still rooted per test-variant-*, so **/*.e2e.test.ts doesn't pick up other variants' files). The Bun pathIgnorePatterns, tsconfig.tests.json and tsconfig.unit-tests.json were updated together with them. rstest.config.integration.ts only includes *.test.tsx and *.integration.test.ts, so it doesn't collect the new suffixes. No workflow file and no .claude/ guidance file still refers to .spec.ts. I found no blocking issues. I did not run the suites myself; this review is from reading the diff and configs.


1. A new *.spec.ts file would silently never run (medium)

After this PR there are no .spec.ts files left, but the suffix is still excluded or accepted in several places:

  • frontend/bunfig.toml:21: pathIgnorePatterns still has "**/*.spec.ts", so Bun skips it.
  • No Rstest config includes *.spec.ts any more.
  • frontend/lint-rules/test-code.ts:21 (TEST_FILE) and frontend/biome.jsonc:270 still treat .spec.* as test code, so lint gives it the relaxed test rules.

If someone, or a Playwright-trained agent, adds foo.spec.ts, it type-checks and lints cleanly but runs under no runner, and nothing fails. Given the goal of avoiding landmines, I'd close this off. Either:

  • add a policy assertion that no frontend/{src,tests}/**/*.spec.ts exists (it fits in runner-dependencies.test.ts or lint-policy.test.ts), or
  • drop **/*.spec.ts from Bun's pathIgnorePatterns, so a stray spec gets picked up by Bun and fails loudly on Rstest/Playwright imports.

Fix this →

2. Deleted assertions include a CI-wiring guard, not only migration checks (low)

Most of tests/rstest-migration.test.ts really was migration-only: the Vitest absence checks, the legacy config files, and the guidance grep. However, it also checked:

  • scripts['test:ci'] contains test:federation
  • .github/workflows/frontend-verify.yml contains bun run test:federation
  • test:unit uses bun test, and test:integration/test:federation use rstest

These protect against federation tests quietly dropping out of CI, which is ongoing value rather than migration scaffolding. Consider keeping the test:ci → test:federation check (and maybe the workflow string check) in runner-dependencies.test.ts next to the pin check. If the intent is for Landmines/Ultracite to cover this, a note in the PR body would help.

3. runner-cli.browser.test.ts doesn't drive a browser (nit)

The new README says .browser.test.ts "drives a real browser". tests/runner-cli.browser.test.ts instead spawns rstest subprocesses: one case schedules files concurrently, one rejects .only, and only the generated child files touch page. The suffix is mostly there to keep it out of Bun and inside the canary config, which works. Still, if another category gets added, a name/suffix that says "runner contract" (or a sentence in tests/README.md about runner self-tests) would keep the classification rule honest.

Similarly, tests/shared/e2e-canary.browser.test.ts uses the E2E fixtures/options but carries the browser suffix. That's fine, because .e2e.test.ts under tests/shared/ would match no variant root anyway. Just flagging it in case the rule ends up enforced mechanically.

4. Leftover .spec references (nit)

These are harmless, but worth sweeping once item 1 is decided:

  • frontend/bunfig.toml:24 coveragePathIgnorePatterns → "**/*.spec.*"
  • frontend/test.shared.ts:23 coverage exclude → '**/*.spec.{ts,tsx}'
  • frontend/lint-rules/README.md:30 still describes test code as *.spec.*
  • frontend/tests/lint-policy.test.ts:210,369,494,513,531: fixture filenames wait-browser.spec.ts, clock-wall.spec.ts, skip-*.spec.ts. These exercise browser/E2E-style rules, so renaming them to *.browser.test.ts / *.e2e.test.ts would keep the policy tests representative of real filenames.

5. runner-dependencies.test.ts (nit)

import { devDependencies } from '../package.json' with { type: 'json' };

In standard ESM, JSON modules only allow a default import. Bun and the current TS settings accept the named import (the PR reports a clean type check). It will break if this file ever moves to a Node/nodenext runner, though. import pkg from '../package.json' with { type: 'json' } then pkg.devDependencies is the portable form.


Not reviewed / not run

  • Tests and lint weren't run in this job. I relied on the PR's report: 1,945 Bun tests, Chromium/E2E canaries, and 202 collected browser/canary/bundle/full-stack cases.
  • The Ultracite 8.3 / Landmines 0.1.1 enablement isn't in this diff yet (blocked by the 72h policy, per the PR body), so I couldn't review it.
  • The registry-drift comment (outdated alert, button, etc.) is about pre-existing redpanda-ui versions this PR doesn't touch, so it's out of scope here.

@malinskibeniamin malinskibeniamin changed the title frontend: prepare tests for landmines frontend: enable landmines and ultracite 8.3 Nov 19, 2026
@malinskibeniamin
malinskibeniamin marked this pull request as ready for review November 19, 2026 18:10
Fix Ultracite 8.3 diagnostics without new suppressions. Remove redundant commentary and type annotations, extract focused helpers, and test pipeline and secret-store RPCs through the Connect boundary.

The Console policy, app and test types, and frontend CI test command pass locally. All Landmines rules stay enabled; 7,037 findings remain and lint still fails on those findings.
@malinskibeniamin
malinskibeniamin force-pushed the t3/enable-landmines-ultracite branch from ca8680c to e096698 Compare November 19, 2026 18:49
@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 2m 18s —— View job


Review: frontend: enable landmines and ultracite 8.3

  • Gather context (diff, config and tooling changes)
  • Review the Landmines/Ultracite config and package changes
  • Review source changes for behavior regressions
  • Review test rewrites (RPC doubles → Connect handlers)
  • Post review

Summary: One real regression to fix before merge: search filters now compile user-typed text with the u flag (item 2). Separately, frontend-verify will fail until Landmines reaches zero (item 1). The comment removal also left about 119 half-deleted comments (item 3). Otherwise the refactors keep behavior, the test rewrites keep their coverage, and the Landmines adapters are sound.

What I ran on this branch:

  • bun run type:check and type:check:tests: both pass.
  • biome ci: 0 errors, 986 warnings.
  • bun run lint:landmines: 7,037 errors, matching the PR body: 4,670 no-comments, 1,964 no-explicit-return-types, 403 no-test-doubles.
  • Targeted rstest/bun runs of the rewritten pipeline, secrets-store, throughput, shadowlink, observability and connector-details suites all pass. I did not run the full test:ci, and did not run E2E.

1. frontend-verify will be red until Landmines is at zero (blocking for merge)

.github/workflows/frontend-verify.yml:42 runs bun run lint, and that now ends with bun run lint:landmines (package.json:23). Merging with 7,037 errors leaves the frontend check red on master and on every later PR. The PR body says this already. I'm calling it out because the merge strategy needs a decision. Options that keep every rule at error:

  • Ratchet with a committed baseline: count errors per file, fail only if a count goes up, and lower the baseline as files get cleaned. This keeps new code clean right away.
  • Land the remaining cleanup as follow-up PRs, and wire lint:landmines into lint only in the last one.

2. Regression: search boxes now compile user input with the u flag (important)

The Biome useUnicodeRegex fixes also changed new RegExp(userInput, 'i') to 'iu'. In u mode, identity escapes and stray brackets throw. I checked in Node: foo], a{ and \- all compile with 'i' and all throw with 'iu'. Each site handles the error differently, so for example my\-topic, which used to match my-topic, now gives one of these:

  • Empty list: transforms/transforms-list.tsx:185 and rp-connect/pipelines-list.tsx:300 turn an invalid pattern into null, which matches nothing.
  • Filter silently ignored: consumers/group-details.tsx:77 falls back to DEFAULT_MATCH_ALL_REGEX, so every row shows.
  • Literal substring match, so escaped patterns stop matching:
    • connect/cluster-details.tsx:135 and connect/overview.tsx:307 (these also lose matching on the connector class)
    • consumers/group-list.tsx:57
    • schemas/schema-list-filters.ts:21
    • security/shared/filter-by-name.ts:18
    • security/tabs/roles-tab-new.tsx:62
    • security/tabs/users-tab-new.tsx:83
    • topics/topic-list-new.tsx:64

Static regex literals and regexes built from escaped input are fine with u. All literals still parse, named groups keep their numbering, and preview-settings.tsx correctly stopped escaping -. The problem is only where the pattern comes from the user: keep 'i' there, with a justified suppression.

Fix this →

3. Comment removal left half-deleted comments (medium)

Many multi-line comments lost only their first line, and the rest of the comment was left in place. My scan of the diff found about 155 cases where a comment line survives right after a deleted comment line. About 119 of them, across about 94 files, start mid-sentence in lowercase. Examples:

// frontend/src/app.tsx:124
    const setupTeardown = setup(EMPTY_SETUP_ARGS);
    // config.featureFlags). Dev-only mechanism — see debug-helper/feature-flag-overrides.ts.
    applyDebugFeatureFlagOverrides();
  • reassign-partitions/step3-review.tsx:63: // the summary would only catch up on the next poll.
  • misc/kowl-json-view.tsx:52, debug-helper/feature-flag-overrides.ts:81, layout/page-column.tsx:25, pipeline/index.tsx:623, and many more under rp-connect/pipeline/.

These fragments still count toward the 4,670 no-comments errors, so the next pass deletes them anyway. Meanwhile the reasoning behind them is gone. Several of the deleted first lines were ordering constraints you'd want to keep, for example "apply overrides AFTER setup() (which clobbers config.featureFlags)" and "Subscribed here, not read through uiSettings: proxy reads do not notify". The rule allows single-line WARNING: comments for exactly this kind of footgun.

I also saw a comment that now sits above the wrong code: consumers/group-details.tsx:70 ("A nested write on the uiSettings proxy notifies nobody…") is directly above getQuickSearchRegex.

Fix this →

4. Small coverage losses (low)

  • pages/shared/toned-icon.test.tsx: the 9-row tone→class test.each was removed. Only success and muted are still asserted, so a broken mapping for destructive, warning, informative, disabled, primary, action or live would go unnoticed.

  • tests/rstest-migration.test.ts was deleted. Its Rstest pins moved to runner-dependencies.test.ts, but these guards were not moved anywhere:

    • test:ci includes test:federation
    • frontend-verify.yml runs bun run test:federation
    • unit tests run on bun test and the integration and federation suites run on rstest

    These were what stopped federation tests from quietly dropping out of CI.

  • arrays-equal.test.ts was deleted. arraysEqual is now module-private and is still covered through get-update-values-for-*, except for the duplicate-element cases (['a','b','a'] vs ['a','a','b']).

Fix this →

5. Nits

  • connect/connector-details.test.tsx:67-69 adds test doubles. It replaced a typed ConnectClusterStore subclass that used overrides with three rs.spyOn(...).mockReturnValue/... calls, and connectorNamed lost its ClusterConnectorInfo annotation. secret-create-page.test.tsx likewise turned a plain ResizeObserver stub class into rs.fn. Both go against the PR's aim of fewer doubles and add to the 403 count.
  • utils/tsx-utils.tsx StatusIndicator went from a class to a function component, and that isn't purely mechanical. The old lastPropsJson = '' made the first update count as a props change, which reset the "waiting for new messages…" text. Now that text appears after 3s and stays. It's arguably a fix, but worth knowing about.
  • pipeline-throughput-card.test.tsx: it awaits a Promise.withResolvers that resolves only on the 2nd request. If that request never happens, the test times out instead of failing with a clear assertion.
  • .claude/skills/tanstack-router-migration/references/incremental-migration.md:95 still points at hubspot/hubspot.helper.
  • src/route.test-utils.ts has no importers, on master or here. It was moved rather than deleted.
  • lint-rules/landmines-style.ts: only biome-ignore comments and line-1 copyright headers are protected locally. That's enough: the @ts-* and oxlint-/eslint- directive counts are unchanged (155 → 155, and biome-ignore 265 → 265), and none of the 7,037 diagnostics are on directives, so upstream already exempts them.

Checked and clean

  • Landmines adapters (oxlint.landmines.config.ts, landmines-structure.ts, landmines-style.ts): they wrap context.report to filter only detached, directory and protected-comment diagnostics, and each throws at load time if the upstream visitor is missing. The 21 line-1 no-comments hits are genuine non-licence comments. Package and lockfile: @interfere/landmines@0.1.1, oxlint/@oxlint/plugins 1.90.0, ultracite 8.3.0, and the 8.0.2 patch is removed. bun.lock and the yarn.lock mirror are both updated.
  • Code moved out of large files: state/connect/state.ts → connector-properties-store.ts, secret.ts, secrets-store.ts; active-reassignments.tsx → reassignment-details-dialog.tsx; select-partition-table.tsx; utils.ts → cooldown.ts, zero-size-wrapper.tsx. With comments stripped, the code is identical, and the old modules re-export the moved symbols. The rest-interfaces.ts deletions are comments only.
  • Class → function and pageWithContent conversions (login-complete, null-fallback-boundary, connect/overview tabs, admin and transforms pages): no lost observers, lifecycle timing or bindings. heap/hubspot *-tracking renames: no stale code importers.
  • Removed code: name.utils.ts, isPropertyDisabled, isCloudManagedTagKey and the public arraysEqual export have no remaining users.
  • Test rewrites:
    • pipeline/index.test.tsx went from 121 to 120 cases. The one dropped case was folded into another, and the expect counts didn't drop.
    • The Connect fakes are typed with MethodImpl<typeof method> on createRouterTransport, and every request assertion that used a spy before now reads from the recorded request arrays.
    • topic-properties-config went from 19 to 3 cases, and every assertion was kept or made stricter.
  • Runner globs (**/*.e2e.test.ts, *.browser.test.ts, canary list, bunfig ignores) match every renamed file. seed.spec.ts became tests/shared/seed.e2e.test.ts, and its .claude/agents references were updated.
  • Out of scope: the registry-drift bot comment is about redpanda-ui versions that this PR doesn't touch.

@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 40s —— View job


Review: frontend: enable landmines and ultracite 8.3

  • Gather context (diff, what changed since the last review)
  • Re-check the earlier findings (u flag regex, orphaned comments, coverage, CI)
  • Spot-check the rest of the source changes
  • Post review

Summary: No new commits since the previous review on 2026-11-21. HEAD is still e096698 ("frontend: clear biome ci blockers", 2026-11-20), so this re-review confirms that the earlier findings still apply. Two of them block merge; nothing new rises to that level.


Still open (re-verified on e096698)

1. Regression: user-typed search patterns are compiled with the u flag (important). These calls are still on the branch:

  • new RegExp(filter, 'iu') and new RegExp(pattern, 'iu') in consumers/group-details.tsx:77
  • new RegExp(quickSearch, 'iu') and new RegExp(filterValue, 'iu') in the connect, schema, security, topics, transforms and pipelines list filters (full list in the previous review)

Under u, input such as my\-topic, foo] or a{ throws. Each site then falls back differently:

  • an empty list
  • /.*/su, so the filter does nothing
  • a literal substring match

Keep 'i' for user-supplied patterns, with a justified suppression. The non-user sites are fine with u:

  • the test regexes
  • preview-settings.tsx, which uses regexEscape + .* and now also correctly stopped escaping -

2. frontend-verify will be red on merge (blocking). bun run lint still ends in lint:landmines, which reports 7,037 errors. To keep every rule at error, either:

  • add a committed per-file baseline that fails only when a count goes up (a ratchet), or
  • wire lint:landmines into lint only in the final cleanup PR.

3. Half-deleted comments (medium). Example: src/app.tsx:124 still reads // config.featureFlags). Dev-only mechanism — …. The deleted first line held the ordering constraint ("apply overrides AFTER setup(), which clobbers config.featureFlags"). That kind of constraint should survive as a single-line WARNING: comment.

The same pass also stripped the reasons behind error swallowing:

  • debug-bundle-link.tsx: api.deleteDebugBundleFile().catch(() => {})
  • overview-license-notification.tsx: refreshClusterOverview() and listLicenses() now use the same empty .catch(() => {})

These are now bare empty catches. Either keep a one-line WARNING: saying why the error is ignored, or report it.

4. Coverage losses (low). All three are still missing:

  • the toned-icon tone→class table
  • the test:ci → test:federation and frontend-verify.yml guards that were in the deleted rstest-migration.test.ts
  • the arraysEqual duplicate-element cases

Checked and clean in this pass

  • null-fallback-boundary.tsx: componentDidCatch = reportBoundaryError as a class field. React detects error boundaries with typeof instance.componentDidCatch === 'function', so a field works the same as a method.
  • constants.ts: isCloudManagedTagKey is no longer exported and has no remaining importers.
  • Removed return-type annotations, e.g. getUserTagEntries and describeOwnCopies: the inferred types are unchanged, and type:check passed in the previous run.
  • preview-settings.tsx: ^${joined}$ with u is safe because every component goes through regexEscape.

Not run in this job

I did not run the tests, type checks or lint here; the branch is identical to the one the previous review ran them on. I did not run E2E. The registry-drift bot comment is out of scope for this PR.

Remove return annotations that TypeScript infers identically. Keep
public REST contracts as API docs instead of inline commentary.

Exercise schemas and shadow-link requests through real UI, Connect
transport, and strict MSW handlers. Align Rstest HTTP constructors
so protocol headers survive interception. Leave lint policy intact.
Exercise token refresh, host navigation, and unmount through real
Console and Router behavior instead of substituting dependencies.
Use strict MSW at the HTTP boundary and verify stale subscriptions
cannot notify the host after teardown.

Preserve the legacy element and interceptor contracts while letting
TypeScript infer return types. Keep host integration constraints on the
public exports instead of repeating implementation details.
Keep replica placement priority and progress semantics at their
public interfaces instead of repeating implementation details.
Infer private helper returns and validate fixtures at construction.
Let diagnostic spies call through so tests observe real behavior.
Retain YAML editing guarantees as public API notes and validate
return shapes where values are constructed. Keep failed YAML
operations distinct from valid empty output.

Exercise pipeline lint with real hooks and typed Connect replies,
including the server rejection and blank-input regressions.
Preserve graph node shapes and source indices while letting TypeScript
infer the pipeline parser, layout, and inspector return types. Keep
the contracts that explain editing behavior at the public APIs.
Let the actions and assertions describe the test flow. Remove repeated
step and fixture narration so behavioral rationale remains easy to see.
Keep test cases, expectations, and test policy unchanged.
Use typed transport replies with the real stores, route, and toast
system. Observe role-assignment requests and keep the fence tab visible
while an earlier failed list is reloading. Fold duplicate success and
permission cases into the paths that prove the same outcomes.
Drop repeated headings, old icon aliases, and non-executable transform
examples. Keep protocol and behavior notes as documentation on their
owning exports, and record missing transform fixtures in the test guide.
Check form defaults and suggestion variants where they are built so
functions can infer their result. Preserve optional schema lookup
results and keep wire-format notes at the mapper API boundary.
Use real routes, menus, and dialogs to verify role and principal
deletion against typed RPC handlers. Confirm failures retain expansion
and filtering, and that groups cannot delete same-named SCRAM users.
Drive the real topic and user step forms through typed RPC handlers and
strict MSW. Verify topic defaults, user grants, and service-account
credential persistence instead of substituting form behavior.
Pipeline page tests injected the mode hook result, so route matching
and URL-derived modes could regress without failing those tests. Mount
the page on memory routes and use real route transitions to exercise
the same cases without scripting the mode.
Keep permission, validation, and recovery constraints close to their
owners instead of narrating their implementation. This clears the
comment rule in admin, connector, schema, quota, and security pages
without changing executable code or lint directives.
Keep layout, preferences, and compatibility constraints with their
public owners instead of leaving comment fragments or narrating code.
Remove the remaining comment violations in layout, hooks, stores,
and utilities without changing behavior or weakening the gate.
Keep the lint record, table callbacks, and gateway map typed at
their creation sites. The helpers retain their call contracts while
the implementations infer types from the values they use.
Put fencing, embedded startup, and degraded overview behavior
with the public code that owns those contracts. Remove narration and
keep warnings for changes that could regress them. Preserve the
compiled code, functional directives, and first-party license text.
Keep the tracked skip reasons and the constraints behind sequencing,
response waits, and fixture selection. Remove narration without
changing cases, assertions, or compiler and lint directives.
Reset the real Zustand store before the wizard and schema suites
instead of replacing the package and resetting every imported
store. Remove the now-unused mock and route stub helpers.
Keep compatibility and runner lifecycle constraints with the code
that owns them, and move YAML fixture attribution to the test
guide. Leave compiler directives and the checks themselves intact.
Use contextual types for existing arrow functions so their bodies
can infer results without loosening the caller contract. Preserve
generic, optional, default, and rest parameters and the emitted code.
Keep optional markers on implementations so Biome recognizes the
existing parameter defaults. Type values at their point of creation
and preserve callers without adding casts or changing runtime work.
Use real routes, forms and typed Connect handlers for create,
update, delete and dependency lookup. Assert the sent requests
and the resulting navigation or refreshed list instead of wiring
callbacks to test doubles.
Replacing status hooks bypassed the logic for stale revisions and
controller outages. Run the same cases through typed RPC handlers to
verify real requests and fallback behavior without test doubles.
Avoid duplicate return annotations when the implementation provides
the shape. Keep contextual contracts at value boundaries, especially
for tuples, parsed JSON and callbacks, without introducing casts.
Keep recursive functions and callbacks typed at their bindings and
result values. Infer the rest from checked object shapes and generics.
Remove an obsolete ESLint directive from the same source cleanup.
Use temporary directories to verify removal and aggregate failures.
Drive retries with a controlled clock and assert the observed attempt
times, so skipped delays or serial cleanup fail for the right reason.
Exercise the panel and dialog with real status, link, and write
handlers. Verify recovery after controller loss and fence at the
revision returned by a policy save rather than a mocked mutation.
Exercise real legacy and federated navigation, Cloud secret choices,
and controlplane filtering with host configuration and typed fixtures.
Observe Connect overview requests instead of replacing its fetch.
Scroll to the mounted wizard section instead of querying a global ID.
Remove the file-wide ID suppression and stop passing the unused page
instance into review, which lets its tests render without a refresh stub.
Use strict HTTP fixtures for topic-cache pruning and record deletion.
Check the deletion request carries only the selected partition and its
existing low watermark when the user leaves the offset untouched.
Read SQL columns through Connect and consolidate overlapping tree
cases. Run the connector page against REST and real log streams so
refresh and navigation must actually cancel the previous request.
Replace spies that could pass without exercising the clipboard or the
backend request. Verify auth rejection, legacy create flows, and
shadow link metrics and failover with actual clients and typed RPCs.
Combine overlapping tests without losing their assertions.
Cover ACL URL parsing and role membership through typed RPCs instead
of mocked hooks. Exercise YAML refusal and query cancellation with
the real parser and client so regressions cannot bypass those paths.
Initialize pipeline YAML from actual wizard state. Check shadow-link
field masks on the RPC and drive topic pagination with REST replies
and the real refresh control. Consolidate repeated YAML cases.
TanStack Query hides refetch failures unless throwOnError is set.
Report the refresh failure without replacing the delete outcome,
and exercise both results against actual HTTP responses.
Exercise docked and expanded focus through real transitions.
Reload a selected record over a real stream, including when two
records share the same offset but belong to different partitions.
Exercise the real header with its per-load theme gate and routing.
Refresh the cluster fence through both controlplane and peer RPCs,
asserting that consumers keep stable state until contents change.
Use real route transitions for saves, back navigation, and refused
starts. Verify the actual blocker resumes only the intended route
and re-arms after editing a saved pipeline again.
Run Monaco and shadow-link layout checks in Chromium instead of
replacing browser or editor behavior. Detach the diff models before
the Monaco adapter tears down the editor.
@malinskibeniamin malinskibeniamin added the ci-fixes Improving CI label Nov 24, 2026
Exercise canvas measurement and autosave quota in Chromium.
Configure the Happy DOM network boundary without replacing fetch,
and install DOM globals without replacing Bun networking.
Use the real Monaco YAML worker for catalog refresh coverage.
Share setup rollback between the E2E harnesses and exercise it
against filesystem failures instead of Playwright doubles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant