Skip to content

feat(clients): add PR auto-settle toggle - #5141

Open
caezium wants to merge 1 commit into
pingdotgg:mainfrom
caezium:feat/auto-settle-merged-pr-toggle
Open

feat(clients): add PR auto-settle toggle#5141
caezium wants to merge 1 commit into
pingdotgg:mainfrom
caezium:feat/auto-settle-merged-pr-toggle

Conversation

@caezium

@caezium caezium commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • Add an independent setting for settling Sidebar v2 threads when their pull request is merged or closed, enabled by default for backward compatibility.
  • Gate the shared settlement calculation on that setting while preserving manual settlement, explicit un-settlement, pending-work guards, and inactivity-based settlement.
  • Expose the control on web/desktop and mobile, and document how disabling both automatic triggers enables fully manual settlement.

Closes #4982.

Why

Sidebar v2 previously classified merged and closed pull-request threads as settled unconditionally. Disabling “Auto-settle inactive threads” therefore could not keep those threads active for follow-up work.

The merged/closed trigger is now configurable independently from the inactivity trigger. Existing users keep the current behavior unless they opt out.

UI Changes

Before

The inactivity setting also stated that merged and closed PR threads always settle, with no separate control.

Before: Sidebar v2 has no separate pull-request auto-settle setting

After

A separate toggle controls merged/closed-PR settlement. Here it is disabled while inactivity-based settlement remains enabled.

After: Sidebar v2 has an independent merged-or-closed PR auto-settle toggle

Validation

  • bun test packages/contracts/src/settings.test.ts packages/client-runtime/src/state/threadSettled.test.ts apps/mobile/src/features/threads/threadListV2.test.ts — 250 passed
  • bun --cwd apps/desktop test -- DesktopClientSettings.test.ts — 7 passed
  • Typechecks passed for contracts, client runtime, web, and mobile
  • Targeted lint and formatting checks passed for all 16 changed files
  • Verified in an empty, isolated local T3 home that the setting defaults on, persists off across reload, remains independent from inactivity settlement, and persists when re-enabled

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for the UI change
  • No animation or timing behavior changed, so a video is not applicable

Built with GPT-5.6-Sol via the Codex harness in T3 Code.

Note

Add PR auto-settle toggle to client settings, web sidebar, and mobile thread list

  • Adds sidebarAutoSettleOnChangeRequestCompletion to ClientSettingsSchema (default true) and exposes a toggle in the web beta settings panel, allowing users to disable automatic settlement when a PR is merged or closed.
  • Extends effectiveSettled in threadSettled.ts to accept autoSettleOnChangeRequestCompletion; when false, merged/closed PRs no longer trigger settlement.
  • Adds two new mobile preferences (threadListV2AutoSettleInactive, threadListV2AutoSettleOnChangeRequestCompletion) read by a new useThreadListV2SettlementPreferences hook and surfaced as independent toggles in the mobile beta settings UI.
  • Behavioral Change: existing users retain current auto-settle behavior (both flags default to true), but the new settings are device-local on mobile and client-scoped on web.

Macroscope summarized 1f2d7cb.

@coderabbitai

coderabbitai Bot commented Jul 31, 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: dce7b745-edb0-4284-9ae7-17d53c9562c0

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 Jul 31, 2026
@caezium
caezium marked this pull request as ready for review July 31, 2026 20:38
@macroscopeapp

macroscopeapp Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new user-facing feature adding toggles to control auto-settlement of PR threads. Changes to core workflow behavior (the effectiveSettled logic) and new settings UI across web and mobile platforms warrant human review.

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.

[Feature]: Separate toggle for merged/closed-PR auto-settle (enables fully manual settling)

1 participant