Skip to content

fix(threads): make completed-PR auto-settle configurable - #5842

Open
JasperG134 wants to merge 9 commits into
pingdotgg:mainfrom
JasperG134:fix/completed-pr-auto-settle-toggle
Open

fix(threads): make completed-PR auto-settle configurable#5842
JasperG134 wants to merge 9 commits into
pingdotgg:mainfrom
JasperG134:fix/completed-pr-auto-settle-toggle

Conversation

@JasperG134

@JasperG134 JasperG134 commented Aug 9, 2026

Copy link
Copy Markdown

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 main and 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:

Before After
Before: merged or closed PRs always settle After: separate completed pull-request auto-settle switch

Mobile exposes the same completed-PR switch under Settings → General. No motion or timing behavior changed, so a video is not applicable.

Verification

  • 6 focused test files: 274 tests passed
  • Targeted typechecks passed for contracts, shared, client-runtime, server, web, desktop, and mobile
  • Formatting passed for all 20 changed files
  • Independent read-only code review found no critical or important issues; its documentation clarification and direct mobile-default test recommendation were applied

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for the UI change
  • Video is not applicable because there is no animation, motion, or timing change

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 sidebarAutoSettleCompletedChangeRequests in 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 shared effectiveSettled so 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 use resolveAutoSettleCompletedChangeRequests (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

  • Adds a sidebarAutoSettleCompletedChangeRequests setting (default true) to ClientSettingsSchema in settings.ts that controls whether merged/closed PR threads are automatically settled.
  • Updates effectiveSettled in threadSettled.ts to gate completed-PR auto-settlement behind the new flag; inactivity-based settlement is unaffected.
  • Exposes a toggle in the web/desktop General settings panel and in the mobile settings screen, with the preference persisted locally on mobile via autoSettleCompletedChangeRequests in mobile-preferences.ts.
  • The new setting is searchable via the settings search catalog and resets to true when restoring defaults.
  • Behavioral Change: threads for merged/closed PRs will no longer auto-settle for users who disable this setting; previously this behavior was unconditional.

Macroscope summarized 5a7b2db.

Copilot AI lite review requested due to automatic review settings August 9, 2026 15:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2916e97d-ff75-4929-b9d6-7b672fbfa519

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 9, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants