From 04a3ecf25ee89dfa9fa2448a1af3c2ce691cd853 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 16 Jan 2026 18:07:36 +0200 Subject: [PATCH] More CLAUDE.md updates --- CLAUDE.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index ce77fc6b3b..b791d9ae93 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -29,7 +29,7 @@ yarn lint # Run ESLint yarn typecheck # Run TypeScript type checking # Internationalization -yarn intl:extract # Extract translation strings +yarn intl:extract # Extract translation strings (you don't typically need to run this manually, we have CI for it) yarn intl:compile # Compile translations for runtime # Build @@ -119,7 +119,7 @@ if (gtMobile) { ### Naming Conventions -- Spacing: `xxs`, `xs`, `sm`, `md`, `lg`, `xl`, `xxl` (t-shirt sizes) +- Spacing: `2xs`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl` (t-shirt sizes) - Text: `text_xs`, `text_sm`, `text_md`, `text_lg`, `text_xl` - Gaps/Padding: `gap_sm`, `p_md`, `px_lg`, `py_xl` - Flex: `flex_row`, `flex_1`, `align_center`, `justify_between` @@ -144,7 +144,8 @@ function MyFeature() { - {/* Native drag handle */} + {/* Typically the inner part is in its own component */} + {/* Native-only drag handle */} Title @@ -152,9 +153,10 @@ function MyFeature() { Dialog content here - + {/* Web-only X button in top left */} @@ -215,7 +217,7 @@ import {Button, ButtonText, ButtonIcon} from '#/components/Button' // Icon-only button // Ghost variant (deprecated - use color prop) @@ -225,7 +227,7 @@ import {Button, ButtonText, ButtonIcon} from '#/components/Button' ``` **Button Props:** -- `color`: `'primary'` | `'secondary'` | `'negative'` | `'primary_subtle'` | `'negative_subtle'` +- `color`: `'primary'` | `'secondary'` | `'negative'` | `'primary_subtle'` | `'negative_subtle'` | `'secondary_inverted'` - `size`: `'tiny'` | `'small'` | `'large'` - `shape`: `'default'` (pill) | `'round'` | `'square'` | `'rectangular'` - `variant`: `'solid'` | `'outline'` | `'ghost'` (deprecated, use `color`) @@ -339,6 +341,16 @@ export function useUpdateProfile() { onSuccess: (_, variables) => { queryClient.invalidateQueries({queryKey: RQKEY(variables.did)}) }, + onError: (error) => { + if (isNetworkError(error)) { + // don't log, but inform user + } else if (error instanceof AppBskyExampleProcedure.ExampleError) { + // XRPC APIs often have typed errors, allows nicer handling + } else { + // Log unexpected errors to Sentry + logger.error('Error updating profile', {safeMessage: error}) + } + } }) } ```