Skip to content

[cherry-pick] automations: feat: backport templates and target selection to 1.137 - #335012

Closed
vs-code-engineering[bot] wants to merge 1 commit into
mainfrom
cherry-pick/334865
Closed

[cherry-pick] automations: feat: backport templates and target selection to 1.137#335012
vs-code-engineering[bot] wants to merge 1 commit into
mainfrom
cherry-pick/334865

Conversation

@vs-code-engineering

Copy link
Copy Markdown
Contributor

Cherry-pick of #334865 from release/1.137.

⚠️ This cherry-pick has merge conflicts that need manual resolution. Conflict markers (<<<<<<</=======/>>>>>>>) are committed to the branch — check it out locally, resolve, and force-push.

git fetch origin cherry-pick/334865 && git checkout cherry-pick/334865
# resolve conflicts, then:
git add -A && git commit --amend --no-edit && git push --force-with-lease

Conflicting files:

  • src/vs/sessions/contrib/automations/test/browser/providerAutomationService.test.ts
  • src/vs/sessions/contrib/providers/agentHost/test/browser/agentHostAutomationStore.test.ts
  • src/vs/sessions/contrib/sessions/browser/views/automationTemplates.ts
  • src/vs/sessions/contrib/sessions/browser/views/automationsAccessibility.ts
  • src/vs/sessions/contrib/sessions/browser/views/automationsView.ts
  • src/vs/sessions/contrib/sessions/test/browser/automationsView.test.ts

Cherry-pick

Cherry-picks #334836 into release/1.137.

  • Source commit: b6d68fb
  • One signed cherry-pick commit with -x provenance.
  • Rebased onto release commit 15903dfbe84cb7bea8a802624812043da8f3d9ba after [cherry-pick] automations: fix: limit New badge to returning Agents users #334944 brought in the overlapping catalogue-state dependency.
  • Resolved the two test-file conflicts by keeping the release's combined emissions assertion and error-recovery coverage, while retaining the additional local-operation, legacy-readability, and atomic-transition tests.
  • Reuses the release's catalogue/store implementations unchanged. The remaining PR changes 18 files; the template and dialog UI are unchanged from the original cherry-pick.
  • The provider-owned session-template prerequisite is already in this release through [cherry-pick] Automations: preserve provider session templates #334831.

What this brings to 1.137

  • Starter automation templates: editable issue-triage, pull-request-review, dependency-audit, and release-notes suggestions. Selecting a template opens the normal dialog; it does not create or schedule an automation.
  • Explicit targets: new automations no longer silently inherit a recent GitHub workspace and appear locked to Cloud. Users choose a workspace or No workspace first. Single-agent targets explain the restriction and offer Choose Workspace; saved edit/duplicate targets and opaque provider configuration remain preserved.
  • Honest catalogue presentation: use the release's existing loading, ready, unavailable, and error states in the UI, accessible content, and listAutomations. Known automations and usable local targets remain available when a remote provider is offline. Only ready may claim that an empty catalogue means no automations.
  • Regression coverage and focus safeguards: retain the release's migration/readability safeguards, add coverage for unavailable providers and atomic transitions, keep full-text template hovers, and preserve focus without stealing it after delayed updates.

Provider ownership, workspace trust, managed policy, and existing AI feature gating are unchanged. There are no dependency or persistence-schema changes.

Screenshots from the source PR (unchanged UI)
Explicit new-automation target Explanation for a Cloud-only workspace
New automation asks for a workspace or No workspace Cloud-only target explains the restriction and offers Choose Workspace

Release validation

  • 177 targeted Electron tests passed after the rebase: aggregate providers, Agent Host automation stores, New badge eligibility, and the Automations view.
  • Client type checking passed after the rebase.
  • Targeted ESLint passed for both resolved test files.
  • Verified unchanged upstream catalogue/store implementations and unchanged template/dialog UI, a signed single commit, a clean worktree, and no whitespace errors.

The original conflict-free cherry-pick had an identical stable patch ID to the source commit and passed 400 targeted Electron tests, including the dialog and workspace/agent pickers. The source PR also passed its full GitHub CI and completed Copilot review without findings. CI will rerun for the rebased head.

Copilot AI balanced review requested due to automatic review settings September 8, 2026 08:08
@vs-code-engineering vs-code-engineering Bot added the cherry-pick-artifact Auto-generated cherry-pick PR label Sep 8, 2026

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.

🟡 Changes recommended

Unresolved merge conflicts leave production and test files syntactically invalid.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Backports automation templates, explicit target selection, and catalogue-state handling to release 1.137.

