Skip to content

Automations: Wire into customizations UI#324167

Merged
benvillalobos merged 54 commits into
mainfrom
bv/automations-4-integration
Jul 5, 2026
Merged

Automations: Wire into customizations UI#324167
benvillalobos merged 54 commits into
mainfrom
bv/automations-4-integration

Conversation

@benvillalobos

@benvillalobos benvillalobos commented Jul 3, 2026

Copy link
Copy Markdown
Member

Context

Final PR in the 4-part automations v0 work, wiring the system into the product surface.

1: Foundation #323745
2: Runner #323810
3: Management UI #323914

This feature will be tagged experimental, advanced, and only show up in insiders for team feedback while we lock in the details.

NOTE: The UX is early and will be refactored as we find a home for this feature, this will be done in follow-up work so we can get team feedback on the base automations feature. Tracking that here

Copilot AI review requested due to automatic review settings July 3, 2026 07:29
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: e21571cb Current: a20b7063

Changed (6)

sessions/aiCustomizationShortcutsWidget/Expanded/Dark
Before After
before after
sessions/aiCustomizationShortcutsWidget/Expanded/Light
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithMcpServers/Dark
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithMcpServers/Light
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithCounts/Dark
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithCounts/Light
Before After
before after

1 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details.

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.

Pull request overview

This is the final PR of a four-part sprint that surfaces the Automations feature (scheduling agent sessions on a cadence) throughout the product UI. It wires automations into the Customizations sidebar, the overview tiles, the customizations tree view, and the management editor, adds provider-level session setters so the automation runner can apply saved options, and gates the whole feature behind chat.automations.enabled (only included in non-stable builds). The UX is intentionally early per the linked follow-up issue #324166.

Changes:

  • Adds the Automations entry/tile/link to the sidebar toolbar, overview view, and tree view, each gated by the chat.automations.enabled setting.
  • Adds setMode/setPermissionLevel/setIsolationMode/setBranch to the Copilot chat sessions provider, a suppressModelPersistence chat-input option, and an "open session" affordance in the run-history list.
  • Tightens the automations dialog (default isolation workspace, git-open error handling, disposed-guard on layout) and restricts the settings to non-stable builds.
Show a summary per file
File Description
chatInputPart.ts New suppressModelPersistence option so dialog model picks don't write to global storage.
aiCustomizationManagement.css Styles for the run-history open button and a cursor tweak.
automationsListWidget.ts Adds open-session button, renames focusSearchfocus, refines run-started announcement.
aiCustomizationManagementEditor.ts Updates call sites from focusSearch() to focus().
customizationsToolbar.contribution.ts Adds gated Automations sidebar item with live count and optional when clause support.
copilotChatSessionsProvider.ts Implements optional provider setters for mode/permission/isolation/branch.
aiCustomizationWorkspaceService.ts Adds Automations to the section ordering.
automations.contribution.ts Retags settings as experimental/advanced and includes them only in non-stable builds.
automationDialogService.ts Defaults isolationMode to workspace.
automationDialog.ts Isolation default consistency, git-repo error handling, session-type visibility, disposed-guard on relayout.
aiCustomizationTreeViewViews.ts Adds a gated Automations link to the customizations tree.
aiCustomizationOverviewView.ts Adds a gated, reactive Automations overview tile.

Review details

  • Files reviewed: 13/13 changed files
  • Comments generated: 4
  • Review effort level: Medium

Comment thread src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.ts Outdated

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.

Review details

  • Files reviewed: 16/16 changed files
  • Comments generated: 5
  • Review effort level: Medium

Comment thread src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts Outdated
Comment thread dev/null/pre-push Outdated
Comment thread dev/null/post-merge Outdated
Comment thread dev/null/post-commit Outdated
Comment thread dev/null/post-checkout Outdated

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.

Review details

  • Files reviewed: 13/13 changed files
  • Comments generated: 2
  • Review effort level: Medium

Comment thread src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.ts Outdated
@benvillalobos
benvillalobos force-pushed the bv/automations-4-integration branch from d343453 to 2e8137e Compare July 3, 2026 20:11
@benvillalobos benvillalobos added this to the 1.128.0 milestone Jul 3, 2026
@benvillalobos
benvillalobos force-pushed the bv/automations-4-integration branch 3 times, most recently from 2afb1c9 to 8c7123b Compare July 3, 2026 21:03
benvillalobos and others added 14 commits July 5, 2026 08:30
…ter, feature gate

Connects the Automations feature to existing VS Code surfaces:
- AI Customizations sidebar entry gated on ChatAutomationsEnabledContext
- Overview tile with automation count badge
- Deep-link: sidebar click navigates directly to Automations tab
- Session filter in agents-window: 'Automations' toggle shows only
  automation-spawned sessions (derived from run-history sessionId match)
- Feature gate when-clauses on all entry points
- Mode picker: hideCustomChatModes support for modal contexts
- Session type picker: isSessionTypeVisible delegate for filtering providers

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Place the Automations toggle in a separate separator-delimited group
between the Done/Read props and the Reset action.
Expands the session type visibility filter to include AgentHostCopilot,
allowing automations to run via the agent host execution path. Default
still prefers Background (Copilot CLI) with agent host as fallback.
…tion filter

