Repository navigation
frontend: enable landmines and ultracite 8.3 - #2731
malinskibeniamin wants to merge 71 commits into
Conversation
🚨 Registry drift detectedApp:
Components needing attention
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 --overwriteGenerated by lookout audit-changes. |
|
@claude review |
|
Claude finished @malinskibeniamin's task in 1m 8s —— View job Review: frontend: prepare tests for landmines
Summary: The rename is consistent. Every runner glob I checked matches the new suffixes: 1. A new
|
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.
ca8680c to
e096698
Compare
|
@claude review |
|
Claude finished @malinskibeniamin's task in 2m 18s —— View job Review: frontend: enable landmines and ultracite 8.3
Summary: One real regression to fix before merge: search filters now compile user-typed text with the What I ran on this branch:
1.
|
|
@claude review |
|
Claude finished @malinskibeniamin's task in 40s —— View job Review: frontend: enable landmines and ultracite 8.3
Summary: No new commits since the previous review on 2026-11-21. HEAD is still Still open (re-verified on
|
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.
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.
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
anyor 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
0d066f713. Console policy and Landmines: 0 errors; Biome: 0 errors, 921 warnings. All ten Landmines rules remain enabled at error.master.