Changes:

  • Adds starter templates and accessible presentation.
  • Preserves target-selection and catalogue-state safeguards.
  • Adds regression coverage for provider and automation behavior.
  • Contains unresolved merge conflicts.
File summaries
File Review
src/vs/sessions/contrib/sessions/test/browser/automationsView.test.ts Critical: unresolved conflicts prevent compilation.
src/vs/sessions/contrib/sessions/browser/views/automationTemplates.ts Critical: unresolved conflicts in the template contract.
src/vs/sessions/contrib/sessions/browser/views/automationsView.ts Critical: unresolved conflict in template-card rendering.
src/vs/sessions/contrib/sessions/browser/views/automationsAccessibility.ts Critical: unresolved conflict in accessible summaries.
src/vs/sessions/contrib/providers/agentHost/test/browser/agentHostAutomationStore.test.ts Critical: conflicting constructor calls prevent compilation.
src/vs/sessions/contrib/automations/test/browser/providerAutomationService.test.ts Critical: unresolved constructor conflict prevents compilation.
Review details

Suppressed comments (8)

src/vs/sessions/contrib/providers/agentHost/test/browser/agentHostAutomationStore.test.ts:2299

  • This additional unresolved constructor conflict leaves the test file invalid. Select the call matching the target branch API and remove the markers.
<<<<<<< HEAD

src/vs/sessions/contrib/providers/agentHost/test/browser/agentHostAutomationStore.test.ts:2309

  • The empty conflict branch and telemetry stub are still enclosed by merge markers, which prevents the test from parsing. Resolve whether this dependency exists on the target branch and remove the markers.
<<<<<<< HEAD

src/vs/sessions/contrib/sessions/browser/views/automationTemplates.ts:22

  • Two incompatible template catalogues are still separated by conflict markers, leaving invalid syntax and ambiguous shipped content. Select the intended catalogue and remove the complete conflict block.
<<<<<<< HEAD

src/vs/sessions/contrib/sessions/test/browser/automationsView.test.ts:865

  • This second unresolved conflict also makes the test file syntactically invalid. Select the expected template assertion and remove all conflict markers.
<<<<<<< HEAD

src/vs/sessions/contrib/sessions/test/browser/automationsView.test.ts:906

  • The committed conflict markers prevent TypeScript from parsing this expected-state assertion. Resolve the template-count variant before merging.
<<<<<<< HEAD

src/vs/sessions/contrib/sessions/test/browser/automationsView.test.ts:968

  • Both conflicting test implementations remain in source, which makes the suite uncompilable. Resolve this block to the test coverage matching the retained templates and remove the markers.
<<<<<<< HEAD

src/vs/sessions/contrib/sessions/test/browser/automationsView.test.ts:1046

  • This unresolved conflict leaves invalid syntax in the hover test. Choose the expected hover count that matches the final template list and remove the markers.
<<<<<<< HEAD

src/vs/sessions/contrib/sessions/test/browser/automationsView.test.ts:2335

  • This remaining conflict marker makes the test source invalid. Resolve the accessibility-content expectation consistently with the final template representation.
<<<<<<< HEAD
  • Files reviewed: 6/6 changed files
  • Comments generated: 7
  • Review effort level: Balanced

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

Comment on lines +398 to +402
<<<<<<< HEAD
const remote = teardown.add(new MutableCatalogueAutomationStore('remote', storage, new NullLogService(), automationStorage));
=======
const remote = teardown.add(new MutableCatalogueAutomationStore('remote', storage, new NullLogService(), NullTelemetryService, automationStorage));
>>>>>>> b90e78d57e8 (automations: feat: backport templates and target selection to 1.137 (#334865))
const storage = disposables.add(new InMemoryStorageService());
const automationStorage = new TestAutomationStorageService(storage);
const storageKey = providerAutomationStorageKey('remote-agent-host');
<<<<<<< HEAD
export interface IAutomationTemplate {
readonly id: string;
readonly name: string;
<<<<<<< HEAD
lines.push('');
lines.push(localize('automationsAccessibleView.templates', "Available templates"));
for (const template of AUTOMATION_TEMPLATES) {
<<<<<<< HEAD

const scheduleElement = DOM.append(card, $('span.automations-template-card-schedule'));
scheduleElement.textContent = schedule;
<<<<<<< HEAD
descriptions: widget.element.querySelectorAll('.automations-cards-empty-description').length,
buttons: widget.element.querySelectorAll('.automations-cards-create-button').length,
templateSections: widget.element.querySelectorAll('.automations-templates').length,
<<<<<<< HEAD
);
});

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

Labels

cherry-pick-artifact Auto-generated cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants