Commit Graph
8 Commits
Author SHA1 Message Date
Jake Howell 257c6f1dca refactor: move shared AI model UI into modules/aiModels (#29040)
> 🤖 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
2026-09-08 14:34:51 +10:00
Jeremy Ruppel cd1c9b72c6 feat(site): enable react compiler for template builder pages (#29000)
## 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.
2026-09-04 16:41:05 -04:00
Michael Suchacz 34ed124478 fix(site): align React Compiler check scope with vite.config.mts (#27216)
## 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.
2026-07-19 07:29:53 +02:00
Danielle Maywood 3f7a3e3354 perf: reorder declarations to fix React Compiler scope pruning (#24098) 2026-04-08 09:40:41 +01:00
Danielle Maywood c33cd19a05 fix(site/scripts): guard check-compiler main block from test imports (#23825) 2026-03-30 22:11:15 +01:00
Danielle Maywood adcea865c7 fix(site): improve check-compiler.mjs quality and fix bugs (#23812) 2026-03-30 20:41:41 +00:00
Danielle Maywood a399aa8c0c refactor(site): restructure AgentsPage folder (#23648) 2026-03-28 21:33:42 +00:00
Danielle Maywood 599f21afa3 feat(site): opt AgentsPage and ai-elements into React Compiler (#23371) 2026-03-20 19:55:35 +00:00