## What
Enables the `no-this-alias` oxlint rule and removes the redundant Biome
equivalent (`complexity/noUselessThisAlias`), following the migration
backlog workflow documented in `site/.oxlintrc.jsonc`.
## Changes
- **`site/.oxlintrc.jsonc`** — enable `no-this-alias` as `"error"`
(moved out of the migration backlog into the complexity group).
- **`biome.jsonc`** — disable the now-redundant
`complexity/noUselessThisAlias`.
- **`site/src/testHelpers/resizeObserver.ts`** (new) — a shared,
controllable fake `ResizeObserver`. Exports a top-level
`MockResizeObserver` class that tracks constructed observers via `static
instances`/`getLast()`/`reset()`, drives the observed callback with
`simulateResize`, and uses a real `vi.fn()` for `disconnect` assertions.
The class `implements ResizeObserver`, so there are no `as unknown as`
casts.
- **`useKebabMenu.test.tsx`** and **`useDesktopConnection.test.ts`** —
deleted their duplicated hand-rolled `MockResizeObserver` and use the
shared class. Each test owns the wiring: `MockResizeObserver.reset()` +
`vi.stubGlobal("ResizeObserver", MockResizeObserver)` in `beforeEach`,
and `vi.unstubAllGlobals()` in `afterEach`. This also fixes a latent
issue where the desktop test never restored the global
`resize-observer-polyfill`.
- **`useSpeechRecognition.test.ts`** — keeps a targeted `//
oxlint-disable-next-line typescript/no-this-alias` for `lastInstance =
this`, a legitimate constructor instance-tracking pattern that Biome
does not flag (separate SpeechRecognition mock).
## Verification
- `pnpm run lint` (biome, oxlint, tsc, circular-deps, React compiler,
knip) — clean
- `pnpm run test` — 217 files, 3448 passed, 2 skipped, 0 failed
- `biome format` on changed files — clean
<details>
<summary>Background / decision log</summary>
The two ResizeObserver test mocks were near-identical (`const self =
this` + method-shorthand closures — a pre-ES2015 pattern that oxlint's
stricter `no-this-alias` flags). There was no existing shared
ResizeObserver test helper (only `testHelpers/matchMedia.ts` as
precedent for a shared browser-API mock).
A `resize-observer-polyfill` is installed globally in
`test/setup/polyfills.ts`, but it does real (async, layout-based)
measurement, so it can't deterministically drive resize callbacks or be
spied on. These suites therefore install controllable fakes.
The shared helper exports the mock as a plain top-level class rather
than building it inside a setup function, and leaves the `vi.stubGlobal`
install / `vi.unstubAllGlobals` restore to each test. Using `this`
directly inside the class (rather than aliasing it) keeps
`no-this-alias` satisfied without disable comments.
</details>
---
Generated by Coder Agents.
Promotes the oxlint `new-for-builtins` rule from the migration backlog
to `error` and disables Biome's analogous
`correctness/noInvalidBuiltinInstantiation`, so oxlint becomes the sole
enforcer of this rule.
Fixes the seven violations by requiring `new` for builtin
instantiations:
- `XAxis.tsx`: replace `[...Array(columns).keys()].map(...)` with
`Array.from({ length: columns }, (_, key) => ...)`, folding the range
and map into one dense-array construction.
- `pasteHelpers.test.ts` (×4) and `TextPreviewDialog.stories.tsx` (×1):
`Array(n).fill(...)` becomes `new Array(n).fill(...)`.
- `schedule.tsx`: `throw Error(...)` becomes `throw new Error(...)`.
`pnpm run lint` (Biome, oxlint, tsc, circular-deps, compiler, knip) and
`pnpm run format` pass clean; the affected `pasteHelpers` and `schedule`
unit tests pass.
---
Generated by Coder Agents on behalf of @jeremyruppel.
Promotes the oxlint `no-explicit-any` rule from the migration backlog to
`error` and disables Biome's analogous `suspicious/noExplicitAny`, so
oxlint becomes the sole enforcer of this rule.
The eight existing `biome-ignore lint/suspicious/noExplicitAny`
suppressions are removed and their `as any` casts replaced with precise
types (no `any`, no `as unknown as` double-casts):
- `optionValue.ts`: the default branch now asserts to the `OptionValue`
children union.
- `MonacoEditor.tsx`: a typed intersection describes Monaco's private
`_standaloneKeybindingService`.
- `e2e/helpers.ts`: a `BrowserContext` intersection types the
symbol-keyed current user.
- `e2e/api.ts`: `opt.value` (typed `unknown`) is asserted directly to
`string` / `string[]` / `Record<string, string>`.
`pnpm run lint` (Biome, oxlint, tsc, circular-deps, compiler, knip) and
`pnpm run format` pass clean.
<details>
<summary>Implementation plan</summary>
## Goal
Enable the oxlint rule `no-explicit-any` (mapped to Biome
`suspicious/noExplicitAny`), disable the analogous Biome rule, and fix
all resulting violations by removing the explicit `any` types (not by
migrating suppression comments).
## Findings
- The oxlint rule was parked in the migration backlog:
`"no-explicit-any": "off", // suspicious/noExplicitAny`.
- Running oxlint with the rule as error surfaced exactly 8 violations,
all in places already carrying `// biome-ignore
lint/suspicious/noExplicitAny` comments:
- `src/pages/DeploymentSettingsPage/optionValue.ts` (1)
- `src/pages/TemplateVersionEditorPage/MonacoEditor.tsx` (1)
- `e2e/helpers.ts` (3)
- `e2e/api.ts` (3)
- Biome's `noExplicitAny` is a recommended rule (implicitly on);
disabling it means adding an explicit `"off"` in the root `biome.jsonc`.
- `e2e/**` is type-checked by `lint:types` (`tsc -p .`), so e2e fixes
must type-check.
## Constraints
- Remove the `biome-ignore` comments and fix the `any`s (do not migrate
suppressions).
- Do not cast through `unknown` (no `x as unknown as Y`). Single direct
assertions from an already-`unknown` value and subtype intersection
casts are used instead.
## Changes
1. `site/.oxlintrc.jsonc`: move `no-explicit-any` to the active
suspicious section as `"error"`; drop the backlog entry.
2. `biome.jsonc`: add `"noExplicitAny": "off"` under
`linter.rules.suspicious`.
3. Fix the 8 violation sites and remove the 8 `biome-ignore` comments
across the 4 source files.
## Validation
- `pnpm run lint:oxlint` → 0 errors
- `pnpm run lint:check` (Biome) → clean
- `pnpm run lint:types` (`tsc -p .`) → clean (covers `src` and `e2e`)
- `optionValue.test.ts` → 16 tests pass
- full `pnpm run lint` and `pnpm run format` → clean
</details>
---
Generated by Coder Agents on behalf of @jeremyruppel.
> 🤖 This PR was modified by Coder Agents on behalf of Jake Howell.
Until we meet again.
## Stack
- #27636
- #27718
- #27719
- #27722
- #27723
- #27724
- #27728
- #27730
- #27732
- #27762
- #27763
- #27786
- #27787
- #27788
- #27789
- #27790
- #27791
- #27817
- #27820
- #28009
## Final removal (`c39b664`)
Removes the last of MUI and Emotion now that every surface has been
migrated:
- **Dependencies**: drops `@mui/material` and
`@emotion/{cache,css,react,styled}` from `package.json` /
`pnpm-lock.yaml`, and deletes the `@types/emotion.d.ts` and
`@types/mui.d.ts` module augmentations.
- **Theming**: replaces the Emotion `CacheProvider`, MUI `ThemeProvider`
/ `StyledEngineProvider`, and `CssBaseline` in `ThemeProvider` with a
lightweight `theme/context.tsx` that exposes `ThemeContextProvider` and
a `useTheme` hook.
- **Global styles**: moves the base `body` styles (background, text
color, font, antialiasing) that `CssBaseline` previously provided into
`index.css`, and drops the temporary MUI modal/popover scrollbar-gutter
workaround.
- **Cleanup**: removes the MUI → shadcn / Emotion → Tailwind migration
guidance from `site/AGENTS.md`, updates the Storybook `preview.tsx`, and
adjusts assorted components (`Command`, `Slider`, `Switch`, `Tabs`,
`SyntaxHighlighter`, timing charts) and theme files to consume the new
context instead of MUI/Emotion.
Raises Biome's max file size so `coderd/apidoc/swagger.json` keeps
getting formatted.
The raw swaggo output sits just under Biome's 1 MiB default, so adding a
new endpoint tips it over. Biome then skips the file with an info rather
than an error, which means `scripts/biome_format.sh` and `make gen` both
exit 0 while silently leaving it unformatted. Any PR that introduces a
new endpoint ends up with a large spurious diff in `swagger.json` and a
failing `gen` check.
This is what `make gen` prints when it happens:
```
/home/coder/coder/_gen/tmp.NVD90urqoA/swagger.json format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
i The size of the file is 1.0 MiB, which exceeds the configured maximum of 1.0 MiB for this project.
Use the `files.maxSize` configuration to change the maximum size of files processed, or `files.includes` to ignore the file.
Formatted 0 files in 3ms. No fixes applied.
Found 1 info.
format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× No files were processed in the specified paths.
i Check your biome.json or biome.jsonc to ensure the paths are not ignored by the configuration.
i These paths were provided but ignored:
- /home/coder/coder/_gen/tmp.NVD90urqoA/swagger.json
```
Generated output is unchanged on main, so this is config only.
*Disclaimer: implemented by a Coder Agent using Claude Opus 4.6*
The `noEmptyInterface` rule is enabled by default as a recommended Biome
rule. Its safe fix converts empty interfaces to type aliases (e.g.
`export interface X {}` becomes `export type X = {}`), which then
conflicts with `noBannedTypes` on the empty `{}` type. Since empty
interfaces are legitimately produced by Go-to-TypeScript code
generation, this disables the rule entirely.
<details><summary>Context</summary>
Discussion in Slack concluded that disabling the rule is preferable to
adding per-type exceptions in `scripts/apitypings/main.go`, since the
safe fix itself creates a worse lint violation.
</details>
This branch tightens import hygiene and editor guidance to reduce
accidental use of legacy or discouraged patterns.
It also updates consumers too, by propagating the new `lucide-react`
import convention across the existing UI surfaces that reference those
icons.
- Updated `.vscode/settings.json` to prefer non-relative imports and
improve TypeScript auto-import behavior.
- Re-enabled and expanded Biome restricted-import enforcement in
`biome.jsonc` for migration guardrails.
- Added/used `lucide-react` `-Icon` naming conventions for clarity and
consistency.
- Updated consumers too across components, modules, and pages so the new
import rules are applied end-to-end.
closes#19974
This PR replaces all remaining MUI tooltips with our shadcn tooltip
component, and uncomments the linter restriction on importing the MUI
tooltip
Adds deprecation markers for MUI components and the custom Stack
component to guide migration to shadcn/ui and Tailwind CSS.
Changes:
- Added JSDoc @deprecated tags to Stack component and type definitions
- Added deprecation comments to MUI imports in theme files
- Expanded Biome noRestrictedImports rules to flag all MUI component
imports
---------
Co-authored-by: Claude <noreply@anthropic.com>
I tried to break this work into smaller pieces, but since there are a
lot of dependent components, I decided to handle it in one larger chunk
and rely on Storybook to catch any bugs.
That said, let me know if you’d prefer a different approach!
Fixes a Biome lint error when running `make lint`.
```
> biome check --error-on-warnings --fix .
biome.jsonc:6:13 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ The configuration schema version does not match the CLI version 2.2.4
4 │ "includes": ["!e2e/**/*Generated.ts"]
5 │ },
> 6 │ "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json"
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 │ }
8 │
ℹ Expected: 2.2.4
Found: 2.2.0
ℹ Run the command biome migrate to migrate the configuration file.
Checked 1165 files in 796ms. No fixes applied.
```