fix(threads): make completed-PR auto-settle configurable - #5842
fix(threads): make completed-PR auto-settle configurable#5842JasperG134 wants to merge 9 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature (configurable auto-settle toggle for completed PRs) across web, desktop, and mobile. New capabilities that change user-facing behavior warrant human review, even when well-tested and backward-compatible. You can customize Macroscope's approvability policy. Learn more. |
What Changed
Adds an independent, default-on Auto-settle completed pull requests setting. When disabled, a merged or closed pull request no longer settles its thread by itself; the ordinary inactivity rule and explicit Settle action still work independently.
The shared classification policy and every current production caller now receive the setting explicitly. Web and desktop persist it in Client Settings, while mobile stores the same completed-PR preference per device. This intentionally isolates the toggle portion of #5643 on current
mainand credits @joshfcc for the original implementation and UI evidence.Why
The inactivity preference does not control merged or closed pull requests, so users can disable inactivity auto-settlement and still see a thread settle immediately. That explains the behavior reported in #4811 and makes a manual-only web/desktop workflow impossible.
This PR keeps the two automatic rules independent and does not change server orchestration, manual Un-settle semantics, pinning, snoozing, or activity resets. Historical merged-PR association on reused long-lived branches remains the separate issue tracked in #4970.
UI Changes
These screenshots were originally captured for #5643 and show the same web/desktop setting row implemented here:
Mobile exposes the same completed-PR switch under Settings → General. No motion or timing behavior changed, so a video is not applicable.
Verification
Checklist
Model: GPT-5.6-Sol via the Codex harness.
Note
Medium Risk
Changes thread settled classification across web, desktop, and mobile UIs via shared
effectiveSettled, but defaults preserve prior behavior and scope is client-only with no server orchestration changes.Overview
Adds a default-on preference to control whether merged or closed pull requests automatically move threads to Settled, separate from the existing inactivity auto-settle setting.
Web/desktop persist
sidebarAutoSettleCompletedChangeRequestsin synced client settings with a new Settings → General switch; the inactive-threads row copy now states it does not govern PRs. Sidebar, ChatView, and thread context menus pass the flag into sharedeffectiveSettledso list rows and the open-thread settled banner stay aligned.Mobile stores the same choice per device (
autoSettleCompletedChangeRequests) with a Settings → General toggle; home and sidebar v2 lists useresolveAutoSettleCompletedChangeRequests(defaults on while loading or when unset for backward compatibility). Inactivity settlement (e.g. three days on mobile) is unchanged when PR auto-settle is off.Contracts, desktop settings fixtures, sanitization, settings search, user docs, and focused tests cover the new behavior and manual-only workflows.
Reviewed by Cursor Bugbot for commit 5a7b2db. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Make completed-PR auto-settle configurable on web, desktop, and mobile
sidebarAutoSettleCompletedChangeRequestssetting (defaulttrue) toClientSettingsSchemain settings.ts that controls whether merged/closed PR threads are automatically settled.effectiveSettledin threadSettled.ts to gate completed-PR auto-settlement behind the new flag; inactivity-based settlement is unaffected.autoSettleCompletedChangeRequestsin mobile-preferences.ts.truewhen restoring defaults.Macroscope summarized 5a7b2db.