Skip to content

Commit 408c24f

Browse files
committed
docs: update skills with testing and state migration patterns
1 parent 4f8208a commit 408c24f

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

frontend/.claude/skills/code-standards/SKILL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ Most issues are auto-fixed:
4040
bun x ultracite fix
4141
```
4242

43+
## Console Logging
44+
45+
- **Never** use `console.log`, `console.debug`, or `console.info` in production code
46+
- Only use `console.error` and `console.warn` for actionable errors
47+
- For debug logging, wrap in `if (IsDev) { ... }`
48+
- Don't use `biome-ignore` to suppress console warnings - remove the logs instead
49+
4350
## Rules
4451

4552
See `rules/` directory for detailed guidance.

frontend/.claude/skills/code-standards/rules/no-legacy.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ When modifying files with legacy patterns:
8888
3. **Keep changes minimal** if just fixing bugs
8989
4. **New features** must use modern patterns
9090

91+
### MobX → React State: Check Side-Effects
92+
93+
When converting observables to React state, automatic behaviors must become explicit:
94+
- MobX observable arrays auto-update UI when mutated
95+
- React state requires explicit `setState()` calls
96+
- Clearing, resetting, or initializing state needs manual handling
97+
98+
**Checklist**: List all observable mutations → add equivalent `setState` calls.
99+
91100
## Legacy Locations
92101

93102
- MobX stores: `src/state/` (do not add new files)

frontend/.claude/skills/testing/SKILL.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ bun run test:coverage # Coverage report
4040

4141
- `.test.ts` = unit (Node.js), `.test.tsx` = integration (JSDOM)
4242
- Always use `test-utils/test-utils.tsx` for React component tests
43+
- Test that features are fully wired: UI elements must connect to actual functionality
44+
45+
### Feature Completeness Testing
46+
47+
When implementing interactive features (buttons, forms, etc.):
48+
- Verify event handlers call the correct functions with proper parameters
49+
- Test that AbortSignals, callbacks, and other "plumbing" are passed through
50+
- Don't assume UI presence means functionality works - test the connection
4351

4452
## When to Use This Skill
4553

0 commit comments

Comments
 (0)