Skip to content

Allow disabling auto-settle when a thread's PR is merged #6333

Description

@Sumstead72

Problem

A thread settles the moment its pull request merges, ahead of the inactivity window. In effectiveSettled (packages/client-runtime/src/state/threadSettled.ts):

if (options.changeRequestState === "merged" || options.changeRequestState === "closed") {
  return true;
}

Merge is not always the end of the work. Deploy verification, follow-up fixes, and post-merge cleanup all happen in the same thread, and the thread drops out of the sidebar's active list while it is still being worked on. The Settings copy states this is unconditional: "Threads on merged or closed PRs always settle."

The current escape is the explicit keep-active pin (settledOverride: "active"), which has to be set per thread, every time, and only after noticing the thread has vanished.

Suggestion

A client setting to turn off merge as a settle trigger — something like sidebarAutoSettleOnMergedPr, defaulting to true so existing behavior is unchanged.

Turning it off would remove merge as a trigger without pinning the thread active the way an open PR does: the thread would still settle once it goes quiet past the existing inactivity window. Closed PRs would keep settling immediately, since abandoned work has no follow-up tail.

That keeps it to one boolean and one branch in effectiveSettled, with no change to the settle lifecycle, the server, or the wire contract.

Before I go further

CONTRIBUTING.md says you are not taking feature work right now, so I am asking rather than opening a PR. I have this implemented locally against main (contracts schema, effectiveSettled, the three web call sites, a Settings toggle, and unit tests) and can open a small PR with before/after screenshots if it is something you would consider. Happy to drop it otherwise.

One open question if you are interested: mobile reads no client settings today (apps/mobile/src/features/threads/threadListV2.ts hardcodes its auto-settle inputs), so the setting would be web/desktop only unless you would rather it wait for settings sync.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions