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

Closed
caezium wants to merge 2 commits into
pingdotgg:mainfrom
caezium:feat/auto-settle-merged-pr-toggle
Closed

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

Conversation

@caezium

@caeziumcaezium 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.

This composes with #5151: open PRs remain protected from inactivity auto-settle; this setting only controls the merged/closed completion trigger.

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 — 251 passed
  • bun --cwd apps/web test -- src/components/settings/settingsSearch.test.ts — 8 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 18 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 auto-settle toggle for merged/closed PR threads across web and mobile

  • Adds sidebarAutoSettleOnChangeRequestCompletion to ClientSettingsSchema (default true) so users can disable auto-settling threads when a PR is merged or closed.
  • Extends effectiveSettled to gate the PR-completion branch on the new flag; existing behavior is unchanged when the flag is omitted.
  • Web: adds a toggle in BetaSettingsPanel, wires it through useClientThreadSettlementPreferences into SidebarV2 and ChatView.
  • Mobile: persists two new device-local preferences (threadListV2AutoSettleInactive, threadListV2AutoSettleOnChangeRequestCompletion), exposed via toggles in SettingsRouteScreen and consumed by HomeScreen and ThreadNavigationSidebar.
  • Behavioral Change: preferences are held off (no auto-settling) until client settings are fully hydrated, preventing premature thread classification on load.

Macroscope summarized 2689452.

Summary by CodeRabbit

  • New Features

    • Added separate controls for automatically settling inactive threads and threads linked to merged or closed pull requests.
    • Applied these preferences across web and mobile thread lists, with sensible defaults.
    • Added settings search support for the new automatic-settling option.
  • Documentation

    • Documented automatic thread-settling behavior, defaults, mobile support, and manual-only options.
  • Bug Fixes

    • Threads remain active when automatic settling for completed pull requests is disabled.

Note

Low Risk
Preference and UI changes around thread list classification; defaults preserve existing behavior and settlement logic is covered by targeted tests.

Overview
Adds sidebarAutoSettleOnChangeRequestCompletion (default on) so merged/closed PR auto-settling is no longer tied to the inactivity setting. effectiveSettled only auto-settles on terminal PR states when that flag is enabled; manual settle, open-PR inactivity blocking, and the inactivity window stay unchanged.

Web/desktop expose a separate Beta toggle and useClientThreadSettlementPreferences (hydration-safe) feeds Sidebar v2, ChatView, and settings search. Mobile mirrors the two triggers via device-local preferences, resolveThreadListV2SettlementPreferences, and switches under Thread List v2 Beta.

User docs describe controlling both automatic settle paths independently.

Reviewed by Cursor Bugbot for commit 2689452. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a separate setting for automatic settlement after merged or closed change requests. Web and mobile settings expose both settlement triggers. Runtime and Thread List v2 classification apply the preferences and preserve manual settlement behavior.

Changes

Thread settlement contract and runtime

