From 475d7fd7f60b391766ea3bc3eb5e8fb94de864d3 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Fri, 29 May 2026 09:30:34 -0700 Subject: [PATCH] Document mobile browser address cleanup (#3229) --- docs/reference/react-performance-audit.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/reference/react-performance-audit.md b/docs/reference/react-performance-audit.md index ed0745e03..5d3e8e2f3 100644 --- a/docs/reference/react-performance-audit.md +++ b/docs/reference/react-performance-audit.md @@ -49,7 +49,7 @@ Initial inventory: Current count after low-risk PRs #3038, #3041, #3042, #3044, #3051, #3052, #3053, #3054, #3055, #3056, #3058, #3059, #3060, #3062, #3063, #3064, #3065, #3066, #3067, #3068, #3069, #3083, #3087, #3091, #3100, #3104, #3122, #3160, #3164, #3166, and #3223: 921 Effect hook call sites. -Open medium-risk PRs #3070, #3073, #3077, #3089, #3093, #3102, #3108, #3110, #3112, #3118, #3124, #3126, #3128, #3130, #3132, #3134, #3142, #3144, #3146, #3148, #3150, #3152, #3154, #3170, #3176, #3184, #3186, #3188, #3192, #3195, #3198, #3200, #3202, #3206, #3218, #3220, and #3226 each project to 920 Effect hook call sites on the current merged baseline; open medium-risk PRs #3097, #3106, #3116, #3120, #3136, #3138, #3180, #3210, and #3214 each project to 919; open medium-risk PRs #3114 and #3168 each project to 918; open medium-risk PRs #3095 and #3140 each project to 917; open medium-risk PR #3079 projects to 911; open high-risk PRs #3157 and #3212 each project to 920; open high-risk PR #3075 projects to 917; and open high-risk PR #3081 projects to 913. These are not counted in the merged baseline until reviewed and merged. +Open medium-risk PRs #3070, #3073, #3077, #3089, #3093, #3102, #3108, #3110, #3112, #3118, #3124, #3126, #3128, #3130, #3132, #3134, #3142, #3144, #3146, #3148, #3150, #3152, #3154, #3170, #3176, #3184, #3186, #3188, #3192, #3195, #3198, #3200, #3202, #3206, #3218, #3220, #3226, and #3228 each project to 920 Effect hook call sites on the current merged baseline; open medium-risk PRs #3097, #3106, #3116, #3120, #3136, #3138, #3180, #3210, and #3214 each project to 919; open medium-risk PRs #3114 and #3168 each project to 918; open medium-risk PRs #3095 and #3140 each project to 917; open medium-risk PR #3079 projects to 911; open high-risk PRs #3157 and #3212 each project to 920; open high-risk PR #3075 projects to 917; and open high-risk PR #3081 projects to 913. These are not counted in the merged baseline until reviewed and merged. | Area | Files / signal | Scan status | Notes | | ------------------------------ | -------------------------------------------------------------------------------------------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | @@ -67,7 +67,7 @@ Open medium-risk PRs #3070, #3073, #3077, #3089, #3093, #3102, #3108, #3110, #31 | Onboarding / feature wall | `components/onboarding/**`, `components/feature-wall/**` | Inventory complete, manual review in progress | Select portal root Effects covered by #3087; tour visited-marker Effects covered by #3095; persisted completion close reset covered by #3188; onboarding settings hydration covered by #3198. Continue with demo timers and telemetry while avoiding telemetry semantic changes. | | Status, dashboard, activity | `components/status-bar/**`, `components/dashboard/**`, `components/activity/**`, `components/pet/**` | Inventory complete, manual review in progress | Status-bar account menu close reset covered by #3051; pet overlay size clamp covered by #3118; Activity selected-thread repair covered by #3126; Workspace Space row-state repairs covered by #3168; Resource Manager Space scan-ready latch covered by #3200. Check interval sharing, retained agent state, activity terminal portals. | | Mobile app routes | `mobile/app/**` | Inventory complete, manual review pending | 79 Effects, including large `tasks.tsx` and session route. Remote-client parity required. | -| Mobile shared source | `mobile/src/**` | Inventory complete, manual review in progress | TextInputModal and CustomKeyModal open-state resets covered by #3223; BottomDrawer mount bookkeeping covered by #3226. Continue with browser pane, transport client context, dictation hook, and new worktree modal. | +| Mobile shared source | `mobile/src/**` | Inventory complete, manual review in progress | TextInputModal and CustomKeyModal open-state resets covered by #3223; BottomDrawer mount bookkeeping covered by #3226; MobileBrowserPane address sync covered by #3228. Continue with transport client context, dictation hook, and new worktree modal. | | Expo two-way audio hook | `mobile/packages/expo-two-way-audio/src/hooks.ts` | Inventory complete, manual review pending | Single Effect plus `useSyncExternalStore`; verify native subscription cleanup. | | Tests with hook mocks | `*.test.ts`, `*.test.tsx`, e2e comments | Inventory complete, manual review pending | Do not count comment-only mentions as app Effect sites; update tests beside behavior changes. | @@ -171,6 +171,7 @@ These are candidate batches, not final conclusions. Each item needs code inspect | PR CN | App lazy-modal mount state | Root lazy modal ids were retained in an Effect after `activeModal` changed, adding a render pass before first-use modal mount. | `App.tsx`, `lazy-modal-mount-state.ts` covered by #3220 | Medium | | PR CO | Mobile shared modal open resets | Mobile TextInput and custom-key modals reset local drafts in Effects after opening, leaving one possible stale first paint. | `TextInputModal.tsx`, `CustomKeyModal.tsx` covered by #3223 | Low | | PR CP | Mobile BottomDrawer mounted state | The shared mobile drawer mounted after opening in a passive Effect, adding a null commit before drawer animations could start. | `BottomDrawer.tsx`, `bottom-drawer-mount-state.ts` covered by #3226 | Medium | +| PR CQ | Mobile browser address sync | The mobile browser address field synced tab URL changes in an Effect after focus/tab updates, leaving one stale paint after blur or tab URL changes. | `MobileBrowserPane.tsx`, `mobile-browser-address-sync.ts` covered by #3228 | Medium | ## Merge Risk Scale @@ -270,6 +271,7 @@ These are candidate batches, not final conclusions. Each item needs code inspect | #3220 | `nwparker/react-perf-app-lazy-modals` | App lazy-modal mount state resolves before commit | Medium | Open | `pnpm exec oxlint src/renderer/src/App.tsx src/renderer/src/lazy-modal-mount-state.ts src/renderer/src/lazy-modal-mount-state.test.ts`; `pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lazy-modal-mount-state.test.ts`; `pnpm run typecheck:web`; `git diff --check origin/main...HEAD`; AST Effect count 923 -> 922. | | #3223 | `nwparker/react-perf-mobile-modal-resets` | Mobile shared modal draft resets move out of Effects | Low | Merged | `pnpm exec oxlint mobile/src/components/TextInputModal.tsx mobile/src/components/CustomKeyModal.tsx`; `pnpm run typecheck:web`; `git diff --check origin/main...HEAD`; AST Effect count 923 -> 921. Mobile package-local typecheck blocked by missing Expo/mobile deps/config in this checkout. | | #3226 | `nwparker/react-perf-bottom-drawer-mounted` | Mobile BottomDrawer mounted state resolves before commit | Medium | Open | `pnpm exec oxlint mobile/src/components/BottomDrawer.tsx mobile/src/components/bottom-drawer-mount-state.ts mobile/src/components/bottom-drawer-mount-state.test.ts`; `pnpm run typecheck:web`; `git diff --check origin/main...HEAD`; `pnpm exec tsx -e "import { strict as assert } from 'node:assert'; import { resolveBottomDrawerMounted } from './mobile/src/components/bottom-drawer-mount-state.ts'; assert.equal(resolveBottomDrawerMounted(true, false), true); assert.equal(resolveBottomDrawerMounted(true, true), true); assert.equal(resolveBottomDrawerMounted(false, true), true); assert.equal(resolveBottomDrawerMounted(false, false), false); console.log('bottom-drawer-mount-state ok')"`; AST Effect count 921 -> 920. Mobile Vitest blocked by missing `expo/tsconfig.base` in this checkout. | +| #3228 | `nwparker/react-perf-mobile-browser-address` | Mobile browser address sync resolves before commit | Medium | Open | `pnpm exec oxlint mobile/src/browser/MobileBrowserPane.tsx mobile/src/browser/mobile-browser-address-sync.ts mobile/src/browser/mobile-browser-address-sync.test.ts`; `pnpm run typecheck:web`; `git diff --check origin/main...HEAD`; `pnpm exec tsx -e "import { strict as assert } from 'node:assert'; import { resolveMobileBrowserAddressSync } from './mobile/src/browser/mobile-browser-address-sync.ts'; assert.deepEqual(resolveMobileBrowserAddressSync({ focused: false, url: 'https://old.example/' }, { focused: false, url: 'https://new.example/' }), { nextState: { focused: false, url: 'https://new.example/' }, shouldSyncValue: true }); assert.deepEqual(resolveMobileBrowserAddressSync({ focused: false, url: 'https://old.example/' }, { focused: true, url: 'https://new.example/' }), { nextState: { focused: true, url: 'https://new.example/' }, shouldSyncValue: false }); assert.deepEqual(resolveMobileBrowserAddressSync({ focused: true, url: 'https://new.example/' }, { focused: false, url: 'https://new.example/' }), { nextState: { focused: false, url: 'https://new.example/' }, shouldSyncValue: true }); const previous = { focused: false, url: 'https://new.example/' }; assert.deepEqual(resolveMobileBrowserAddressSync(previous, { focused: false, url: 'https://new.example/' }), { nextState: previous, shouldSyncValue: false }); console.log('mobile-browser-address-sync ok')"`; AST Effect count 921 -> 920. Mobile Vitest blocked by missing `expo/tsconfig.base` in this checkout. | ## Reproduction Commands