diff --git a/__mocks__/@gorhom/bottom-sheet.tsx b/__mocks__/@gorhom/bottom-sheet.tsx
index dae0d65510..87bbe7d3a8 100644
--- a/__mocks__/@gorhom/bottom-sheet.tsx
+++ b/__mocks__/@gorhom/bottom-sheet.tsx
@@ -1,7 +1,8 @@
-import React, {ReactNode} from 'react'
-import {View, ScrollView, Modal, FlatList, TextInput} from 'react-native'
+import React, {type ReactNode} from 'react'
+import {FlatList, Modal, ScrollView, TextInput, View} from 'react-native'
const BottomSheetModalContext = React.createContext(null)
+BottomSheetModalContext.displayName = 'BottomSheetModalContext'
const BottomSheetModalProvider = (props: any) => {
return
@@ -47,13 +48,13 @@ export {useBottomSheetInternal}
export {useBottomSheetDynamicSnapPoints}
export {
- BottomSheetModalProvider,
BottomSheetBackdrop,
+ BottomSheetFlatList,
+ BottomSheetFooter,
BottomSheetHandle,
BottomSheetModal,
- BottomSheetFooter,
+ BottomSheetModalProvider,
BottomSheetScrollView,
- BottomSheetFlatList,
BottomSheetTextInput,
}
diff --git a/modules/bottom-sheet/src/BottomSheetPortal.tsx b/modules/bottom-sheet/src/BottomSheetPortal.tsx
index 4d8ed57ff0..e259a28626 100644
--- a/modules/bottom-sheet/src/BottomSheetPortal.tsx
+++ b/modules/bottom-sheet/src/BottomSheetPortal.tsx
@@ -5,6 +5,7 @@ import {createPortalGroup_INTERNAL} from './lib/Portal'
type PortalContext = React.ElementType<{children: React.ReactNode}>
export const Context = React.createContext({} as PortalContext)
+Context.displayName = 'BottomSheetPortalContext'
export const useBottomSheetPortal_INTERNAL = () => React.useContext(Context)
diff --git a/modules/bottom-sheet/src/lib/Portal.tsx b/modules/bottom-sheet/src/lib/Portal.tsx
index dd1bc4c13f..4dad2d8d2b 100644
--- a/modules/bottom-sheet/src/lib/Portal.tsx
+++ b/modules/bottom-sheet/src/lib/Portal.tsx
@@ -18,6 +18,7 @@ export function createPortalGroup_INTERNAL() {
append: () => {},
remove: () => {},
})
+ Context.displayName = 'BottomSheetPortalContext'
function Provider(props: React.PropsWithChildren<{}>) {
const map = React.useRef({})
diff --git a/src/alf/index.tsx b/src/alf/index.tsx
index 5443669c70..bee8ed78cf 100644
--- a/src/alf/index.tsx
+++ b/src/alf/index.tsx
@@ -8,9 +8,9 @@ import {
setFontScale as persistFontScale,
} from '#/alf/fonts'
import {createThemes, defaultTheme} from '#/alf/themes'
-import {Theme, ThemeName} from '#/alf/types'
+import {type Theme, type ThemeName} from '#/alf/types'
import {BLUE_HUE, GREEN_HUE, RED_HUE} from '#/alf/util/colorGeneration'
-import {Device} from '#/storage'
+import {type Device} from '#/storage'
export {atoms} from '#/alf/atoms'
export * from '#/alf/breakpoints'
@@ -61,6 +61,7 @@ export const Context = React.createContext({
},
flags: {},
})
+Context.displayName = 'AlfContext'
export function ThemeProvider({
children,
diff --git a/src/components/Admonition.tsx b/src/components/Admonition.tsx
index cdb1f0b8b1..ea6751955f 100644
--- a/src/components/Admonition.tsx
+++ b/src/components/Admonition.tsx
@@ -23,6 +23,7 @@ type Context = {
const Context = createContext({
type: 'info',
})
+Context.displayName = 'AdmonitionContext'
export function Icon() {
const t = useTheme()
diff --git a/src/components/Button.tsx b/src/components/Button.tsx
index fd56a28cf2..5a0f0c1c76 100644
--- a/src/components/Button.tsx
+++ b/src/components/Button.tsx
@@ -109,6 +109,7 @@ const Context = React.createContext({
pressed: false,
disabled: false,
})
+Context.displayName = 'ButtonContext'
export function useButtonContext() {
return React.useContext(Context)
diff --git a/src/components/ContextMenu/context.tsx b/src/components/ContextMenu/context.tsx
index cecb6a18d9..d09d3e452f 100644
--- a/src/components/ContextMenu/context.tsx
+++ b/src/components/ContextMenu/context.tsx
@@ -7,10 +7,13 @@ import {
} from '#/components/ContextMenu/types'
export const Context = React.createContext(null)
+Context.displayName = 'ContextMenuContext'
export const MenuContext = React.createContext(null)
+MenuContext.displayName = 'ContextMenuMenuContext'
export const ItemContext = React.createContext(null)
+ItemContext.displayName = 'ContextMenuItemContext'
export function useContextMenuContext() {
const context = React.useContext(Context)
diff --git a/src/components/Dialog/context.ts b/src/components/Dialog/context.ts
index 2ecf5ba618..1caa4eac85 100644
--- a/src/components/Dialog/context.ts
+++ b/src/components/Dialog/context.ts
@@ -23,6 +23,7 @@ export const Context = createContext({
setDisableDrag: () => {},
isWithinDialog: false,
})
+Context.displayName = 'DialogContext'
export function useDialogContext() {
return useContext(Context)
diff --git a/src/components/Grid.tsx b/src/components/Grid.tsx
index d424634de4..2bfac86733 100644
--- a/src/components/Grid.tsx
+++ b/src/components/Grid.tsx
@@ -1,11 +1,12 @@
import {createContext, useContext, useMemo} from 'react'
import {View} from 'react-native'
-import {atoms as a, ViewStyleProp} from '#/alf'
+import {atoms as a, type ViewStyleProp} from '#/alf'
const Context = createContext({
gap: 0,
})
+Context.displayName = 'GridContext'
export function Row({
children,
diff --git a/src/components/Layout/Header/index.tsx b/src/components/Layout/Header/index.tsx
index d68f4bd1d2..1a049a6966 100644
--- a/src/components/Layout/Header/index.tsx
+++ b/src/components/Layout/Header/index.tsx
@@ -77,6 +77,7 @@ export function Outer({
}
const AlignmentContext = createContext<'platform' | 'left'>('platform')
+AlignmentContext.displayName = 'AlignmentContext'
export function Content({
children,
diff --git a/src/components/Layout/context.ts b/src/components/Layout/context.ts
index 8e0c5445e8..f3ee7d4e51 100644
--- a/src/components/Layout/context.ts
+++ b/src/components/Layout/context.ts
@@ -3,3 +3,4 @@ import React from 'react'
export const ScrollbarOffsetContext = React.createContext({
isWithinOffsetView: false,
})
+ScrollbarOffsetContext.displayName = 'ScrollbarOffsetContext'
diff --git a/src/components/Menu/context.tsx b/src/components/Menu/context.tsx
index 076bc81511..1c4a873b3b 100644
--- a/src/components/Menu/context.tsx
+++ b/src/components/Menu/context.tsx
@@ -3,8 +3,10 @@ import React from 'react'
import {type ContextType, type ItemContextType} from '#/components/Menu/types'
export const Context = React.createContext(null)
+Context.displayName = 'MenuContext'
export const ItemContext = React.createContext(null)
+ItemContext.displayName = 'MenuItemContext'
export function useMenuContext() {
const context = React.useContext(Context)
diff --git a/src/components/PolicyUpdateOverlay/context.tsx b/src/components/PolicyUpdateOverlay/context.tsx
index 4f6e56e214..abb058d3c5 100644
--- a/src/components/PolicyUpdateOverlay/context.tsx
+++ b/src/components/PolicyUpdateOverlay/context.tsx
@@ -28,6 +28,7 @@ const Context = createContext<{
*/
setIsReadyToShowOverlay: () => {},
})
+Context.displayName = 'PolicyUpdateOverlayContext'
export function usePolicyUpdateContext() {
const context = useContext(Context)
diff --git a/src/components/Portal.tsx b/src/components/Portal.tsx
index 4e03d6b089..b4bebce4de 100644
--- a/src/components/Portal.tsx
+++ b/src/components/Portal.tsx
@@ -28,6 +28,7 @@ export function createPortalGroup() {
append: () => {},
remove: () => {},
})
+ Context.displayName = 'PortalContext'
function Provider(props: React.PropsWithChildren<{}>) {
const map = useRef({})
diff --git a/src/components/Post/Embed/VideoEmbed/ActiveVideoWebContext.tsx b/src/components/Post/Embed/VideoEmbed/ActiveVideoWebContext.tsx
index a038403b22..c6e0eec32e 100644
--- a/src/components/Post/Embed/VideoEmbed/ActiveVideoWebContext.tsx
+++ b/src/components/Post/Embed/VideoEmbed/ActiveVideoWebContext.tsx
@@ -15,6 +15,7 @@ const Context = React.createContext<{
setActiveView: (viewId: string) => void
sendViewPosition: (viewId: string, y: number) => void
} | null>(null)
+Context.displayName = 'ActiveVideoWebContext'
export function Provider({children}: {children: React.ReactNode}) {
if (!isWeb) {
diff --git a/src/components/Post/Embed/VideoEmbed/VideoVolumeContext.tsx b/src/components/Post/Embed/VideoEmbed/VideoVolumeContext.tsx
index 6343081da8..7db5f9842e 100644
--- a/src/components/Post/Embed/VideoEmbed/VideoVolumeContext.tsx
+++ b/src/components/Post/Embed/VideoEmbed/VideoVolumeContext.tsx
@@ -8,6 +8,7 @@ const Context = React.createContext<{
volume: number
setVolume: React.Dispatch>
} | null>(null)
+Context.displayName = 'VideoVolumeContext'
export function Provider({children}: {children: React.ReactNode}) {
const [muted, setMuted] = React.useState(true)
diff --git a/src/components/Post/Embed/VideoEmbed/index.web.tsx b/src/components/Post/Embed/VideoEmbed/index.web.tsx
index 5bb54eef88..28341d8266 100644
--- a/src/components/Post/Embed/VideoEmbed/index.web.tsx
+++ b/src/components/Post/Embed/VideoEmbed/index.web.tsx
@@ -125,6 +125,7 @@ export function VideoEmbed({
}
const NearScreenContext = createContext(false)
+NearScreenContext.displayName = 'VideoNearScreenContext'
/**
* Renders a 100vh tall div and watches it with an IntersectionObserver to
diff --git a/src/components/PostControls/PostControlButton.tsx b/src/components/PostControls/PostControlButton.tsx
index f41f950494..ae69b1322d 100644
--- a/src/components/PostControls/PostControlButton.tsx
+++ b/src/components/PostControls/PostControlButton.tsx
@@ -13,6 +13,7 @@ const PostControlContext = createContext<{
active?: boolean
color?: {color: string}
}>({})
+PostControlContext.displayName = 'PostControlContext'
// Base button style, which the the other ones extend
export function PostControlButton({
diff --git a/src/components/Prompt.tsx b/src/components/Prompt.tsx
index 2ff0c7ccc3..626d8316d3 100644
--- a/src/components/Prompt.tsx
+++ b/src/components/Prompt.tsx
@@ -27,6 +27,7 @@ const Context = React.createContext<{
titleId: '',
descriptionId: '',
})
+Context.displayName = 'PromptContext'
export function Outer({
children,
diff --git a/src/components/Select/index.tsx b/src/components/Select/index.tsx
index 4e8e53216e..82520f12a2 100644
--- a/src/components/Select/index.tsx
+++ b/src/components/Select/index.tsx
@@ -34,10 +34,12 @@ type ContextType = {
} & Pick
const Context = createContext(null)
+Context.displayName = 'SelectContext'
const ValueTextContext = createContext<
[any, React.Dispatch>]
>([undefined, () => {}])
+ValueTextContext.displayName = 'ValueTextContext'
function useSelectContext() {
const ctx = useContext(Context)
@@ -229,6 +231,7 @@ const ItemContext = createContext<{
focused: false,
pressed: false,
})
+ItemContext.displayName = 'SelectItemContext'
export function useItemContext() {
return useContext(ItemContext)
diff --git a/src/components/Select/index.web.tsx b/src/components/Select/index.web.tsx
index 324148683b..4e92d3c517 100644
--- a/src/components/Select/index.web.tsx
+++ b/src/components/Select/index.web.tsx
@@ -23,6 +23,7 @@ import {
} from './types'
const SelectedValueContext = createContext(null)
+SelectedValueContext.displayName = 'SelectSelectedValueContext'
export function Root(props: RootProps) {
return (
@@ -219,6 +220,7 @@ const ItemContext = createContext<{
pressed: false,
selected: false,
})
+ItemContext.displayName = 'SelectItemContext'
export function useItemContext() {
return useContext(ItemContext)
diff --git a/src/components/Toast/Toast.tsx b/src/components/Toast/Toast.tsx
index 2d1ea4261e..908b470a4a 100644
--- a/src/components/Toast/Toast.tsx
+++ b/src/components/Toast/Toast.tsx
@@ -24,6 +24,7 @@ export const ICONS = {
const Context = createContext({
type: 'default',
})
+Context.displayName = 'ToastContext'
export function Toast({
type,
diff --git a/src/components/Tooltip/index.tsx b/src/components/Tooltip/index.tsx
index fbdb969db6..a7d1510205 100644
--- a/src/components/Tooltip/index.tsx
+++ b/src/components/Tooltip/index.tsx
@@ -53,12 +53,14 @@ const TooltipContext = createContext({
visible: false,
onVisibleChange: () => {},
})
+TooltipContext.displayName = 'TooltipContext'
const TargetContext = createContext({
targetMeasurements: undefined,
setTargetMeasurements: () => {},
shouldMeasure: false,
})
+TargetContext.displayName = 'TargetContext'
export function Outer({
children,
diff --git a/src/components/Tooltip/index.web.tsx b/src/components/Tooltip/index.web.tsx
index fc5808d7ad..69b4cd3380 100644
--- a/src/components/Tooltip/index.web.tsx
+++ b/src/components/Tooltip/index.web.tsx
@@ -20,6 +20,7 @@ const TooltipContext = createContext({
position: 'bottom',
onVisibleChange: () => {},
})
+TooltipContext.displayName = 'TooltipContext'
export function Outer({
children,
diff --git a/src/components/dialogs/Context.tsx b/src/components/dialogs/Context.tsx
index 8c700cafea..bc802482fd 100644
--- a/src/components/dialogs/Context.tsx
+++ b/src/components/dialogs/Context.tsx
@@ -27,6 +27,7 @@ type ControlsContext = {
}
const ControlsContext = createContext(null)
+ControlsContext.displayName = 'GlobalDialogControlsContext'
export function useGlobalDialogsControlContext() {
const ctx = useContext(ControlsContext)
diff --git a/src/components/dialogs/nuxs/index.tsx b/src/components/dialogs/nuxs/index.tsx
index 5529893c01..2daf4a2683 100644
--- a/src/components/dialogs/nuxs/index.tsx
+++ b/src/components/dialogs/nuxs/index.tsx
@@ -47,6 +47,7 @@ const Context = React.createContext({
activeNux: undefined,
dismissActiveNux: () => {},
})
+Context.displayName = 'NuxDialogContext'
export function useNuxDialogContext() {
return React.useContext(Context)
diff --git a/src/components/dms/MessageContext.tsx b/src/components/dms/MessageContext.tsx
index 84056fb306..645079eb26 100644
--- a/src/components/dms/MessageContext.tsx
+++ b/src/components/dms/MessageContext.tsx
@@ -1,6 +1,7 @@
import React from 'react'
const MessageContext = React.createContext(false)
+MessageContext.displayName = 'MessageContext'
export function MessageContextProvider({
children,
diff --git a/src/components/forms/TextField.tsx b/src/components/forms/TextField.tsx
index 3913c32831..9993317d6a 100644
--- a/src/components/forms/TextField.tsx
+++ b/src/components/forms/TextField.tsx
@@ -46,6 +46,7 @@ const Context = createContext<{
onFocus: () => {},
onBlur: () => {},
})
+Context.displayName = 'TextFieldContext'
export type RootProps = React.PropsWithChildren<{isInvalid?: boolean}>
diff --git a/src/components/forms/Toggle.tsx b/src/components/forms/Toggle.tsx
index 4e3695bbf2..9c3564aa54 100644
--- a/src/components/forms/Toggle.tsx
+++ b/src/components/forms/Toggle.tsx
@@ -1,5 +1,5 @@
import React from 'react'
-import {Pressable, View, ViewStyle} from 'react-native'
+import {Pressable, View, type ViewStyle} from 'react-native'
import Animated, {LinearTransition} from 'react-native-reanimated'
import {HITSLOP_10} from '#/lib/constants'
@@ -8,9 +8,9 @@ import {
atoms as a,
flatten,
native,
- TextStyleProp,
+ type TextStyleProp,
useTheme,
- ViewStyleProp,
+ type ViewStyleProp,
} from '#/alf'
import {useInteractionState} from '#/components/hooks/useInteractionState'
import {CheckThick_Stroke2_Corner0_Rounded as Checkmark} from '#/components/icons/Check'
@@ -35,6 +35,7 @@ const ItemContext = React.createContext({
pressed: false,
focused: false,
})
+ItemContext.displayName = 'ToggleItemContext'
const GroupContext = React.createContext<{
values: string[]
@@ -49,6 +50,7 @@ const GroupContext = React.createContext<{
maxSelectionsReached: false,
setFieldValue: () => {},
})
+GroupContext.displayName = 'ToggleGroupContext'
export type GroupProps = React.PropsWithChildren<{
type?: 'radio' | 'checkbox'
diff --git a/src/components/intents/IntentDialogs.tsx b/src/components/intents/IntentDialogs.tsx
index 244850370d..40b227e499 100644
--- a/src/components/intents/IntentDialogs.tsx
+++ b/src/components/intents/IntentDialogs.tsx
@@ -1,7 +1,7 @@
import React from 'react'
import * as Dialog from '#/components/Dialog'
-import {DialogControlProps} from '#/components/Dialog'
+import {type DialogControlProps} from '#/components/Dialog'
import {VerifyEmailIntentDialog} from '#/components/intents/VerifyEmailIntentDialog'
interface Context {
@@ -11,6 +11,7 @@ interface Context {
}
const Context = React.createContext({} as Context)
+Context.displayName = 'IntentDialogsContext'
export const useIntentDialogs = () => React.useContext(Context)
export function Provider({children}: {children: React.ReactNode}) {
diff --git a/src/components/moderation/Hider.tsx b/src/components/moderation/Hider.tsx
index 39f28b4034..c6b332e431 100644
--- a/src/components/moderation/Hider.tsx
+++ b/src/components/moderation/Hider.tsx
@@ -1,8 +1,8 @@
import React from 'react'
-import {ModerationUI} from '@atproto/api'
+import {type ModerationUI} from '@atproto/api'
import {
- ModerationCauseDescription,
+ type ModerationCauseDescription,
useModerationCauseDescription,
} from '#/lib/moderation/useModerationCauseDescription'
import {
@@ -22,6 +22,7 @@ type Context = {
}
const Context = React.createContext({} as Context)
+Context.displayName = 'HiderContext'
export const useHider = () => React.useContext(Context)
diff --git a/src/lib/ScrollContext.tsx b/src/lib/ScrollContext.tsx
index d55b8cdabb..7cab5236b4 100644
--- a/src/lib/ScrollContext.tsx
+++ b/src/lib/ScrollContext.tsx
@@ -1,5 +1,5 @@
-import React, {createContext, useContext, useMemo} from 'react'
-import {ScrollHandlers} from 'react-native-reanimated'
+import {createContext, useContext, useMemo} from 'react'
+import {type ScrollHandlers} from 'react-native-reanimated'
const ScrollContext = createContext>({
onBeginDrag: undefined,
@@ -7,6 +7,7 @@ const ScrollContext = createContext>({
onScroll: undefined,
onMomentumEnd: undefined,
})
+ScrollContext.displayName = 'ScrollContext'
export function useScrollHandlers(): ScrollHandlers {
return useContext(ScrollContext)
diff --git a/src/lib/ThemeContext.tsx b/src/lib/ThemeContext.tsx
index c00d26606f..9714d8e0e7 100644
--- a/src/lib/ThemeContext.tsx
+++ b/src/lib/ThemeContext.tsx
@@ -89,6 +89,7 @@ export interface ThemeProviderProps {
}
export const ThemeContext = createContext(defaultTheme)
+ThemeContext.displayName = 'ThemeContext'
export const useTheme = () => useContext(ThemeContext)
diff --git a/src/lib/hooks/useEnableKeyboardController.tsx b/src/lib/hooks/useEnableKeyboardController.tsx
index 858f6943a4..5d9348bcdd 100644
--- a/src/lib/hooks/useEnableKeyboardController.tsx
+++ b/src/lib/hooks/useEnableKeyboardController.tsx
@@ -19,6 +19,8 @@ const KeyboardControllerRefCountContext = createContext<{
incrementRefCount: () => {},
decrementRefCount: () => {},
})
+KeyboardControllerRefCountContext.displayName =
+ 'KeyboardControllerRefCountContext'
export function KeyboardControllerProvider({
children,
diff --git a/src/lib/hooks/useHideBottomBarBorder.tsx b/src/lib/hooks/useHideBottomBarBorder.tsx
index e21184fda4..6cbe9ad3df 100644
--- a/src/lib/hooks/useHideBottomBarBorder.tsx
+++ b/src/lib/hooks/useHideBottomBarBorder.tsx
@@ -4,8 +4,11 @@ import {useFocusEffect} from '@react-navigation/native'
type HideBottomBarBorderSetter = () => () => void
const HideBottomBarBorderContext = createContext(false)
+HideBottomBarBorderContext.displayName = 'HideBottomBarBorderContext'
const HideBottomBarBorderSetterContext =
createContext(null)
+HideBottomBarBorderSetterContext.displayName =
+ 'HideBottomBarBorderSetterContext'
export function useHideBottomBarBorderSetter() {
const hideBottomBarBorder = useContext(HideBottomBarBorderSetterContext)
diff --git a/src/lib/statsig/statsig.tsx b/src/lib/statsig/statsig.tsx
index 1091c82e04..860e841eb4 100644
--- a/src/lib/statsig/statsig.tsx
+++ b/src/lib/statsig/statsig.tsx
@@ -147,6 +147,7 @@ function toStringRecord(
// and it's been difficult to get it to behave in a predictable way.
// Our own cache ensures consistent evaluation within a single session.
const GateCache = React.createContext