Repository navigation
Avoid rebuilding committed mobile files while typing - #26196
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The footer optimization is ready to merge after normal checks; no concrete merge-blocking issue remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ELI5
Typing a commit message no longer rebuilds the list of files already committed on the branch after every character.
What Changed
Keep the existing committed-file footer element while its nine inputs stay the same. Changes to branch files, compare status, summary, opening paths, busy state, or the file-opening callback still update it immediately. Both the ordinary file list and the branch-only scroll view use the same footer.
Why
The commit message updates the parent component, which previously rebuilt every committed row and icon even though their data had not changed. A component-local
useMemoremoves that repeated work without changing the list, scrolling, text, callbacks, or update timing. It retains one current element rather than introducing a separate data cache or delaying input updates.A generated fixture rendered the actual component, React Native Web, and icons with production React in a hidden Chrome 150 renderer on macOS. Across seven alternating trials of 50 input-state publications, median time per publication was:
This fixture used generated file data and a state wrapper; it did not exercise a physical phone or host RPC. Playwright also typed into the real rendered text input and clicked committed-file rows. The final source matched the frozen original across 14 scenarios and independent changes to all nine footer inputs, including replacement callbacks. Fifty input updates still produced fifty React commits, while committed-row traversals fell from 50 to zero (1,000 row visits to zero with 20 files).
Linked Issue
N/A — maintainer performance audit.
Visual Proof
N/A — the rendered UI and interactions are unchanged. This change avoids rebuilding an unchanged footer during typing; the rendered comparison verified text, row counts, disabled states, and callbacks.
Testing
Three actual-component tests cover both list layouts, 50 text-input changes, and all footer inputs. The frozen original fails the count regression with 1,000 repeated row-format calls; the final source makes zero. Five affected test files / 20 tests pass.
Mobile production typecheck and the test typecheck ratchet pass (934 test files, existing 123-file baseline unchanged). Ordinary oxlint, formatting, and the changed-code quality gate pass without suppressions. The full mobile web build and packaged verifier pass: 16 routes, 74 chunks, 124 assets, 7,965,234 bytes.
Local rendered validation used a hidden Electron renderer on macOS with
ORCA_BACKGROUND_LAUNCH=1; the owned app and CDP listener were closed afterward. No physical Android/iOS test was performed. The change adds no platform, file-path, Git-provider, SSH, or wire behavior.Review
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)