Skip to content

sessions: list the Canvases section under Automations in the navigation list - #349855

Merged
Ulugbek Abdullaev (ulugbekna) merged 3 commits into
mainfrom
ulugbekna/canvases-under-automations
Nov 23, 2026
Merged

Ulugbek Abdullaev (ulugbekna) merged 3 commits into
mainfrom
ulugbekna/canvases-under-automations

Conversation

@ulugbekna

Copy link
Copy Markdown
Contributor

Why

Follow-up to #349654, tested in #349746. With sessions.sidebar.separateNavigation on, New Session, Automations and Customizations are rows of the separate navigation list, but the Canvases section (sessions.list.canvasesSection) rendered as the first section of the sessions tree. It read as part of the sessions instead of sitting next to Automations.

What changed

  • With a separate navigation list, the Canvases header and its pins are rows of that list, right after Automations. The sessions tree below holds only sessions.
  • The navigation list does not collapse sections, so choosing the Canvases header runs New Canvas..., as the other rows there open their pages. Its context menu offers New Canvas... too.
  • Pins step in one level under the header. The navigation list now defines the same indent variable as the sessions tree.
  • NEW_CANVAS_SESSION_COMMAND_ID moves into sessionsList.ts, so the workbench list can run it without importing from vs/sessions.

Canvases under Automations in the navigation list

Scope

Only the layout with a separate navigation list changes. Without one, Canvases stays a collapsible section after Automations in the tree. With sessions.list.canvasesSection off (the default), nothing changes.

Verification

  • ./scripts/test.sh --run the sessions list, sessions electron-browser, and canvas browser/electron-browser suites: 799 passing. The navigation-layout test now asserts the row order, the pins' indent, an empty tree, the header running New Canvas, and the unpinned and canvases-disabled states.
  • pnpm run typecheck-client, pnpm run oxlint on the changed files and pnpm run valid-layers-check: clean.
  • Manually in a Code OSS Agents window with both settings on: the sidebar shows New Session, Automations, Canvases, Customizations, then Sessions with only Chats. Choosing Canvases opened the picker; picking Session timeline started a session and pinned it, indented under Canvases. Right-clicking the header offered New Canvas.... With separate navigation off, the tree shows Automations, Canvases, "No canvases yet", Chats.

…on list

With a separate navigation list, Automations and Customizations are rows of that list, but the Canvases section was the first section of the sessions tree, so it read as part of the sessions. The Canvases header and its pins are now rows of the navigation list right after Automations. Choosing the header runs New Canvas, as the list does not collapse, and its context menu offers New Canvas. Pins step in under the header there too. Without a separate navigation list, the collapsible section stays after Automations in the tree.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 14:16

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

Right-clicking the Canvases header toolbar with separate navigation enabled throws an error because selection targets the wrong tree, leaving focus and selection updates incomplete.

1 open issue
What changed in this PR

This follow-up to #349654 places Canvases beside Automations in the Agents window’s separate navigation list, rather than inside the sessions tree. The existing collapsible tree layout remains unchanged when separate navigation is disabled.

Changes:

  • Moves the Canvases header and indented pins directly after Automations.
  • Makes header activation run New Canvas... and adds its navigation context menu.
  • Relocates the command ID to shared workbench code and updates documentation and interaction tests.
File Description
src/​vs/​workbench/​contrib/​sessions/​browser/​views/​sessionsList.ts Moves canvas rows into navigation and handles header activation and context menus.
src/​vs/​workbench/​contrib/​sessions/​browser/​media/​sessionsList.css Extends the indentation variable to the navigation container.
src/​vs/​sessions/​SESSIONS_LIST.md Documents canvas placement and activation in both layouts.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsList.test.ts Updates coverage for row order, pin depth, activation, and visibility.
src/​vs/​sessions/​contrib/​canvases/​electron-browser/​newCanvasSessionAction.ts Imports the relocated command ID from shared workbench code.

Review effort: Balanced

…icked

The Canvases header is a row of the separate navigation list rather than of the sessions tree, so selecting it in the tree before its toolbar's context menu threw. Navigation headers are now focused in that list instead.

Co-authored-by: Copilot <[email protected]>
@ulugbekna
Ulugbek Abdullaev (ulugbekna) added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit b4f9b4b Nov 23, 2026
38 checks passed
@ulugbekna
Ulugbek Abdullaev (ulugbekna) deleted the ulugbekna/canvases-under-automations branch November 23, 2026 15:35
@ulugbekna Ulugbek Abdullaev (ulugbekna) added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Nov 23, 2026
@ulugbekna Ulugbek Abdullaev (ulugbekna) added the canvases Issues related to Copilot canvases label Nov 23, 2026
@ulugbekna Ulugbek Abdullaev (ulugbekna) added this to the 1.148.0 milestone Nov 23, 2026
@ulugbekna Ulugbek Abdullaev (ulugbekna) added ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch and removed ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

canvases Issues related to Copilot canvases ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants