> 🤖 Refactoring with Cursor.
AI settings was importing model form fields, ModelSelector, and
ProviderIcon from AgentsPage. Those now live in
`site/src/modules/aiModels`.
No user-facing behavior change.
- Move ProviderIcon, ModelSelector, and the model admin form fields into
`modules/aiModels`
- Point AgentsPage and AI settings at the new paths
- Drop the leftover ChatModelAdminPanel ProviderIcon duplicate and the
knownModels barrel
- Update the known-models catalog generator paths
## Summary
Opts `src/pages/TemplateBuilder` into the React Compiler and fixes the
two compiler diagnostics that surfaced (`pnpm lint:compiler` now passes
cleanly).
- **`TemplateBuilderPage.tsx`** (`PreserveManualMemo`): the
`useCallback` deps listed `sessionMutation.mutate`, but the compiler
inferred the whole `sessionMutation` object, so manual memoization could
not be preserved. Destructured `const { mutate: recordSession } =
useMutation(...)` so the declared deps match the inferred dependency
(the same pattern already used in `AgentChatPage`).
- **`TemplateBuilderPageView.tsx`** (`Cannot access refs during
render`): the ref-accessing `registerModuleRef` callback was passed as
an argument into the plain `renderStepContent(...)` helper called during
render, which the compiler treats as ref access in render. Converted the
helper into a `StepContent` component rendered as JSX, so the callback
is a normal prop. Removed the now-unused `ReactNode` import.
- Registered the directory in both `scripts/check-compiler.mjs`
(`targetDirs`) and `vite.config.mts` (rolldown `include` filter).
## Testing
- `pnpm lint:compiler` — 0 diagnostics (437 functions compiled).
- `tsc --noEmit` — no new errors in the changed files.
- `biome check` — clean.
---
> Generated by Coder Agents on behalf of @jeremyruppel.
## Stack Context
First PR of a 6-PR stack that thins the agent instruction corpus (~4,800
lines down to ~2,800) by removing startup bloat, assigning each
procedure one canonical owner, and fixing rules that drifted from
reality. Split from #27203 for reviewability.
## Why?
`site/vite.config.mts` compiles `src/pages/AIBridgePage/` with the React
Compiler, but `site/scripts/check-compiler.mjs` did not include that
directory. Compiler regressions in AIBridgePage were invisible to CI:
code could silently bail out of compilation with no signal. The two
lists had already drifted once, which is exactly how this class of bug
recurs.
## What?
- Add `src/pages/AIBridgePage/` to the check-compiler scope. Verified
all 381 functions in scope compile cleanly.
- Cross-reference the two lists with comments so the next person who
edits one finds the other.
This is the only behavioral (non-docs) change in the stack, which is why
it sits at the bottom.
> This PR was prepared by Mux (AI agent) on Mike's behalf.