diff --git a/docs/reference/react-performance-audit.md b/docs/reference/react-performance-audit.md index ce50a0fb2d1..a72af949868 100644 --- a/docs/reference/react-performance-audit.md +++ b/docs/reference/react-performance-audit.md @@ -49,13 +49,13 @@ 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, and #3069: 936 Effect hook call sites. -Open medium-risk PRs #3070, #3073, and #3077 each lower their branch count to 935 Effect hook call sites; open medium-risk PR #3079 lowers its branch count to 926; and open high-risk PR #3075 lowers its branch count to 932. These are not counted in the merged baseline until reviewed and merged. +Open medium-risk PRs #3070, #3073, and #3077 each lower their branch count to 935 Effect hook call sites; open medium-risk PR #3079 lowers its branch count to 926; open high-risk PR #3075 lowers its branch count to 932; and open high-risk PR #3081 lowers its branch count to 928. These are not counted in the merged baseline until reviewed and merged. | Area | Files / signal | Scan status | Notes | | ------------------------------ | -------------------------------------------------------------------------------------------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | Renderer app shell | `src/renderer/src/App.tsx`, root components | Inventory complete, manual review pending | Check global listeners, beforeunload, media-query, sidebar resize, active-tab repair. | | Terminal / PTY | `components/Terminal.tsx`, `components/terminal-pane/**`, `components/terminal/**` | Inventory complete, manual review pending | High-risk area: xterm lifecycle, scrollback, remote/mobile parity, focus, WebGL, resize. | -| Browser pane | `components/browser-pane/**` | Inventory complete, manual review in progress | Highest Effect density: 62 sites in `BrowserPane.tsx`. Check driver sync, address bar derived state, find state, webview lifetime. | +| Browser pane | `components/browser-pane/**` | Inventory complete, manual review in progress | Highest Effect density: 62 sites in `BrowserPane.tsx`. Browser ref mirrors covered by #3081; continue with driver sync, address bar derived state, find state, webview lifetime. | | Editor / markdown / Monaco | `components/editor/**` | Inventory complete, manual review in progress | 117 area Effects. Check editor model cleanup, preview scroll restore, search debounce, generated decorations. | | Sidebar / worktrees | `components/sidebar/**` | Inventory complete, manual review in progress | Check worktree list state repair, drag/drop global listeners, kanban pointer flows, inline rename. | | Right sidebar / source control | `components/right-sidebar/**` | Inventory complete, manual review pending | Check polling, PR checks, file explorer watch/reveal, source-control local resets. Git provider compatibility required. | @@ -108,6 +108,7 @@ These are candidate batches, not final conclusions. Each item needs code inspect | PR AF | Source-control selection ref mirrors | Four ref mirror Effects keep stable source-control row handlers pointed at latest selection inputs. | `useSourceControlSelection.ts` covered by #3075 | High | | PR AG | Notebook cell editor callback refs | A ref mirror Effect keeps embedded Monaco save/deactivate handlers pointed at latest callbacks. | `IpynbViewer.tsx` covered by #3077 | Medium | | PR AH | Rich markdown editor ref mirrors | Nine ref mirror Effects keep stable ProseMirror/menu handlers pointed at latest editor UI state. | `RichMarkdownEditor.tsx` covered by #3079 | Medium | +| PR AI | Browser pane ref mirrors | Eight ref mirror Effects keep browser/webview callbacks and latest tab state available to stable handlers. | `BrowserPane.tsx`, `useGrabMode.ts` covered by #3081 | High | ## Merge Risk Scale @@ -147,6 +148,7 @@ These are candidate batches, not final conclusions. Each item needs code inspect | #3075 | `nwparker/react-perf-source-control-selection-refs` | Source-control selection ref mirrors move out of Effects | High | Open | `pnpm exec oxlint src/renderer/src/components/right-sidebar/useSourceControlSelection.ts`; `pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/right-sidebar/useSourceControlSelection.test.ts`; `pnpm run typecheck:web`. | | #3077 | `nwparker/react-perf-ipynb-cell-editor-refs` | Notebook cell editor callback refs move out of an Effect | Medium | Open | `pnpm exec oxlint src/renderer/src/components/editor/IpynbViewer.tsx`; `pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/editor/ipynb-parse.test.ts`; `pnpm run typecheck:web`. | | #3079 | `nwparker/react-perf-rich-markdown-refs` | Rich markdown editor ref mirrors move out of Effects | Medium | Open | `pnpm exec oxlint src/renderer/src/components/editor/RichMarkdownEditor.tsx`; `pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/editor/rich-markdown-key-handler.test.ts src/renderer/src/components/editor/RichMarkdownSlashMenu.test.tsx src/renderer/src/components/editor/markdown-doc-completions.test.ts src/renderer/src/components/editor/rich-markdown-commands.test.ts`; `pnpm run typecheck:web`. | +| #3081 | `nwparker/react-perf-browser-ref-mirrors` | Browser pane ref mirrors move out of Effects | High | Open | `pnpm exec oxlint src/renderer/src/components/browser-pane/useGrabMode.ts src/renderer/src/components/browser-pane/BrowserPane.tsx`; `pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/browser-pane/browser-pane-page-selection.test.ts src/renderer/src/components/browser-pane/context-menu-positioning.test.ts`; `pnpm run typecheck:web`; Electron sanity launch/attach on CDP port 9333, branch identity confirmed, zero console errors, existing browser webview target observed. | ## Reproduction Commands