You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Add comprehensive documentation for active frontend pattern migrationsdiscovered through analysis of 100 recent PRs:- Emotion → Tailwind CSS (strict 'no new emotion' policy)- MUI → Custom/Radix components (especially Tooltips)- spyOn → queries parameter for GET endpoint mocks in Storybook- localStorage → user_configs table for user preferences- Chromatic testing best practices (prefer snapshots over assertions)Includes concrete examples and migration patterns to guide developersaway from deprecated approaches and toward current best practices.---🤖 This change was written by Claude Sonnet 4.5 Thinking using mux and reviewed by a human 🏂
Copy file name to clipboardExpand all lines: site/CLAUDE.md
+104-5Lines changed: 104 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,16 @@
1
1
#Frontend Development Guidelines
2
2
3
+
##🚨 Critical Pattern Migrations (MUST FOLLOW)
4
+
5
+
The following patterns are actively being migrated and have**STRICT policies**:
6
+
7
+
1.**Emotion → Tailwind**: "No new emotion styles, full stop" - Always use Tailwind CSS
8
+
2.**MUI → Custom/Radix Components**: Replace MUI components with custom equivalents (especially Tooltips)
9
+
3.**spyOn → queries parameter**: Use`queries` in story parameters for GET endpoint mocks
10
+
4.**localStorage → user_configs**: Store user preferences in backend, not browser storage
11
+
12
+
When touching existing code,**"leave the campsite better than you found it"** - refactor old patterns to new ones even if not directly related to your changes.
13
+
3
14
##TypeScript LSP Navigation (USE FIRST)
4
15
5
16
When investigating or editing TypeScript/React code, always use the TypeScript language server tools for accurate navigation:
@@ -26,20 +37,48 @@ When investigating or editing TypeScript/React code, always use the TypeScript l
26
37
27
38
##Components
28
39
29
-
- MUI components are deprecated - migrate away from these when encountered
30
-
- Use shadcn/ui components first - check`site/src/components` for existing implementations.
40
+
-**MUI components are deprecated** - migrate away from these when encountered
41
+
- Replace`@mui/material/Tooltip` with custom`Tooltip` component (Radix-based)
42
+
- Default 100ms delay via global tooltip provider
43
+
- Use`delayDuration={0}` when immediate tooltip needed
44
+
- Systematically replace MUI components with custom/shadcn equivalents
45
+
- Use shadcn/ui components first - check`site/src/components` for existing implementations
31
46
- Do not use shadcn CLI - manually add components to maintain consistency
32
-
- The modules folder should contain components with business logic specific to the codebase.
47
+
- The modules folder should contain components with business logic specific to the codebase
33
48
- Create custom components only when shadcn alternatives don't exist
34
49
35
50
##Styling
36
51
37
-
- Emotion CSS is deprecated. Use Tailwind CSS instead.
38
-
- Use custom Tailwind classes in tailwind.config.js.
52
+
-**Emotion CSS is STRICTLY DEPRECATED: "no new emotion styles, full stop"**
53
+
- Never use`@emotion/react`,`css` prop,`useTheme()`, or emotion styled components
54
+
- Always use Tailwind CSS utility classes instead
55
+
- When touching code with emotion styles, refactor to Tailwind ("leave the campsite better than you found it")
56
+
- Use custom Tailwind classes in tailwind.config.js
39
57
- Tailwind CSS reset is currently not used to maintain compatibility with MUI