Repository navigation
Conversation
AI commit generation crosses workspace transitions and admits duplicate calls before a render. Retire the active run on scope changes and use synchronous admission.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
ELI5
Ask AI to write a commit message, then switch workspaces before it finishes. The result can appear in the wrong workspace. Quick repeated taps can also start the request twice. This fix ignores the old workspace's result and starts only one request at a time.
What Changed
Why
Generated text should go into the commit you asked about, and one tap should start one request.
Linked Issue
Maintainer-discovered regression. Bounded GitHub symptom and exact-file searches found no exact duplicate. Related #30142 preserves typed text and canceled runs; this adds scope invalidation and synchronous request admission.
Visual Proof
Captured using the visual-proof skill. Before uses base
15246eb4a45; after uses updated PR commit2f4e49cc9b4. The scenario passed three asserted capture runs per version, followed by a separately asserted recorded run. Screenshots were visually inspected.Evidence scope: Explicitly labeled production-hook harness using actual useMobileCommitMessageGeneration. Composer and workspace-switch controls are fixture HTML. Hook harness, not native source-control screen/composer layout proof. Production generation hook, mutation operation and reply schema run; sendRequest is a fixture. Haptics are stubbed. Capture covers stale success after workspace change and current generation recovery; duplicate synchronous admission, stale error and cancellation rely on separate focused tests.
The host/storage operations remain asynchronous. The synchronization follow-up moves scope invalidation from render to a layout effect, before the committed UI paints. A suspended-transition regression fails with the previous implementation and passes with this change. These browser captures do not claim native gestures, keyboard, focus, safe-area or real-network verification.
Testing
ORCA_BACKGROUND_LAUNCH=1 pnpm --dir mobile test src/source-control/use-mobile-commit-message-generation.test.tsThe combined mobile change set passed 410 suites / 3,626 tests, production typecheck, the tests-typecheck ratchet, formatting, the changed-code quality gate, and the mobile-web build/asset verifier on macOS. These aggregate results are not a claim that the entire suite was rerun on this isolated branch. PR CI validates the branch against current main.
Review
Merge risk: Low. A small change to deciding which generation request can update the commit message; the AI request still runs in the background.
Previously reviewed by a separate agent team; reported issues were fixed and checked again.
Agent skill upstream boundary
Notes
Existing RPC methods and wire compatibility are retained. Review considered desktop host changes, remote execution authority, folder workspaces, and native/web consumers. Native simulator follow-up was limited after the three owned simulators became stuck shutting down; no unrelated simulator/process was reset.
Checklist