- Re-add source: 'automation' to ISendRequestOptions (removed in PR 2,
  re-added now that PR 4 ships the filter that consumes it).
- automationRunner sets source on every run for telemetry and future
  protocol threading.
- agentSessionsFilter: replace dead metadata.source check with run-history
  derivation (matches the working sessionsList approach).
- Revert date grouping from Today/Yesterday/Last 7 Days back to
  Recent/Older — that UX change affects all users and belongs in its own PR.
- setChatMode2: always sync to live input model regardless of storeSelection
  (storeSelection gates persistence, not live state)
- automationDialog: guard queueMicrotask layout against disposal
- automationsListWidget: rename focusSearch() to focus() (no search box)
- automationsListWidget: hasDynamicHeight returns false for collapsed rows
  (skip unnecessary re-measure for fixed-height items)
…back

- chatInputPart: scope untitledInputAttachments by widgetViewKindTag
  (prevents automations dialog from leaking into normal chat drafts)
- automationsListWidget: focus() now focuses the list row 0 when items
  exist, falls back to empty-state CTA when empty
- automationsListWidget: runNow only announces success when a new
  non-failed run actually appeared (runner can swallow failures)
Add suppressModelPersistence option to IChatInputPartOptions. When true,
user-initiated model picks apply to the live input only without writing
to the shared APPLICATION-scope last-used-model storage key. The
automation's model is persisted per-automation in the automation record,
not globally.
- automationsListWidget: guard latestRun null before accessing .status,
  fix indentation on if-block
- sessionsList: fix stray indentation on olderSections, compress comment
- sessionsView: compress multi-line comment to single line
- agentSessionsFilter: cache automation session IDs in a Set (O(1) lookup)
- aiCustomizationOverviewView: trim verbose comments
- chatInputPart: narrow suppressModelPersistence doc to match scope
… and fallback

The model picker delegate passed suppressModelPersistence to the wrong
parameter (isUserAction instead of storeSelection), so the automation
dialog's model picks still wrote to global storage. Also thread the
suppression through checkModelSupported so mode-triggered model resets
do not leak to the global preference either.
- customizationsToolbar: register Automations entry in CUSTOMIZATION_ITEMS
  with ChatAutomationsEnabledContext when-clause. Add 'when' field to
  ICustomizationItemConfig for per-item conditions.
- automationsListWidget: revert conditional hasDynamicHeight back to always
  true. The optimization caused height clipping on multi-line prompts and
  prevented scrolling to the last item.
…onMode, setBranch

The management service calls these methods on the provider when creating
automation sessions, but only setModel was implemented. All other settings
(mode, permission level, isolation, branch) silently no-oped via optional
chaining, causing automation runs to ignore configured settings.

Adds the 4 methods to both CopilotChatSessionsProvider and
LocalChatSessionsProvider. Mode resolution handles built-in modes via
ChatMode singletons and custom modes via IChatModeService lookup.
benvillalobos and others added 9 commits July 5, 2026 08:31
…S hooks

Model picker delegate gated isUserAction on suppressModelPersistence,
preventing the protection flag from being set in the automations dialog.
An explicit model pick could be silently reset by checkModelSupported.

Fix: isUserAction stays true (it IS a user action), only storeSelection
is gated by suppressModelPersistence.

Also removes 4 accidentally committed Git LFS hook scripts from
dev/null/ that are unrelated to automations.
CustomizationLinkViewItem now depends on IAutomationService for the
automations count. The screenshot fixture was missing this service
registration, causing all 10 aiCustomizationShortcutsWidget fixtures
to fail with 'UNKNOWN service automationService'.
The open-session affordance in run history was parsing sessionId
(providerId:localId) as a URI, which produces garbage. Now persists
session.resource.toString() and parses it back directly — matching
what IChatWidgetService.openSession expects.
…tton

The open-session action was only visible on hover with no accessible
name. Now has aria-label and becomes visible on keyboard focus.
@benvillalobos
benvillalobos force-pushed the bv/automations-4-integration branch from 8c7123b to 5ff1248 Compare July 5, 2026 15:31
openSession() silently resolves with undefined when the session no
longer exists. Previously this produced no user feedback.
@benvillalobos
benvillalobos force-pushed the bv/automations-4-integration branch from 5ff1248 to 27337a7 Compare July 5, 2026 16:52
benvillalobos and others added 13 commits July 5, 2026 13:18
The open-session button on completed automation runs used
chatWidgetService.openSession which fails in the Agents window
(no ChatViewPane exists). Route through openSession from
agentSessionsOpener instead, which uses the session opener
registry and properly activates the session via
SessionsOpenerParticipant.

Also improves the provider-not-found error message to show
the session type instead of the raw URI with GUID.
Removes setFocus([0]) and empty-state button focus from the
focus() method so opening the Automations section doesn't
highlight the first row or trigger tooltips.
@benvillalobos
benvillalobos marked this pull request as ready for review July 5, 2026 21:19
@benvillalobos benvillalobos changed the title Automations: Integration Automations: Wire into customizations UI Jul 5, 2026
@benvillalobos
benvillalobos merged commit 3379a34 into main Jul 5, 2026
29 checks passed
@benvillalobos
benvillalobos deleted the bv/automations-4-integration branch July 5, 2026 21:37
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.

3 participants