Layer / File(s)Summary
Settings contract and settlement classification
packages/contracts/src/settings.ts, packages/client-runtime/src/state/threadSettled.ts, packages/*/src/*test*, apps/desktop/src/settings/DesktopClientSettings.test.ts
Client settings default change-request completion settlement to enabled. effectiveSettled skips merged or closed change-request settlement when disabled. Tests cover defaults, patches, and manual-only behavior.

Web controls and consumers

Layer / File(s)Summary
Web settings and settlement consumers
apps/web/src/components/settings/BetaSettingsPanel.tsx, apps/web/src/components/settings/settingsSearch.*, apps/web/src/components/SidebarV2.tsx, apps/web/src/components/ChatView.tsx, docs/user/source-control.md
Web settings expose independent inactivity and merged/closed change-request controls. Sidebar and chat settlement evaluation receive the new preference. Documentation and settings search include the control.

Mobile Thread List v2

Layer / File(s)Summary
Mobile preference storage and resolution
apps/mobile/src/persistence/mobile-preferences.ts, apps/mobile/src/features/threads/threadListV2.ts, apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
Mobile preferences store both flags. A shared resolver applies the three-day inactivity default and enables change-request completion settlement unless explicitly disabled.
Mobile consumers and settings
apps/mobile/src/features/home/HomeScreen.tsx, apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx, apps/mobile/src/features/settings/SettingsRouteScreen.tsx, apps/mobile/src/features/threads/threadListV2.test.ts
Home, sidebar, and Thread List v2 use resolved preferences. Mobile Beta settings persist both switches. Tests cover defaults and active-list classification.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
participant SettingsPanel
participant ClientSettings
participant SidebarV2
participant effectiveSettled
SettingsPanel->>ClientSettings: update merged/closed auto-settle setting
ClientSettings->>SidebarV2: provide setting
SidebarV2->>effectiveSettled: evaluate thread state and preference
effectiveSettled-->>SidebarV2: settled or active classification
Loading

Possibly related PRs

Suggested reviewers:t3dotgg, shivamhwp

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 27.27% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedThe changes satisfy issue #4982 by separating settlement triggers, preserving defaults and manual behavior, and enabling fully manual settlement.
Out of Scope Changes check✅ PassedThe web, desktop, mobile, runtime, contract, test, and documentation changes directly support the requested auto-settle feature.
Title check✅ PassedThe title clearly and concisely describes the addition of a pull-request auto-settle toggle.
Description check✅ PassedThe description covers the required changes, rationale, UI updates, validation, screenshots, and checklist items.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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-actionsgithub-actionsBot 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

macroscopeappBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

New feature adding a user-facing settings toggle across web, mobile, and desktop that changes thread auto-settlement behavior. Cross-platform feature additions warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@caezium
caeziumforce-pushed the feat/auto-settle-merged-pr-toggle branch from 1f2d7cb to 2585df2CompareAugust 1, 2026 08:26

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2585df2. Configure here.

@caezium

Copy link
Copy Markdown
ContributorAuthor

@coderabbitai review

@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/mobile/src/features/threads/threadListV2.ts (1)

33-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use inferred return types.

Both functions infer their return shape from the returned object.

  • apps/mobile/src/features/threads/threadListV2.ts#L33-L39: Remove the explicit return type from resolveThreadListV2SettlementPreferences.
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts#L25-L28: Remove the explicit return type from useThreadListV2SettlementPreferences.

As per coding guidelines, “Prefer inferred types over explicit annotations and do not use any.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/mobile/src/features/threads/threadListV2.ts` around lines 33 - 39,
Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/mobile/src/features/threads/threadListV2.ts`:
- Around line 33-39: Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 897164d0-2c77-4240-8eef-04ade8e5f5c0

📥 Commits

Reviewing files that changed from the base of the PR and between 0ad91b6 and 2585df2.

📒 Files selected for processing (18)
  • apps/desktop/src/settings/DesktopClientSettings.test.ts
  • apps/mobile/src/features/home/HomeScreen.tsx
  • apps/mobile/src/features/settings/SettingsRouteScreen.tsx
  • apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
  • apps/mobile/src/features/threads/threadListV2.test.ts
  • apps/mobile/src/features/threads/threadListV2.ts
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
  • apps/mobile/src/persistence/mobile-preferences.ts
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/SidebarV2.tsx
  • apps/web/src/components/settings/BetaSettingsPanel.tsx
  • apps/web/src/components/settings/settingsSearch.test.ts
  • apps/web/src/components/settings/settingsSearch.ts
  • docs/user/source-control.md
  • packages/client-runtime/src/state/threadSettled.test.ts
  • packages/client-runtime/src/state/threadSettled.ts
  • packages/contracts/src/settings.test.ts
  • packages/contracts/src/settings.ts

@t3dotgg

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

Closing this PR after an automated pass over open pull requests. Configurable automatic settlement already shipped in #5880.

@t3dotggt3dotgg closed this Aug 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L100-499 changed lines (additions + deletions).vouch:unvouchedPR 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)

2 participants

@caezium@t3dotgg
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

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

Closed
caezium wants to merge 2 commits into
pingdotgg:mainfrom
caezium:feat/auto-settle-merged-pr-toggle
Closed

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

Conversation

@caezium

@caeziumcaezium 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.

This composes with #5151: open PRs remain protected from inactivity auto-settle; this setting only controls the merged/closed completion trigger.

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 — 251 passed
  • bun --cwd apps/web test -- src/components/settings/settingsSearch.test.ts — 8 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 18 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 auto-settle toggle for merged/closed PR threads across web and mobile

  • Adds sidebarAutoSettleOnChangeRequestCompletion to ClientSettingsSchema (default true) so users can disable auto-settling threads when a PR is merged or closed.
  • Extends effectiveSettled to gate the PR-completion branch on the new flag; existing behavior is unchanged when the flag is omitted.
  • Web: adds a toggle in BetaSettingsPanel, wires it through useClientThreadSettlementPreferences into SidebarV2 and ChatView.
  • Mobile: persists two new device-local preferences (threadListV2AutoSettleInactive, threadListV2AutoSettleOnChangeRequestCompletion), exposed via toggles in SettingsRouteScreen and consumed by HomeScreen and ThreadNavigationSidebar.
  • Behavioral Change: preferences are held off (no auto-settling) until client settings are fully hydrated, preventing premature thread classification on load.

Macroscope summarized 2689452.

Summary by CodeRabbit

  • New Features

    • Added separate controls for automatically settling inactive threads and threads linked to merged or closed pull requests.
    • Applied these preferences across web and mobile thread lists, with sensible defaults.
    • Added settings search support for the new automatic-settling option.
  • Documentation

    • Documented automatic thread-settling behavior, defaults, mobile support, and manual-only options.
  • Bug Fixes

    • Threads remain active when automatic settling for completed pull requests is disabled.

Note

Low Risk
Preference and UI changes around thread list classification; defaults preserve existing behavior and settlement logic is covered by targeted tests.

Overview
Adds sidebarAutoSettleOnChangeRequestCompletion (default on) so merged/closed PR auto-settling is no longer tied to the inactivity setting. effectiveSettled only auto-settles on terminal PR states when that flag is enabled; manual settle, open-PR inactivity blocking, and the inactivity window stay unchanged.

Web/desktop expose a separate Beta toggle and useClientThreadSettlementPreferences (hydration-safe) feeds Sidebar v2, ChatView, and settings search. Mobile mirrors the two triggers via device-local preferences, resolveThreadListV2SettlementPreferences, and switches under Thread List v2 Beta.

User docs describe controlling both automatic settle paths independently.

Reviewed by Cursor Bugbot for commit 2689452. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a separate setting for automatic settlement after merged or closed change requests. Web and mobile settings expose both settlement triggers. Runtime and Thread List v2 classification apply the preferences and preserve manual settlement behavior.

Changes

Thread settlement contract and runtime

Layer / File(s)Summary
Settings contract and settlement classification
packages/contracts/src/settings.ts, packages/client-runtime/src/state/threadSettled.ts, packages/*/src/*test*, apps/desktop/src/settings/DesktopClientSettings.test.ts
Client settings default change-request completion settlement to enabled. effectiveSettled skips merged or closed change-request settlement when disabled. Tests cover defaults, patches, and manual-only behavior.

Web controls and consumers

Layer / File(s)Summary
Web settings and settlement consumers
apps/web/src/components/settings/BetaSettingsPanel.tsx, apps/web/src/components/settings/settingsSearch.*, apps/web/src/components/SidebarV2.tsx, apps/web/src/components/ChatView.tsx, docs/user/source-control.md
Web settings expose independent inactivity and merged/closed change-request controls. Sidebar and chat settlement evaluation receive the new preference. Documentation and settings search include the control.

Mobile Thread List v2

Layer / File(s)Summary
Mobile preference storage and resolution
apps/mobile/src/persistence/mobile-preferences.ts, apps/mobile/src/features/threads/threadListV2.ts, apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
Mobile preferences store both flags. A shared resolver applies the three-day inactivity default and enables change-request completion settlement unless explicitly disabled.
Mobile consumers and settings
apps/mobile/src/features/home/HomeScreen.tsx, apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx, apps/mobile/src/features/settings/SettingsRouteScreen.tsx, apps/mobile/src/features/threads/threadListV2.test.ts
Home, sidebar, and Thread List v2 use resolved preferences. Mobile Beta settings persist both switches. Tests cover defaults and active-list classification.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
participant SettingsPanel
participant ClientSettings
participant SidebarV2
participant effectiveSettled
SettingsPanel->>ClientSettings: update merged/closed auto-settle setting
ClientSettings->>SidebarV2: provide setting
SidebarV2->>effectiveSettled: evaluate thread state and preference
effectiveSettled-->>SidebarV2: settled or active classification
Loading

Possibly related PRs

Suggested reviewers:t3dotgg, shivamhwp

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 27.27% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedThe changes satisfy issue #4982 by separating settlement triggers, preserving defaults and manual behavior, and enabling fully manual settlement.
Out of Scope Changes check✅ PassedThe web, desktop, mobile, runtime, contract, test, and documentation changes directly support the requested auto-settle feature.
Title check✅ PassedThe title clearly and concisely describes the addition of a pull-request auto-settle toggle.
Description check✅ PassedThe description covers the required changes, rationale, UI updates, validation, screenshots, and checklist items.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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-actionsgithub-actionsBot 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

macroscopeappBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

New feature adding a user-facing settings toggle across web, mobile, and desktop that changes thread auto-settlement behavior. Cross-platform feature additions warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@caezium
caeziumforce-pushed the feat/auto-settle-merged-pr-toggle branch from 1f2d7cb to 2585df2CompareAugust 1, 2026 08:26

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2585df2. Configure here.

@caezium

Copy link
Copy Markdown
ContributorAuthor

@coderabbitai review

@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/mobile/src/features/threads/threadListV2.ts (1)

33-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use inferred return types.

Both functions infer their return shape from the returned object.

  • apps/mobile/src/features/threads/threadListV2.ts#L33-L39: Remove the explicit return type from resolveThreadListV2SettlementPreferences.
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts#L25-L28: Remove the explicit return type from useThreadListV2SettlementPreferences.

As per coding guidelines, “Prefer inferred types over explicit annotations and do not use any.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/mobile/src/features/threads/threadListV2.ts` around lines 33 - 39,
Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/mobile/src/features/threads/threadListV2.ts`:
- Around line 33-39: Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 897164d0-2c77-4240-8eef-04ade8e5f5c0

📥 Commits

Reviewing files that changed from the base of the PR and between 0ad91b6 and 2585df2.

📒 Files selected for processing (18)
  • apps/desktop/src/settings/DesktopClientSettings.test.ts
  • apps/mobile/src/features/home/HomeScreen.tsx
  • apps/mobile/src/features/settings/SettingsRouteScreen.tsx
  • apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
  • apps/mobile/src/features/threads/threadListV2.test.ts
  • apps/mobile/src/features/threads/threadListV2.ts
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
  • apps/mobile/src/persistence/mobile-preferences.ts
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/SidebarV2.tsx
  • apps/web/src/components/settings/BetaSettingsPanel.tsx
  • apps/web/src/components/settings/settingsSearch.test.ts
  • apps/web/src/components/settings/settingsSearch.ts
  • docs/user/source-control.md
  • packages/client-runtime/src/state/threadSettled.test.ts
  • packages/client-runtime/src/state/threadSettled.ts
  • packages/contracts/src/settings.test.ts
  • packages/contracts/src/settings.ts

@t3dotgg

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

Closing this PR after an automated pass over open pull requests. Configurable automatic settlement already shipped in #5880.

@t3dotggt3dotgg closed this Aug 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L100-499 changed lines (additions + deletions).vouch:unvouchedPR 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)

2 participants

@caezium@t3dotgg
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

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

Closed
caezium wants to merge 2 commits into
pingdotgg:mainfrom
caezium:feat/auto-settle-merged-pr-toggle
Closed

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

Conversation

@caezium

@caeziumcaezium 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.

This composes with #5151: open PRs remain protected from inactivity auto-settle; this setting only controls the merged/closed completion trigger.

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 — 251 passed
  • bun --cwd apps/web test -- src/components/settings/settingsSearch.test.ts — 8 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 18 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 auto-settle toggle for merged/closed PR threads across web and mobile

  • Adds sidebarAutoSettleOnChangeRequestCompletion to ClientSettingsSchema (default true) so users can disable auto-settling threads when a PR is merged or closed.
  • Extends effectiveSettled to gate the PR-completion branch on the new flag; existing behavior is unchanged when the flag is omitted.
  • Web: adds a toggle in BetaSettingsPanel, wires it through useClientThreadSettlementPreferences into SidebarV2 and ChatView.
  • Mobile: persists two new device-local preferences (threadListV2AutoSettleInactive, threadListV2AutoSettleOnChangeRequestCompletion), exposed via toggles in SettingsRouteScreen and consumed by HomeScreen and ThreadNavigationSidebar.
  • Behavioral Change: preferences are held off (no auto-settling) until client settings are fully hydrated, preventing premature thread classification on load.

Macroscope summarized 2689452.

Summary by CodeRabbit

  • New Features

    • Added separate controls for automatically settling inactive threads and threads linked to merged or closed pull requests.
    • Applied these preferences across web and mobile thread lists, with sensible defaults.
    • Added settings search support for the new automatic-settling option.
  • Documentation

    • Documented automatic thread-settling behavior, defaults, mobile support, and manual-only options.
  • Bug Fixes

    • Threads remain active when automatic settling for completed pull requests is disabled.

Note

Low Risk
Preference and UI changes around thread list classification; defaults preserve existing behavior and settlement logic is covered by targeted tests.

Overview
Adds sidebarAutoSettleOnChangeRequestCompletion (default on) so merged/closed PR auto-settling is no longer tied to the inactivity setting. effectiveSettled only auto-settles on terminal PR states when that flag is enabled; manual settle, open-PR inactivity blocking, and the inactivity window stay unchanged.

Web/desktop expose a separate Beta toggle and useClientThreadSettlementPreferences (hydration-safe) feeds Sidebar v2, ChatView, and settings search. Mobile mirrors the two triggers via device-local preferences, resolveThreadListV2SettlementPreferences, and switches under Thread List v2 Beta.

User docs describe controlling both automatic settle paths independently.

Reviewed by Cursor Bugbot for commit 2689452. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a separate setting for automatic settlement after merged or closed change requests. Web and mobile settings expose both settlement triggers. Runtime and Thread List v2 classification apply the preferences and preserve manual settlement behavior.

Changes

Thread settlement contract and runtime

Layer / File(s)Summary
Settings contract and settlement classification
packages/contracts/src/settings.ts, packages/client-runtime/src/state/threadSettled.ts, packages/*/src/*test*, apps/desktop/src/settings/DesktopClientSettings.test.ts
Client settings default change-request completion settlement to enabled. effectiveSettled skips merged or closed change-request settlement when disabled. Tests cover defaults, patches, and manual-only behavior.

Web controls and consumers

Layer / File(s)Summary
Web settings and settlement consumers
apps/web/src/components/settings/BetaSettingsPanel.tsx, apps/web/src/components/settings/settingsSearch.*, apps/web/src/components/SidebarV2.tsx, apps/web/src/components/ChatView.tsx, docs/user/source-control.md
Web settings expose independent inactivity and merged/closed change-request controls. Sidebar and chat settlement evaluation receive the new preference. Documentation and settings search include the control.

Mobile Thread List v2

Layer / File(s)Summary
Mobile preference storage and resolution
apps/mobile/src/persistence/mobile-preferences.ts, apps/mobile/src/features/threads/threadListV2.ts, apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
Mobile preferences store both flags. A shared resolver applies the three-day inactivity default and enables change-request completion settlement unless explicitly disabled.
Mobile consumers and settings
apps/mobile/src/features/home/HomeScreen.tsx, apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx, apps/mobile/src/features/settings/SettingsRouteScreen.tsx, apps/mobile/src/features/threads/threadListV2.test.ts
Home, sidebar, and Thread List v2 use resolved preferences. Mobile Beta settings persist both switches. Tests cover defaults and active-list classification.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
participant SettingsPanel
participant ClientSettings
participant SidebarV2
participant effectiveSettled
SettingsPanel->>ClientSettings: update merged/closed auto-settle setting
ClientSettings->>SidebarV2: provide setting
SidebarV2->>effectiveSettled: evaluate thread state and preference
effectiveSettled-->>SidebarV2: settled or active classification
Loading

Possibly related PRs

Suggested reviewers:t3dotgg, shivamhwp

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 27.27% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedThe changes satisfy issue #4982 by separating settlement triggers, preserving defaults and manual behavior, and enabling fully manual settlement.
Out of Scope Changes check✅ PassedThe web, desktop, mobile, runtime, contract, test, and documentation changes directly support the requested auto-settle feature.
Title check✅ PassedThe title clearly and concisely describes the addition of a pull-request auto-settle toggle.
Description check✅ PassedThe description covers the required changes, rationale, UI updates, validation, screenshots, and checklist items.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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-actionsgithub-actionsBot 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

macroscopeappBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

New feature adding a user-facing settings toggle across web, mobile, and desktop that changes thread auto-settlement behavior. Cross-platform feature additions warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@caezium
caeziumforce-pushed the feat/auto-settle-merged-pr-toggle branch from 1f2d7cb to 2585df2CompareAugust 1, 2026 08:26

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2585df2. Configure here.

@caezium

Copy link
Copy Markdown
ContributorAuthor

@coderabbitai review

@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/mobile/src/features/threads/threadListV2.ts (1)

33-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use inferred return types.

Both functions infer their return shape from the returned object.

  • apps/mobile/src/features/threads/threadListV2.ts#L33-L39: Remove the explicit return type from resolveThreadListV2SettlementPreferences.
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts#L25-L28: Remove the explicit return type from useThreadListV2SettlementPreferences.

As per coding guidelines, “Prefer inferred types over explicit annotations and do not use any.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/mobile/src/features/threads/threadListV2.ts` around lines 33 - 39,
Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/mobile/src/features/threads/threadListV2.ts`:
- Around line 33-39: Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 897164d0-2c77-4240-8eef-04ade8e5f5c0

📥 Commits

Reviewing files that changed from the base of the PR and between 0ad91b6 and 2585df2.

📒 Files selected for processing (18)
  • apps/desktop/src/settings/DesktopClientSettings.test.ts
  • apps/mobile/src/features/home/HomeScreen.tsx
  • apps/mobile/src/features/settings/SettingsRouteScreen.tsx
  • apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
  • apps/mobile/src/features/threads/threadListV2.test.ts
  • apps/mobile/src/features/threads/threadListV2.ts
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
  • apps/mobile/src/persistence/mobile-preferences.ts
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/SidebarV2.tsx
  • apps/web/src/components/settings/BetaSettingsPanel.tsx
  • apps/web/src/components/settings/settingsSearch.test.ts
  • apps/web/src/components/settings/settingsSearch.ts
  • docs/user/source-control.md
  • packages/client-runtime/src/state/threadSettled.test.ts
  • packages/client-runtime/src/state/threadSettled.ts
  • packages/contracts/src/settings.test.ts
  • packages/contracts/src/settings.ts

@t3dotgg

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

Closing this PR after an automated pass over open pull requests. Configurable automatic settlement already shipped in #5880.

@t3dotggt3dotgg closed this Aug 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L100-499 changed lines (additions + deletions).vouch:unvouchedPR 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)

2 participants

@caezium@t3dotgg
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

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

Closed
caezium wants to merge 2 commits into
pingdotgg:mainfrom
caezium:feat/auto-settle-merged-pr-toggle
Closed

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

Conversation

@caezium

@caeziumcaezium 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.

This composes with #5151: open PRs remain protected from inactivity auto-settle; this setting only controls the merged/closed completion trigger.

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 — 251 passed
  • bun --cwd apps/web test -- src/components/settings/settingsSearch.test.ts — 8 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 18 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 auto-settle toggle for merged/closed PR threads across web and mobile

  • Adds sidebarAutoSettleOnChangeRequestCompletion to ClientSettingsSchema (default true) so users can disable auto-settling threads when a PR is merged or closed.
  • Extends effectiveSettled to gate the PR-completion branch on the new flag; existing behavior is unchanged when the flag is omitted.
  • Web: adds a toggle in BetaSettingsPanel, wires it through useClientThreadSettlementPreferences into SidebarV2 and ChatView.
  • Mobile: persists two new device-local preferences (threadListV2AutoSettleInactive, threadListV2AutoSettleOnChangeRequestCompletion), exposed via toggles in SettingsRouteScreen and consumed by HomeScreen and ThreadNavigationSidebar.
  • Behavioral Change: preferences are held off (no auto-settling) until client settings are fully hydrated, preventing premature thread classification on load.

Macroscope summarized 2689452.

Summary by CodeRabbit

  • New Features

    • Added separate controls for automatically settling inactive threads and threads linked to merged or closed pull requests.
    • Applied these preferences across web and mobile thread lists, with sensible defaults.
    • Added settings search support for the new automatic-settling option.
  • Documentation

    • Documented automatic thread-settling behavior, defaults, mobile support, and manual-only options.
  • Bug Fixes

    • Threads remain active when automatic settling for completed pull requests is disabled.

Note

Low Risk
Preference and UI changes around thread list classification; defaults preserve existing behavior and settlement logic is covered by targeted tests.

Overview
Adds sidebarAutoSettleOnChangeRequestCompletion (default on) so merged/closed PR auto-settling is no longer tied to the inactivity setting. effectiveSettled only auto-settles on terminal PR states when that flag is enabled; manual settle, open-PR inactivity blocking, and the inactivity window stay unchanged.

Web/desktop expose a separate Beta toggle and useClientThreadSettlementPreferences (hydration-safe) feeds Sidebar v2, ChatView, and settings search. Mobile mirrors the two triggers via device-local preferences, resolveThreadListV2SettlementPreferences, and switches under Thread List v2 Beta.

User docs describe controlling both automatic settle paths independently.

Reviewed by Cursor Bugbot for commit 2689452. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a separate setting for automatic settlement after merged or closed change requests. Web and mobile settings expose both settlement triggers. Runtime and Thread List v2 classification apply the preferences and preserve manual settlement behavior.

Changes

Thread settlement contract and runtime

Layer / File(s)Summary
Settings contract and settlement classification
packages/contracts/src/settings.ts, packages/client-runtime/src/state/threadSettled.ts, packages/*/src/*test*, apps/desktop/src/settings/DesktopClientSettings.test.ts
Client settings default change-request completion settlement to enabled. effectiveSettled skips merged or closed change-request settlement when disabled. Tests cover defaults, patches, and manual-only behavior.

Web controls and consumers

Layer / File(s)Summary
Web settings and settlement consumers
apps/web/src/components/settings/BetaSettingsPanel.tsx, apps/web/src/components/settings/settingsSearch.*, apps/web/src/components/SidebarV2.tsx, apps/web/src/components/ChatView.tsx, docs/user/source-control.md
Web settings expose independent inactivity and merged/closed change-request controls. Sidebar and chat settlement evaluation receive the new preference. Documentation and settings search include the control.

Mobile Thread List v2

Layer / File(s)Summary
Mobile preference storage and resolution
apps/mobile/src/persistence/mobile-preferences.ts, apps/mobile/src/features/threads/threadListV2.ts, apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
Mobile preferences store both flags. A shared resolver applies the three-day inactivity default and enables change-request completion settlement unless explicitly disabled.
Mobile consumers and settings
apps/mobile/src/features/home/HomeScreen.tsx, apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx, apps/mobile/src/features/settings/SettingsRouteScreen.tsx, apps/mobile/src/features/threads/threadListV2.test.ts
Home, sidebar, and Thread List v2 use resolved preferences. Mobile Beta settings persist both switches. Tests cover defaults and active-list classification.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
participant SettingsPanel
participant ClientSettings
participant SidebarV2
participant effectiveSettled
SettingsPanel->>ClientSettings: update merged/closed auto-settle setting
ClientSettings->>SidebarV2: provide setting
SidebarV2->>effectiveSettled: evaluate thread state and preference
effectiveSettled-->>SidebarV2: settled or active classification
Loading

Possibly related PRs

Suggested reviewers:t3dotgg, shivamhwp

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 27.27% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedThe changes satisfy issue #4982 by separating settlement triggers, preserving defaults and manual behavior, and enabling fully manual settlement.
Out of Scope Changes check✅ PassedThe web, desktop, mobile, runtime, contract, test, and documentation changes directly support the requested auto-settle feature.
Title check✅ PassedThe title clearly and concisely describes the addition of a pull-request auto-settle toggle.
Description check✅ PassedThe description covers the required changes, rationale, UI updates, validation, screenshots, and checklist items.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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-actionsgithub-actionsBot 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

macroscopeappBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

New feature adding a user-facing settings toggle across web, mobile, and desktop that changes thread auto-settlement behavior. Cross-platform feature additions warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@caezium
caeziumforce-pushed the feat/auto-settle-merged-pr-toggle branch from 1f2d7cb to 2585df2CompareAugust 1, 2026 08:26

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2585df2. Configure here.

@caezium

Copy link
Copy Markdown
ContributorAuthor

@coderabbitai review

@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/mobile/src/features/threads/threadListV2.ts (1)

33-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use inferred return types.

Both functions infer their return shape from the returned object.

  • apps/mobile/src/features/threads/threadListV2.ts#L33-L39: Remove the explicit return type from resolveThreadListV2SettlementPreferences.
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts#L25-L28: Remove the explicit return type from useThreadListV2SettlementPreferences.

As per coding guidelines, “Prefer inferred types over explicit annotations and do not use any.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/mobile/src/features/threads/threadListV2.ts` around lines 33 - 39,
Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/mobile/src/features/threads/threadListV2.ts`:
- Around line 33-39: Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 897164d0-2c77-4240-8eef-04ade8e5f5c0

📥 Commits

Reviewing files that changed from the base of the PR and between 0ad91b6 and 2585df2.

📒 Files selected for processing (18)
  • apps/desktop/src/settings/DesktopClientSettings.test.ts
  • apps/mobile/src/features/home/HomeScreen.tsx
  • apps/mobile/src/features/settings/SettingsRouteScreen.tsx
  • apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
  • apps/mobile/src/features/threads/threadListV2.test.ts
  • apps/mobile/src/features/threads/threadListV2.ts
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
  • apps/mobile/src/persistence/mobile-preferences.ts
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/SidebarV2.tsx
  • apps/web/src/components/settings/BetaSettingsPanel.tsx
  • apps/web/src/components/settings/settingsSearch.test.ts
  • apps/web/src/components/settings/settingsSearch.ts
  • docs/user/source-control.md
  • packages/client-runtime/src/state/threadSettled.test.ts
  • packages/client-runtime/src/state/threadSettled.ts
  • packages/contracts/src/settings.test.ts
  • packages/contracts/src/settings.ts

@t3dotgg

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

Closing this PR after an automated pass over open pull requests. Configurable automatic settlement already shipped in #5880.

@t3dotggt3dotgg closed this Aug 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L100-499 changed lines (additions + deletions).vouch:unvouchedPR 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)

2 participants

@caezium@t3dotgg
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

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

Closed
caezium wants to merge 2 commits into
pingdotgg:mainfrom
caezium:feat/auto-settle-merged-pr-toggle
Closed

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

Conversation

@caezium

@caeziumcaezium 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.

This composes with #5151: open PRs remain protected from inactivity auto-settle; this setting only controls the merged/closed completion trigger.

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 — 251 passed
  • bun --cwd apps/web test -- src/components/settings/settingsSearch.test.ts — 8 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 18 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 auto-settle toggle for merged/closed PR threads across web and mobile

  • Adds sidebarAutoSettleOnChangeRequestCompletion to ClientSettingsSchema (default true) so users can disable auto-settling threads when a PR is merged or closed.
  • Extends effectiveSettled to gate the PR-completion branch on the new flag; existing behavior is unchanged when the flag is omitted.
  • Web: adds a toggle in BetaSettingsPanel, wires it through useClientThreadSettlementPreferences into SidebarV2 and ChatView.
  • Mobile: persists two new device-local preferences (threadListV2AutoSettleInactive, threadListV2AutoSettleOnChangeRequestCompletion), exposed via toggles in SettingsRouteScreen and consumed by HomeScreen and ThreadNavigationSidebar.
  • Behavioral Change: preferences are held off (no auto-settling) until client settings are fully hydrated, preventing premature thread classification on load.

Macroscope summarized 2689452.

Summary by CodeRabbit

  • New Features

    • Added separate controls for automatically settling inactive threads and threads linked to merged or closed pull requests.
    • Applied these preferences across web and mobile thread lists, with sensible defaults.
    • Added settings search support for the new automatic-settling option.
  • Documentation

    • Documented automatic thread-settling behavior, defaults, mobile support, and manual-only options.
  • Bug Fixes

    • Threads remain active when automatic settling for completed pull requests is disabled.

Note

Low Risk
Preference and UI changes around thread list classification; defaults preserve existing behavior and settlement logic is covered by targeted tests.

Overview
Adds sidebarAutoSettleOnChangeRequestCompletion (default on) so merged/closed PR auto-settling is no longer tied to the inactivity setting. effectiveSettled only auto-settles on terminal PR states when that flag is enabled; manual settle, open-PR inactivity blocking, and the inactivity window stay unchanged.

Web/desktop expose a separate Beta toggle and useClientThreadSettlementPreferences (hydration-safe) feeds Sidebar v2, ChatView, and settings search. Mobile mirrors the two triggers via device-local preferences, resolveThreadListV2SettlementPreferences, and switches under Thread List v2 Beta.

User docs describe controlling both automatic settle paths independently.

Reviewed by Cursor Bugbot for commit 2689452. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a separate setting for automatic settlement after merged or closed change requests. Web and mobile settings expose both settlement triggers. Runtime and Thread List v2 classification apply the preferences and preserve manual settlement behavior.

Changes

Thread settlement contract and runtime

Layer / File(s)Summary
Settings contract and settlement classification
packages/contracts/src/settings.ts, packages/client-runtime/src/state/threadSettled.ts, packages/*/src/*test*, apps/desktop/src/settings/DesktopClientSettings.test.ts
Client settings default change-request completion settlement to enabled. effectiveSettled skips merged or closed change-request settlement when disabled. Tests cover defaults, patches, and manual-only behavior.

Web controls and consumers

Layer / File(s)Summary
Web settings and settlement consumers
apps/web/src/components/settings/BetaSettingsPanel.tsx, apps/web/src/components/settings/settingsSearch.*, apps/web/src/components/SidebarV2.tsx, apps/web/src/components/ChatView.tsx, docs/user/source-control.md
Web settings expose independent inactivity and merged/closed change-request controls. Sidebar and chat settlement evaluation receive the new preference. Documentation and settings search include the control.

Mobile Thread List v2

Layer / File(s)Summary
Mobile preference storage and resolution
apps/mobile/src/persistence/mobile-preferences.ts, apps/mobile/src/features/threads/threadListV2.ts, apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
Mobile preferences store both flags. A shared resolver applies the three-day inactivity default and enables change-request completion settlement unless explicitly disabled.
Mobile consumers and settings
apps/mobile/src/features/home/HomeScreen.tsx, apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx, apps/mobile/src/features/settings/SettingsRouteScreen.tsx, apps/mobile/src/features/threads/threadListV2.test.ts
Home, sidebar, and Thread List v2 use resolved preferences. Mobile Beta settings persist both switches. Tests cover defaults and active-list classification.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
participant SettingsPanel
participant ClientSettings
participant SidebarV2
participant effectiveSettled
SettingsPanel->>ClientSettings: update merged/closed auto-settle setting
ClientSettings->>SidebarV2: provide setting
SidebarV2->>effectiveSettled: evaluate thread state and preference
effectiveSettled-->>SidebarV2: settled or active classification
Loading

Possibly related PRs

Suggested reviewers:t3dotgg, shivamhwp

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 27.27% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedThe changes satisfy issue #4982 by separating settlement triggers, preserving defaults and manual behavior, and enabling fully manual settlement.
Out of Scope Changes check✅ PassedThe web, desktop, mobile, runtime, contract, test, and documentation changes directly support the requested auto-settle feature.
Title check✅ PassedThe title clearly and concisely describes the addition of a pull-request auto-settle toggle.
Description check✅ PassedThe description covers the required changes, rationale, UI updates, validation, screenshots, and checklist items.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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-actionsgithub-actionsBot 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

macroscopeappBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

New feature adding a user-facing settings toggle across web, mobile, and desktop that changes thread auto-settlement behavior. Cross-platform feature additions warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@caezium
caeziumforce-pushed the feat/auto-settle-merged-pr-toggle branch from 1f2d7cb to 2585df2CompareAugust 1, 2026 08:26

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2585df2. Configure here.

@caezium

Copy link
Copy Markdown
ContributorAuthor

@coderabbitai review

@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/mobile/src/features/threads/threadListV2.ts (1)

33-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use inferred return types.

Both functions infer their return shape from the returned object.

  • apps/mobile/src/features/threads/threadListV2.ts#L33-L39: Remove the explicit return type from resolveThreadListV2SettlementPreferences.
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts#L25-L28: Remove the explicit return type from useThreadListV2SettlementPreferences.

As per coding guidelines, “Prefer inferred types over explicit annotations and do not use any.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/mobile/src/features/threads/threadListV2.ts` around lines 33 - 39,
Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/mobile/src/features/threads/threadListV2.ts`:
- Around line 33-39: Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 897164d0-2c77-4240-8eef-04ade8e5f5c0

📥 Commits

Reviewing files that changed from the base of the PR and between 0ad91b6 and 2585df2.

📒 Files selected for processing (18)
  • apps/desktop/src/settings/DesktopClientSettings.test.ts
  • apps/mobile/src/features/home/HomeScreen.tsx
  • apps/mobile/src/features/settings/SettingsRouteScreen.tsx
  • apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
  • apps/mobile/src/features/threads/threadListV2.test.ts
  • apps/mobile/src/features/threads/threadListV2.ts
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
  • apps/mobile/src/persistence/mobile-preferences.ts
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/SidebarV2.tsx
  • apps/web/src/components/settings/BetaSettingsPanel.tsx
  • apps/web/src/components/settings/settingsSearch.test.ts
  • apps/web/src/components/settings/settingsSearch.ts
  • docs/user/source-control.md
  • packages/client-runtime/src/state/threadSettled.test.ts
  • packages/client-runtime/src/state/threadSettled.ts
  • packages/contracts/src/settings.test.ts
  • packages/contracts/src/settings.ts

@t3dotgg

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

Closing this PR after an automated pass over open pull requests. Configurable automatic settlement already shipped in #5880.

@t3dotggt3dotgg closed this Aug 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L100-499 changed lines (additions + deletions).vouch:unvouchedPR 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)

2 participants

@caezium@t3dotgg
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

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

Closed
caezium wants to merge 2 commits into
pingdotgg:mainfrom
caezium:feat/auto-settle-merged-pr-toggle
Closed

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

Conversation

@caezium

@caeziumcaezium 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.

This composes with #5151: open PRs remain protected from inactivity auto-settle; this setting only controls the merged/closed completion trigger.

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 — 251 passed
  • bun --cwd apps/web test -- src/components/settings/settingsSearch.test.ts — 8 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 18 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 auto-settle toggle for merged/closed PR threads across web and mobile

  • Adds sidebarAutoSettleOnChangeRequestCompletion to ClientSettingsSchema (default true) so users can disable auto-settling threads when a PR is merged or closed.
  • Extends effectiveSettled to gate the PR-completion branch on the new flag; existing behavior is unchanged when the flag is omitted.
  • Web: adds a toggle in BetaSettingsPanel, wires it through useClientThreadSettlementPreferences into SidebarV2 and ChatView.
  • Mobile: persists two new device-local preferences (threadListV2AutoSettleInactive, threadListV2AutoSettleOnChangeRequestCompletion), exposed via toggles in SettingsRouteScreen and consumed by HomeScreen and ThreadNavigationSidebar.
  • Behavioral Change: preferences are held off (no auto-settling) until client settings are fully hydrated, preventing premature thread classification on load.

Macroscope summarized 2689452.

Summary by CodeRabbit

  • New Features

    • Added separate controls for automatically settling inactive threads and threads linked to merged or closed pull requests.
    • Applied these preferences across web and mobile thread lists, with sensible defaults.
    • Added settings search support for the new automatic-settling option.
  • Documentation

    • Documented automatic thread-settling behavior, defaults, mobile support, and manual-only options.
  • Bug Fixes

    • Threads remain active when automatic settling for completed pull requests is disabled.

Note

Low Risk
Preference and UI changes around thread list classification; defaults preserve existing behavior and settlement logic is covered by targeted tests.

Overview
Adds sidebarAutoSettleOnChangeRequestCompletion (default on) so merged/closed PR auto-settling is no longer tied to the inactivity setting. effectiveSettled only auto-settles on terminal PR states when that flag is enabled; manual settle, open-PR inactivity blocking, and the inactivity window stay unchanged.

Web/desktop expose a separate Beta toggle and useClientThreadSettlementPreferences (hydration-safe) feeds Sidebar v2, ChatView, and settings search. Mobile mirrors the two triggers via device-local preferences, resolveThreadListV2SettlementPreferences, and switches under Thread List v2 Beta.

User docs describe controlling both automatic settle paths independently.

Reviewed by Cursor Bugbot for commit 2689452. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a separate setting for automatic settlement after merged or closed change requests. Web and mobile settings expose both settlement triggers. Runtime and Thread List v2 classification apply the preferences and preserve manual settlement behavior.

Changes

Thread settlement contract and runtime

Layer / File(s)Summary
Settings contract and settlement classification
packages/contracts/src/settings.ts, packages/client-runtime/src/state/threadSettled.ts, packages/*/src/*test*, apps/desktop/src/settings/DesktopClientSettings.test.ts
Client settings default change-request completion settlement to enabled. effectiveSettled skips merged or closed change-request settlement when disabled. Tests cover defaults, patches, and manual-only behavior.

Web controls and consumers

Layer / File(s)Summary
Web settings and settlement consumers
apps/web/src/components/settings/BetaSettingsPanel.tsx, apps/web/src/components/settings/settingsSearch.*, apps/web/src/components/SidebarV2.tsx, apps/web/src/components/ChatView.tsx, docs/user/source-control.md
Web settings expose independent inactivity and merged/closed change-request controls. Sidebar and chat settlement evaluation receive the new preference. Documentation and settings search include the control.

Mobile Thread List v2

Layer / File(s)Summary
Mobile preference storage and resolution
apps/mobile/src/persistence/mobile-preferences.ts, apps/mobile/src/features/threads/threadListV2.ts, apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
Mobile preferences store both flags. A shared resolver applies the three-day inactivity default and enables change-request completion settlement unless explicitly disabled.
Mobile consumers and settings
apps/mobile/src/features/home/HomeScreen.tsx, apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx, apps/mobile/src/features/settings/SettingsRouteScreen.tsx, apps/mobile/src/features/threads/threadListV2.test.ts
Home, sidebar, and Thread List v2 use resolved preferences. Mobile Beta settings persist both switches. Tests cover defaults and active-list classification.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
participant SettingsPanel
participant ClientSettings
participant SidebarV2
participant effectiveSettled
SettingsPanel->>ClientSettings: update merged/closed auto-settle setting
ClientSettings->>SidebarV2: provide setting
SidebarV2->>effectiveSettled: evaluate thread state and preference
effectiveSettled-->>SidebarV2: settled or active classification
Loading

Possibly related PRs

Suggested reviewers:t3dotgg, shivamhwp

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 27.27% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedThe changes satisfy issue #4982 by separating settlement triggers, preserving defaults and manual behavior, and enabling fully manual settlement.
Out of Scope Changes check✅ PassedThe web, desktop, mobile, runtime, contract, test, and documentation changes directly support the requested auto-settle feature.
Title check✅ PassedThe title clearly and concisely describes the addition of a pull-request auto-settle toggle.
Description check✅ PassedThe description covers the required changes, rationale, UI updates, validation, screenshots, and checklist items.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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-actionsgithub-actionsBot 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

macroscopeappBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

New feature adding a user-facing settings toggle across web, mobile, and desktop that changes thread auto-settlement behavior. Cross-platform feature additions warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@caezium
caeziumforce-pushed the feat/auto-settle-merged-pr-toggle branch from 1f2d7cb to 2585df2CompareAugust 1, 2026 08:26

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2585df2. Configure here.

@caezium

Copy link
Copy Markdown
ContributorAuthor

@coderabbitai review

@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/mobile/src/features/threads/threadListV2.ts (1)

33-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use inferred return types.

Both functions infer their return shape from the returned object.

  • apps/mobile/src/features/threads/threadListV2.ts#L33-L39: Remove the explicit return type from resolveThreadListV2SettlementPreferences.
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts#L25-L28: Remove the explicit return type from useThreadListV2SettlementPreferences.

As per coding guidelines, “Prefer inferred types over explicit annotations and do not use any.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/mobile/src/features/threads/threadListV2.ts` around lines 33 - 39,
Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/mobile/src/features/threads/threadListV2.ts`:
- Around line 33-39: Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 897164d0-2c77-4240-8eef-04ade8e5f5c0

📥 Commits

Reviewing files that changed from the base of the PR and between 0ad91b6 and 2585df2.

📒 Files selected for processing (18)
  • apps/desktop/src/settings/DesktopClientSettings.test.ts
  • apps/mobile/src/features/home/HomeScreen.tsx
  • apps/mobile/src/features/settings/SettingsRouteScreen.tsx
  • apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
  • apps/mobile/src/features/threads/threadListV2.test.ts
  • apps/mobile/src/features/threads/threadListV2.ts
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
  • apps/mobile/src/persistence/mobile-preferences.ts
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/SidebarV2.tsx
  • apps/web/src/components/settings/BetaSettingsPanel.tsx
  • apps/web/src/components/settings/settingsSearch.test.ts
  • apps/web/src/components/settings/settingsSearch.ts
  • docs/user/source-control.md
  • packages/client-runtime/src/state/threadSettled.test.ts
  • packages/client-runtime/src/state/threadSettled.ts
  • packages/contracts/src/settings.test.ts
  • packages/contracts/src/settings.ts

@t3dotgg

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

Closing this PR after an automated pass over open pull requests. Configurable automatic settlement already shipped in #5880.

@t3dotggt3dotgg closed this Aug 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L100-499 changed lines (additions + deletions).vouch:unvouchedPR 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)

2 participants

@caezium@t3dotgg
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

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

Closed
caezium wants to merge 2 commits into
pingdotgg:mainfrom
caezium:feat/auto-settle-merged-pr-toggle
Closed

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

Conversation

@caezium

@caeziumcaezium 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.

This composes with #5151: open PRs remain protected from inactivity auto-settle; this setting only controls the merged/closed completion trigger.

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 — 251 passed
  • bun --cwd apps/web test -- src/components/settings/settingsSearch.test.ts — 8 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 18 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 auto-settle toggle for merged/closed PR threads across web and mobile

  • Adds sidebarAutoSettleOnChangeRequestCompletion to ClientSettingsSchema (default true) so users can disable auto-settling threads when a PR is merged or closed.
  • Extends effectiveSettled to gate the PR-completion branch on the new flag; existing behavior is unchanged when the flag is omitted.
  • Web: adds a toggle in BetaSettingsPanel, wires it through useClientThreadSettlementPreferences into SidebarV2 and ChatView.
  • Mobile: persists two new device-local preferences (threadListV2AutoSettleInactive, threadListV2AutoSettleOnChangeRequestCompletion), exposed via toggles in SettingsRouteScreen and consumed by HomeScreen and ThreadNavigationSidebar.
  • Behavioral Change: preferences are held off (no auto-settling) until client settings are fully hydrated, preventing premature thread classification on load.

Macroscope summarized 2689452.

Summary by CodeRabbit

  • New Features

    • Added separate controls for automatically settling inactive threads and threads linked to merged or closed pull requests.
    • Applied these preferences across web and mobile thread lists, with sensible defaults.
    • Added settings search support for the new automatic-settling option.
  • Documentation

    • Documented automatic thread-settling behavior, defaults, mobile support, and manual-only options.
  • Bug Fixes

    • Threads remain active when automatic settling for completed pull requests is disabled.

Note

Low Risk
Preference and UI changes around thread list classification; defaults preserve existing behavior and settlement logic is covered by targeted tests.

Overview
Adds sidebarAutoSettleOnChangeRequestCompletion (default on) so merged/closed PR auto-settling is no longer tied to the inactivity setting. effectiveSettled only auto-settles on terminal PR states when that flag is enabled; manual settle, open-PR inactivity blocking, and the inactivity window stay unchanged.

Web/desktop expose a separate Beta toggle and useClientThreadSettlementPreferences (hydration-safe) feeds Sidebar v2, ChatView, and settings search. Mobile mirrors the two triggers via device-local preferences, resolveThreadListV2SettlementPreferences, and switches under Thread List v2 Beta.

User docs describe controlling both automatic settle paths independently.

Reviewed by Cursor Bugbot for commit 2689452. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a separate setting for automatic settlement after merged or closed change requests. Web and mobile settings expose both settlement triggers. Runtime and Thread List v2 classification apply the preferences and preserve manual settlement behavior.

Changes

Thread settlement contract and runtime

Layer / File(s)Summary
Settings contract and settlement classification
packages/contracts/src/settings.ts, packages/client-runtime/src/state/threadSettled.ts, packages/*/src/*test*, apps/desktop/src/settings/DesktopClientSettings.test.ts
Client settings default change-request completion settlement to enabled. effectiveSettled skips merged or closed change-request settlement when disabled. Tests cover defaults, patches, and manual-only behavior.

Web controls and consumers

Layer / File(s)Summary
Web settings and settlement consumers
apps/web/src/components/settings/BetaSettingsPanel.tsx, apps/web/src/components/settings/settingsSearch.*, apps/web/src/components/SidebarV2.tsx, apps/web/src/components/ChatView.tsx, docs/user/source-control.md
Web settings expose independent inactivity and merged/closed change-request controls. Sidebar and chat settlement evaluation receive the new preference. Documentation and settings search include the control.

Mobile Thread List v2

Layer / File(s)Summary
Mobile preference storage and resolution
apps/mobile/src/persistence/mobile-preferences.ts, apps/mobile/src/features/threads/threadListV2.ts, apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
Mobile preferences store both flags. A shared resolver applies the three-day inactivity default and enables change-request completion settlement unless explicitly disabled.
Mobile consumers and settings
apps/mobile/src/features/home/HomeScreen.tsx, apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx, apps/mobile/src/features/settings/SettingsRouteScreen.tsx, apps/mobile/src/features/threads/threadListV2.test.ts
Home, sidebar, and Thread List v2 use resolved preferences. Mobile Beta settings persist both switches. Tests cover defaults and active-list classification.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
participant SettingsPanel
participant ClientSettings
participant SidebarV2
participant effectiveSettled
SettingsPanel->>ClientSettings: update merged/closed auto-settle setting
ClientSettings->>SidebarV2: provide setting
SidebarV2->>effectiveSettled: evaluate thread state and preference
effectiveSettled-->>SidebarV2: settled or active classification
Loading

Possibly related PRs

Suggested reviewers:t3dotgg, shivamhwp

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 27.27% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedThe changes satisfy issue #4982 by separating settlement triggers, preserving defaults and manual behavior, and enabling fully manual settlement.
Out of Scope Changes check✅ PassedThe web, desktop, mobile, runtime, contract, test, and documentation changes directly support the requested auto-settle feature.
Title check✅ PassedThe title clearly and concisely describes the addition of a pull-request auto-settle toggle.
Description check✅ PassedThe description covers the required changes, rationale, UI updates, validation, screenshots, and checklist items.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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-actionsgithub-actionsBot 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

macroscopeappBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

New feature adding a user-facing settings toggle across web, mobile, and desktop that changes thread auto-settlement behavior. Cross-platform feature additions warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@caezium
caeziumforce-pushed the feat/auto-settle-merged-pr-toggle branch from 1f2d7cb to 2585df2CompareAugust 1, 2026 08:26

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2585df2. Configure here.

@caezium

Copy link
Copy Markdown
ContributorAuthor

@coderabbitai review

@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/mobile/src/features/threads/threadListV2.ts (1)

33-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use inferred return types.

Both functions infer their return shape from the returned object.

  • apps/mobile/src/features/threads/threadListV2.ts#L33-L39: Remove the explicit return type from resolveThreadListV2SettlementPreferences.
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts#L25-L28: Remove the explicit return type from useThreadListV2SettlementPreferences.

As per coding guidelines, “Prefer inferred types over explicit annotations and do not use any.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/mobile/src/features/threads/threadListV2.ts` around lines 33 - 39,
Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/mobile/src/features/threads/threadListV2.ts`:
- Around line 33-39: Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 897164d0-2c77-4240-8eef-04ade8e5f5c0

📥 Commits

Reviewing files that changed from the base of the PR and between 0ad91b6 and 2585df2.

📒 Files selected for processing (18)
  • apps/desktop/src/settings/DesktopClientSettings.test.ts
  • apps/mobile/src/features/home/HomeScreen.tsx
  • apps/mobile/src/features/settings/SettingsRouteScreen.tsx
  • apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
  • apps/mobile/src/features/threads/threadListV2.test.ts
  • apps/mobile/src/features/threads/threadListV2.ts
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
  • apps/mobile/src/persistence/mobile-preferences.ts
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/SidebarV2.tsx
  • apps/web/src/components/settings/BetaSettingsPanel.tsx
  • apps/web/src/components/settings/settingsSearch.test.ts
  • apps/web/src/components/settings/settingsSearch.ts
  • docs/user/source-control.md
  • packages/client-runtime/src/state/threadSettled.test.ts
  • packages/client-runtime/src/state/threadSettled.ts
  • packages/contracts/src/settings.test.ts
  • packages/contracts/src/settings.ts

@t3dotgg

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

Closing this PR after an automated pass over open pull requests. Configurable automatic settlement already shipped in #5880.

@t3dotggt3dotgg closed this Aug 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L100-499 changed lines (additions + deletions).vouch:unvouchedPR 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)

2 participants

@caezium@t3dotgg
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

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

Closed
caezium wants to merge 2 commits into
pingdotgg:mainfrom
caezium:feat/auto-settle-merged-pr-toggle
Closed

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

Conversation

@caezium

@caeziumcaezium 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.

This composes with #5151: open PRs remain protected from inactivity auto-settle; this setting only controls the merged/closed completion trigger.

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 — 251 passed
  • bun --cwd apps/web test -- src/components/settings/settingsSearch.test.ts — 8 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 18 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 auto-settle toggle for merged/closed PR threads across web and mobile

  • Adds sidebarAutoSettleOnChangeRequestCompletion to ClientSettingsSchema (default true) so users can disable auto-settling threads when a PR is merged or closed.
  • Extends effectiveSettled to gate the PR-completion branch on the new flag; existing behavior is unchanged when the flag is omitted.
  • Web: adds a toggle in BetaSettingsPanel, wires it through useClientThreadSettlementPreferences into SidebarV2 and ChatView.
  • Mobile: persists two new device-local preferences (threadListV2AutoSettleInactive, threadListV2AutoSettleOnChangeRequestCompletion), exposed via toggles in SettingsRouteScreen and consumed by HomeScreen and ThreadNavigationSidebar.
  • Behavioral Change: preferences are held off (no auto-settling) until client settings are fully hydrated, preventing premature thread classification on load.

Macroscope summarized 2689452.

Summary by CodeRabbit

  • New Features

    • Added separate controls for automatically settling inactive threads and threads linked to merged or closed pull requests.
    • Applied these preferences across web and mobile thread lists, with sensible defaults.
    • Added settings search support for the new automatic-settling option.
  • Documentation

    • Documented automatic thread-settling behavior, defaults, mobile support, and manual-only options.
  • Bug Fixes

    • Threads remain active when automatic settling for completed pull requests is disabled.

Note

Low Risk
Preference and UI changes around thread list classification; defaults preserve existing behavior and settlement logic is covered by targeted tests.

Overview
Adds sidebarAutoSettleOnChangeRequestCompletion (default on) so merged/closed PR auto-settling is no longer tied to the inactivity setting. effectiveSettled only auto-settles on terminal PR states when that flag is enabled; manual settle, open-PR inactivity blocking, and the inactivity window stay unchanged.

Web/desktop expose a separate Beta toggle and useClientThreadSettlementPreferences (hydration-safe) feeds Sidebar v2, ChatView, and settings search. Mobile mirrors the two triggers via device-local preferences, resolveThreadListV2SettlementPreferences, and switches under Thread List v2 Beta.

User docs describe controlling both automatic settle paths independently.

Reviewed by Cursor Bugbot for commit 2689452. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a separate setting for automatic settlement after merged or closed change requests. Web and mobile settings expose both settlement triggers. Runtime and Thread List v2 classification apply the preferences and preserve manual settlement behavior.

Changes

Thread settlement contract and runtime

Layer / File(s)Summary
Settings contract and settlement classification
packages/contracts/src/settings.ts, packages/client-runtime/src/state/threadSettled.ts, packages/*/src/*test*, apps/desktop/src/settings/DesktopClientSettings.test.ts
Client settings default change-request completion settlement to enabled. effectiveSettled skips merged or closed change-request settlement when disabled. Tests cover defaults, patches, and manual-only behavior.

Web controls and consumers

Layer / File(s)Summary
Web settings and settlement consumers
apps/web/src/components/settings/BetaSettingsPanel.tsx, apps/web/src/components/settings/settingsSearch.*, apps/web/src/components/SidebarV2.tsx, apps/web/src/components/ChatView.tsx, docs/user/source-control.md
Web settings expose independent inactivity and merged/closed change-request controls. Sidebar and chat settlement evaluation receive the new preference. Documentation and settings search include the control.

Mobile Thread List v2

Layer / File(s)Summary
Mobile preference storage and resolution
apps/mobile/src/persistence/mobile-preferences.ts, apps/mobile/src/features/threads/threadListV2.ts, apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
Mobile preferences store both flags. A shared resolver applies the three-day inactivity default and enables change-request completion settlement unless explicitly disabled.
Mobile consumers and settings
apps/mobile/src/features/home/HomeScreen.tsx, apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx, apps/mobile/src/features/settings/SettingsRouteScreen.tsx, apps/mobile/src/features/threads/threadListV2.test.ts
Home, sidebar, and Thread List v2 use resolved preferences. Mobile Beta settings persist both switches. Tests cover defaults and active-list classification.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
participant SettingsPanel
participant ClientSettings
participant SidebarV2
participant effectiveSettled
SettingsPanel->>ClientSettings: update merged/closed auto-settle setting
ClientSettings->>SidebarV2: provide setting
SidebarV2->>effectiveSettled: evaluate thread state and preference
effectiveSettled-->>SidebarV2: settled or active classification
Loading

Possibly related PRs

Suggested reviewers:t3dotgg, shivamhwp

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 27.27% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedThe changes satisfy issue #4982 by separating settlement triggers, preserving defaults and manual behavior, and enabling fully manual settlement.
Out of Scope Changes check✅ PassedThe web, desktop, mobile, runtime, contract, test, and documentation changes directly support the requested auto-settle feature.
Title check✅ PassedThe title clearly and concisely describes the addition of a pull-request auto-settle toggle.
Description check✅ PassedThe description covers the required changes, rationale, UI updates, validation, screenshots, and checklist items.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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-actionsgithub-actionsBot 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

macroscopeappBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

New feature adding a user-facing settings toggle across web, mobile, and desktop that changes thread auto-settlement behavior. Cross-platform feature additions warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@caezium
caeziumforce-pushed the feat/auto-settle-merged-pr-toggle branch from 1f2d7cb to 2585df2CompareAugust 1, 2026 08:26

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2585df2. Configure here.

@caezium

Copy link
Copy Markdown
ContributorAuthor

@coderabbitai review

@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/mobile/src/features/threads/threadListV2.ts (1)

33-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use inferred return types.

Both functions infer their return shape from the returned object.

  • apps/mobile/src/features/threads/threadListV2.ts#L33-L39: Remove the explicit return type from resolveThreadListV2SettlementPreferences.
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts#L25-L28: Remove the explicit return type from useThreadListV2SettlementPreferences.

As per coding guidelines, “Prefer inferred types over explicit annotations and do not use any.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/mobile/src/features/threads/threadListV2.ts` around lines 33 - 39,
Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/mobile/src/features/threads/threadListV2.ts`:
- Around line 33-39: Remove the explicit return type annotation from
resolveThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/threadListV2.ts (lines 33-39) and
useThreadListV2SettlementPreferences in
apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts (lines 25-28),
allowing both functions to infer their return shapes from the returned objects.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 897164d0-2c77-4240-8eef-04ade8e5f5c0

📥 Commits

Reviewing files that changed from the base of the PR and between 0ad91b6 and 2585df2.

📒 Files selected for processing (18)
  • apps/desktop/src/settings/DesktopClientSettings.test.ts
  • apps/mobile/src/features/home/HomeScreen.tsx
  • apps/mobile/src/features/settings/SettingsRouteScreen.tsx
  • apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
  • apps/mobile/src/features/threads/threadListV2.test.ts
  • apps/mobile/src/features/threads/threadListV2.ts
  • apps/mobile/src/features/threads/use-thread-list-v2-enabled.ts
  • apps/mobile/src/persistence/mobile-preferences.ts
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/SidebarV2.tsx
  • apps/web/src/components/settings/BetaSettingsPanel.tsx
  • apps/web/src/components/settings/settingsSearch.test.ts
  • apps/web/src/components/settings/settingsSearch.ts
  • docs/user/source-control.md
  • packages/client-runtime/src/state/threadSettled.test.ts
  • packages/client-runtime/src/state/threadSettled.ts
  • packages/contracts/src/settings.test.ts
  • packages/contracts/src/settings.ts

@t3dotgg

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

Closing this PR after an automated pass over open pull requests. Configurable automatic settlement already shipped in #5880.

@t3dotggt3dotgg closed this Aug 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L100-499 changed lines (additions + deletions).vouch:unvouchedPR 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)

2 participants

@caezium@t3dotgg