From b92fbc0a5253d44ea0251cd7c1dc3940449566a9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 09:41:41 +0000 Subject: [PATCH 1/6] Generate docs for useAvoidKeyboard,useKeyboardHeight --- .../useAvoidKeyboard/useAvoidKeyboard.md | 54 +++++-------------- .../useKeyboardHeight/useKeyboardHeight.md | 34 +++--------- 2 files changed, 22 insertions(+), 66 deletions(-) diff --git a/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.md b/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.md index a2cfce0a..02e34caf 100644 --- a/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.md +++ b/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.md @@ -1,12 +1,12 @@ # useAvoidKeyboard -A React hook that helps fixed-bottom elements smoothly avoid the on-screen keyboard. When the keyboard appears, it moves the element upward using `transform` with a smooth transition. +`useAvoidKeyboard` is a React hook that helps fixed-bottom elements avoid the on-screen keyboard. It returns a CSS style that can be applied to `position: fixed` elements to smoothly move them above the keyboard when it appears. ## Interface ```ts function useAvoidKeyboard( - options?: UseAvoidKeyboardOptions + options: UseAvoidKeyboardOptions ): UseAvoidKeyboardResult; ``` @@ -15,37 +15,35 @@ function useAvoidKeyboard( @@ -55,19 +53,12 @@ function useAvoidKeyboard( ## Example +````tsx ```tsx function FixedBottomCTA() { const { style } = useAvoidKeyboard(); @@ -86,25 +77,8 @@ function FixedBottomCTA() { ); } -``` +```` -```tsx -// With safe area bottom offset (e.g., for iPhone home indicator) -function FixedBottomCTA() { - const { style } = useAvoidKeyboard({ safeAreaBottom: 34 }); +``` - return ( -
- -
- ); -} ``` diff --git a/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.md b/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.md index 13de536f..1f8214f0 100644 --- a/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.md +++ b/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.md @@ -1,12 +1,12 @@ # useKeyboardHeight -A React hook that tracks the on-screen keyboard height in real time. It automatically updates when the keyboard appears, disappears, or changes size. +`useKeyboardHeight` is a React hook that tracks the on-screen keyboard height. It returns the current keyboard height in pixels, which updates automatically when the keyboard appears, disappears, or changes size. ## Interface ```ts function useKeyboardHeight( - options?: UseKeyboardHeightOptions + options: UseKeyboardHeightOptions ): UseKeyboardHeightResult; ``` @@ -15,15 +15,14 @@ function useKeyboardHeight( @@ -33,19 +32,12 @@ function useKeyboardHeight( ## Example +````tsx ```tsx function ChatInput() { const { keyboardHeight } = useKeyboardHeight(); @@ -56,18 +48,8 @@ function ChatInput() { ); } -``` +```` -```tsx -function KeyboardStatus() { - const { keyboardHeight } = useKeyboardHeight(); +``` - return ( -
- {keyboardHeight > 0 - ? `Keyboard is open (${keyboardHeight}px)` - : 'Keyboard is closed'} -
- ); -} ``` From f44ddf2378212c7071c489db3f9cc79dca8e66ab Mon Sep 17 00:00:00 2001 From: hyesung oh Date: Mon, 10 Aug 2026 19:20:33 +0900 Subject: [PATCH 2/6] fix(scripts): strip markdown fences from @example before wrapping in doc template --- .scripts/commands/generateDocs/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.scripts/commands/generateDocs/index.ts b/.scripts/commands/generateDocs/index.ts index 846937a6..386637fe 100644 --- a/.scripts/commands/generateDocs/index.ts +++ b/.scripts/commands/generateDocs/index.ts @@ -147,6 +147,9 @@ function parseJSDoc(source: string) { : (exampleSource .splice(1, exampleSource.length - 2) .map(line => line.source.replace(/\s\*\s{0,1}/, '')) + // the doc template wraps the example in its own ```tsx fence, so fences + // inside @example would nest and render as literal backticks + .filter(line => !/^\s*```/.test(line)) .join('\n') ?? ''); return { From 6a04c509317866473bc0e5a200546af12619393e Mon Sep 17 00:00:00 2001 From: hyesung oh Date: Mon, 10 Aug 2026 19:20:34 +0900 Subject: [PATCH 3/6] docs(mobile): align hook JSDoc with core convention and regenerate broken docs --- .../pre-tool-advisory-throttle.json | 14 ++++++++++++++ .../src/hooks/useAvoidKeyboard/useAvoidKeyboard.md | 5 ----- .../src/hooks/useAvoidKeyboard/useAvoidKeyboard.ts | 4 ---- .../hooks/useBodyScrollLock/useBodyScrollLock.ts | 10 +++------- .../hooks/useKeyboardHeight/useKeyboardHeight.md | 5 ----- .../hooks/useKeyboardHeight/useKeyboardHeight.ts | 2 -- .../src/hooks/useNetworkStatus/useNetworkStatus.ts | 10 +++------- .../hooks/usePageVisibility/usePageVisibility.ts | 10 +++------- .../src/hooks/useSafeAreaInset/useSafeAreaInset.ts | 12 ++++-------- .../hooks/useScrollDirection/useScrollDirection.ts | 13 ++++++------- .../hooks/useVisualViewport/useVisualViewport.ts | 10 ++++------ 11 files changed, 37 insertions(+), 58 deletions(-) create mode 100644 packages/mobile/src/hooks/.omc/state/sessions/ef17b408-6c47-48b7-adff-7a9cbb860e43/pre-tool-advisory-throttle.json diff --git a/packages/mobile/src/hooks/.omc/state/sessions/ef17b408-6c47-48b7-adff-7a9cbb860e43/pre-tool-advisory-throttle.json b/packages/mobile/src/hooks/.omc/state/sessions/ef17b408-6c47-48b7-adff-7a9cbb860e43/pre-tool-advisory-throttle.json new file mode 100644 index 00000000..25ab3c4c --- /dev/null +++ b/packages/mobile/src/hooks/.omc/state/sessions/ef17b408-6c47-48b7-adff-7a9cbb860e43/pre-tool-advisory-throttle.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "entries": { + "445ed27a3872b681d98190bae61ccb84954e1bc4e140df5370be958dee776b3a": { + "last_emitted_at_ms": 1786357119762, + "message": "Verify changes work after editing. Test functionality before marking complete." + }, + "79a93d4a2f8f50b95f852280616242fee1855dc99a3c75211917f55e72e95fae": { + "last_emitted_at_ms": 1786357106756, + "message": "Use parallel execution for independent tasks. Use run_in_background for long operations (npm install, builds, tests)." + } + }, + "updated_at": "2026-08-10T10:18:39.762Z" +} \ No newline at end of file diff --git a/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.md b/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.md index 02e34caf..b3c3d4a4 100644 --- a/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.md +++ b/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.md @@ -58,7 +58,6 @@ function useAvoidKeyboard( ## Example -````tsx ```tsx function FixedBottomCTA() { const { style } = useAvoidKeyboard(); @@ -77,8 +76,4 @@ function FixedBottomCTA() { ); } -```` - -``` - ``` diff --git a/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.ts b/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.ts index b3c1fe10..c4e52736 100644 --- a/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.ts +++ b/packages/mobile/src/hooks/useAvoidKeyboard/useAvoidKeyboard.ts @@ -49,7 +49,6 @@ type UseAvoidKeyboardResult = { * @returns {UseAvoidKeyboardResult} An object containing the `style` property to apply to the fixed bottom element. * * @example - * ```tsx * function FixedBottomCTA() { * const { style } = useAvoidKeyboard(); * @@ -67,10 +66,8 @@ type UseAvoidKeyboardResult = { * * ); * } - * ``` * * @example - * ```tsx * // With safe area bottom offset (e.g., for iPhone home indicator) * function FixedBottomCTA() { * const { style } = useAvoidKeyboard({ safeAreaBottom: 34 }); @@ -89,7 +86,6 @@ type UseAvoidKeyboardResult = { * * ); * } - * ``` */ export function useAvoidKeyboard(options: UseAvoidKeyboardOptions = {}): UseAvoidKeyboardResult { const { diff --git a/packages/mobile/src/hooks/useBodyScrollLock/useBodyScrollLock.ts b/packages/mobile/src/hooks/useBodyScrollLock/useBodyScrollLock.ts index d775ea25..7468513c 100644 --- a/packages/mobile/src/hooks/useBodyScrollLock/useBodyScrollLock.ts +++ b/packages/mobile/src/hooks/useBodyScrollLock/useBodyScrollLock.ts @@ -4,22 +4,19 @@ import { disableBodyScrollLock } from '../../utils/disableBodyScrollLock/index.t import { enableBodyScrollLock } from '../../utils/enableBodyScrollLock/index.ts'; /** - * Hook to lock body scroll - * - * Automatically locks body scroll when mounted, unlocks when unmounted. + * @description + * `useBodyScrollLock` is a React hook that locks body scroll while the component is mounted. + * It automatically locks on mount and unlocks on unmount. * * **Note:** For multiple overlapping modals, use a single lock at the parent level. * * @example - * ```tsx * function Modal() { * useBodyScrollLock(); * return
Modal content
; * } - * ``` * * @example - * ```tsx * // Multiple modals - single lock pattern * function BodyScrollLock() { * useBodyScrollLock(); @@ -37,7 +34,6 @@ import { enableBodyScrollLock } from '../../utils/enableBodyScrollLock/index.ts' * * ); * } - * ``` */ export function useBodyScrollLock(): void { useEffect(() => { diff --git a/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.md b/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.md index 1f8214f0..68a94597 100644 --- a/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.md +++ b/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.md @@ -37,7 +37,6 @@ function useKeyboardHeight( ## Example -````tsx ```tsx function ChatInput() { const { keyboardHeight } = useKeyboardHeight(); @@ -48,8 +47,4 @@ function ChatInput() { ); } -```` - -``` - ``` diff --git a/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.ts b/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.ts index 8b67cc98..1763e0a5 100644 --- a/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.ts +++ b/packages/mobile/src/hooks/useKeyboardHeight/useKeyboardHeight.ts @@ -29,7 +29,6 @@ type UseKeyboardHeightResult = { * @returns {UseKeyboardHeightResult} An object containing the current keyboard height in pixels. * * @example - * ```tsx * function ChatInput() { * const { keyboardHeight } = useKeyboardHeight(); * @@ -39,7 +38,6 @@ type UseKeyboardHeightResult = { * * ); * } - * ``` */ export function useKeyboardHeight(options: UseKeyboardHeightOptions = {}): UseKeyboardHeightResult { const { immediate = true } = options; diff --git a/packages/mobile/src/hooks/useNetworkStatus/useNetworkStatus.ts b/packages/mobile/src/hooks/useNetworkStatus/useNetworkStatus.ts index ce4fd5ee..39a1af6a 100644 --- a/packages/mobile/src/hooks/useNetworkStatus/useNetworkStatus.ts +++ b/packages/mobile/src/hooks/useNetworkStatus/useNetworkStatus.ts @@ -54,9 +54,9 @@ type NavigatorWithConnection = { } & Navigator; /** - * React hook to access Network Information API - * - * Provides raw network connection data. Returns undefined for all properties + * @description + * `useNetworkStatus` is a React hook that provides access to the Network Information API. + * It provides raw network connection data. Returns undefined for all properties * if the API is not supported (e.g., Safari, Firefox). * * **Browser Support**: @@ -73,7 +73,6 @@ type NavigatorWithConnection = { * - `saveData` - User's data saver preference * * @example - * ```tsx * function AdaptiveImage() { * const { effectiveType, saveData } = useNetworkStatus(); * @@ -87,10 +86,8 @@ type NavigatorWithConnection = { * /> * ); * } - * ``` * * @example - * ```tsx * function VideoPlayer() { * const { type, downlink } = useNetworkStatus(); * @@ -99,7 +96,6 @@ type NavigatorWithConnection = { * * return