Walk props.children at runtime to extract text content from touched components. This is the only option that catches dynamic text like <Text>{t('save')}</Text>.
Rough approach:
- Walk
memoizedProps.children up to depth 2
- If children are strings or
<Text> with string children, use as label fallback (after sentry-label, accessibilityLabel, testID)
- Cap string length (e.g. 64 chars)
Must be gated on replay masking settings. If maskAllText is enabled, extracting text children into breadcrumbs would leak content the user asked us to mask. Options:
- Gate on masking setting (don't extract when masking is on)
- Require opt-in via a
TouchEventBoundary prop (e.g. extractTextChildren: true, default off)
- Both
Scope: touchevents.tsx — child walk logic + masking gate + tests.
Walk
props.childrenat runtime to extract text content from touched components. This is the only option that catches dynamic text like<Text>{t('save')}</Text>.Rough approach:
memoizedProps.childrenup to depth 2<Text>with string children, use as label fallback (after sentry-label, accessibilityLabel, testID)Must be gated on replay masking settings. If
maskAllTextis enabled, extracting text children into breadcrumbs would leak content the user asked us to mask. Options:TouchEventBoundaryprop (e.g.extractTextChildren: true, default off)Scope:
touchevents.tsx— child walk logic + masking gate + tests.