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 200+ git commits touching site/ files:Core Migrations:- Emotion → Tailwind CSS (strict 'no new emotion' policy)- MUI Components → Custom/Radix/shadcn (Tooltips, Tables, Buttons)- MUI Icons → lucide-react with specific icon mappings- spyOn → queries parameter for GET endpoint mocks in Storybook- localStorage → user_configs table for user preferencesNew Documentation:- Icon migration mappings (BusinessIcon→Building2Icon, etc.)- Radix component prop naming conventions (placement→side)- cn() utility usage for conditional className merging- Chromatic testing best practices (prefer snapshots over assertions)Includes concrete before/after examples and migration patterns to guidedevelopers away from deprecated approaches toward current best practices.Analysis based on PRs:#20948,#20946,#20938,#20905,#20900,#20869,#20849,#20808,#20530,#20479,#20261,#20201,#20200,#20193,#20318---🤖 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
+156-5Lines changed: 156 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,17 @@
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 Components → Custom/Radix Components**: Replace MUI components (Tooltips, Tables, Buttons) with custom/shadcn equivalents
9
+
3.**MUI Icons → lucide-react**: All icons must use lucide-react, never MUI icons
10
+
4.**spyOn → queries parameter**: Use`queries` in story parameters for GET endpoint mocks
11
+
5.**localStorage → user_configs**: Store user preferences in backend, not browser storage
12
+
13
+
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.
14
+
3
15
##TypeScript LSP Navigation (USE FIRST)
4
16
5
17
When investigating or editing TypeScript/React code, always use the TypeScript language server tools for accurate navigation:
@@ -26,25 +38,104 @@ When investigating or editing TypeScript/React code, always use the TypeScript l
26
38
27
39
##Components
28
40
29
-
- MUI components are deprecated - migrate away from these when encountered
30
-
- Use shadcn/ui components first - check`site/src/components` for existing implementations.
41
+
-**MUI components are deprecated** - migrate away from these when encountered
42
+
- Replace`@mui/material/Tooltip` with custom`Tooltip` component (Radix-based)
43
+
- Default 100ms delay via global tooltip provider
44
+
- Use`delayDuration={0}` when immediate tooltip needed
45
+
- Replace MUI Tables with custom table components
46
+
- Replace MUI Buttons with shadcn Button components
47
+
- Systematically replace MUI components with custom/shadcn equivalents
48
+
- Use shadcn/ui components first - check`site/src/components` for existing implementations
31
49
- 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.
50
+
- The modules folder should contain components with business logic specific to the codebase
33
51
- Create custom components only when shadcn alternatives don't exist
34
52
53
+
###Icon Migration: MUI Icons → lucide-react
54
+
55
+
**STRICT POLICY**: All icons must use`lucide-react`, not MUI icons.