Skip to content

Disable stack features by default - #9002

Merged
Alex Ross (alexr00) merged 4 commits into
mainfrom
alexr00/fond-meadowlark
Oct 5, 2026
Merged

Alex Ross (alexr00) merged 4 commits into
mainfrom
alexr00/fond-meadowlark

Conversation

@alexr00

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 1 High severity · 3 Medium severity

Open (4)
What changed in this PR

Introduces an opt-in setting to disable pull request stack functionality by default, and gates stack-related UI/actions based on that setting.

Changes:

  • Added githubPullRequests.experimental.stacks setting (default false) plus a shared areStacksEnabled() helper.
  • Disabled/guarded stack-dependent behaviors in the PR tree, PR overview/webviews, merge-stack, unstack, and create-PR stack flows.
  • Added test coverage and a reusable test mock for the new stacks setting.
File Description
src/​view/​prsTreeDataProvider.ts Gates tree multi-select and “Add to Stack” enablement/execution based on the stacks setting.
src/​github/​pullRequestStack.ts Prevents stack creation logic from running when stacks are disabled.
src/​github/​pullRequestReviewCommon.ts Blocks merge-stack when stacks are disabled.
src/​github/​pullRequestOverview.ts Skips stack loading/refresh and blocks unstack when stacks are disabled; refreshes on setting changes.
src/​github/​createPRViewProvider.ts Skips stack candidate lookup and blocks stack operations when stacks are disabled; reacts to setting changes.
src/​github/​activityBarViewProvider.ts Skips stack loading in the activity bar view when stacks are disabled; refreshes on setting changes.
src/​common/​settingsUtils.ts Adds areStacksEnabled() helper reading the new setting.
src/​common/​settingKeys.ts Adds EXPERIMENTAL_STACKS setting key constant.
package.json Contributes the new experimental stacks setting (default disabled).
package.nls.json Adds localized description string for the new setting.
src/​test/​mocks/​mockStackSetting.ts Adds a shared test helper to toggle stacks on/off via config stubbing.
src/​test/​view/​prsTree.test.ts Adds tests ensuring stack UI is disabled when stacks are disabled.
src/​test/​github/​pullRequestStack.test.ts Adds test ensuring stack creation is rejected when disabled.
src/​test/​github/​pullRequestOverview.test.ts Adds tests ensuring stack membership/merge/unstack are blocked or skipped when disabled.
src/​test/​github/​createPRViewProvider.test.ts Adds tests ensuring stack candidate lookup/stack selection is blocked when disabled.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/view/prsTreeDataProvider.ts
Comment thread package.json
Comment thread src/github/createPRViewProvider.ts
Comment thread src/github/pullRequestStack.ts Outdated
@alexr00
Alex Ross (alexr00) removed this pull request from stack #9001 October 2, 2026 18:51
@alexr00
Alex Ross (alexr00) added this pull request to stack #9012 October 3, 2026 10:39
@alexr00
Alex Ross (alexr00) marked this pull request as ready for review October 3, 2026 10:40
Copilot AI balanced review requested due to automatic review settings October 3, 2026 10:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment on lines +259 to +263
this._register(vscode.workspace.onDidChangeConfiguration(e => {
if (e.affectsConfiguration(`${PR_SETTINGS_NAMESPACE}.${EXPERIMENTAL_STACKS}`)) {
void this.refreshPanel();
}
}));
roblourens
roblourens previously approved these changes Oct 3, 2026
Base automatically changed from alexr00/prime-boar to main October 4, 2026 10:31
Copilot AI balanced review requested due to automatic review settings October 4, 2026 12:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Stack mutations can still execute if the setting is disabled while asynchronous validation or confirmation is pending.

Review effort: Balanced
Findings: 4 Medium severity

Open (4)


private async unstackAll(message: IRequestMessage<undefined>): Promise<void> {
try {
assertStacksEnabled();
export namespace PullRequestReviewCommon {
export async function mergeStack(ctx: ReviewContext, message: IRequestMessage<{ method: MergeMethod }>): Promise<void> {
try {
assertStacksEnabled();
}

export async function addPullRequestsToStack(pullRequests: readonly PullRequestModel[], confirmedCandidate: StackCandidate): Promise<number[]> {
assertStacksEnabled();

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

Stack functionality is consistently gated and the affected paths have focused automated coverage.

Review effort: Balanced
Findings: 4 Medium severity

Open (4)

@alexr00
Alex Ross (alexr00) merged commit e62a2ad into main Oct 5, 2026
7 checks passed
@alexr00
Alex Ross (alexr00) deleted the alexr00/fond-meadowlark branch October 5, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants