Repository navigation
feat(settings): toggle to settle snoozed threads on PR merge #27627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
18d7ddc
2ab4977
a4d3a63
d7e59f4
4338fff
cb8d6c4
b6c9645
d757d7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,12 @@ export function useAvailableSettingsSearchItems() { | |
| environment.connection.phase === "connected" && | ||
| environment.serverConfig?.environment.capabilities.fastWorktreeCheckout === true, | ||
| ) === true; | ||
| const hasThreadAutoSettleSnoozedOnMergeEnvironment = | ||
| environments.some( | ||
| (environment) => | ||
| environment.connection.phase === "connected" && | ||
| environment.serverConfig?.environment.capabilities.threadAutoSettleSnoozedOnMerge === true, | ||
|
Comment on lines
+39
to
+42
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Require capability support across the selected environments. If one connected environment supports this setting and another does not, this check includes the search result. The panel hides the switch when both environments are selected because it requires every selected environment to support it. Match the search gate to the required capability scope.
|
||
| ) === true; | ||
| const hasTextGeneratorsEnvironment = | ||
| environments.some( | ||
| (environment) => | ||
|
|
@@ -71,6 +77,7 @@ export function useAvailableSettingsSearchItems() { | |
| managedTunnelActive, | ||
| hasPeerLinkHost, | ||
| hasFastWorktreeCheckoutEnvironment, | ||
| hasThreadAutoSettleSnoozedOnMergeEnvironment, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gate the search result on merge auto-settlement. If a supporting environment has auto-settle on merge disabled, this flag still includes the snoozed-thread result. Selecting it opens the parent setting, but the requested switch is hidden. Pass the selected targets' merge-setting availability to the filter so search matches the panel.
|
||
| hasTextGeneratorsEnvironment, | ||
| hasPrimaryEnvironment: primaryEnvironmentId !== null, | ||
| }); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -195,6 +195,8 @@ settlement unless you turn on **Keep threads with a PR** in **Settings → Threa | |
| but an old closed or merged pull request does not settle work you | ||
| resumed after it closed. Only your own messages count as resuming. A turn that | ||
| finished background work or a pull request watch starts on its own does not. | ||
| Snoozed threads stay snoozed until they wake. To let a merge settle them anyway, turn on | ||
| **Auto-settle snoozed threads on merge** in **Settings → Threads**. | ||
|
Comment on lines
+198
to
+199
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. State that the merge must happen after snoozing. A PR that merged before the snooze began does not qualify, even when this setting is on. Include that limit so users know why enabling the setting does not settle an already-merged thread. As per coding guidelines, user documentation should explain “anything unintuitive.”
|
||
|
|
||
| To keep one thread out of the settled shelf no matter how long it sits idle, open its menu, | ||
| choose **Auto-settle behavior**, and pick **Never**. The current option is checked. Pick | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map the search result to the snoozed-thread row.
When the Threads panel renders this row, the row receives no searchable ID. Selecting its search result therefore uses
targetId: "auto-settle-merged-threads"and focuses the “Auto-settle merged threads” row instead of the “Settle snoozed threads on merge” switch.Suggested fix
Committable suggestion