fix(desktop): make snapshot extension enable idempotent - #11630
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused idempotency bug fix that avoids a redundant GNOME D-Bus enable call when the extension is already active, with a regression test covering the new behavior. Other setup actions and existing states are unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe GNOME capture setup now returns early when ChangesGNOME capture enable behavior
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The enabled-extension path now completes without an unnecessary D-Bus request, and no concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
What Changed
Treat enabling the GNOME snapshot extension as a successful no-op when GNOME already reports it as active. A focused regression test verifies that setup resolves successfully without sending a redundant
EnableExtensioncall.Why
A repeated or raced setup action currently turns the valid
enabledstate into aDesktopSnapShotSetupError. This makes the app report that it could not set up the GNOME extension even though capture is already ready.Checklist
Verification
vp test run apps/desktop/src/snapShot/GnomeCaptureSetup.test.tsvp lint apps/desktop/src/snapShot/GnomeCaptureSetup.ts apps/desktop/src/snapShot/GnomeCaptureSetup.test.tsvp fmt --check apps/desktop/src/snapShot/GnomeCaptureSetup.ts apps/desktop/src/snapShot/GnomeCaptureSetup.test.tsvp run --filter @t3tools/desktop typecheckModel: GPT-5
Harness: Codex desktop app
Summary by CodeRabbit