Skip to content

sessions list: fix: reset recycled section icon colors - #350598

Open
Ulugbek Abdullaev (ulugbekna) wants to merge 2 commits into
mainfrom
ulugbekna/agents/fix-pinned-canvas-icon-color
Open

Ulugbek Abdullaev (ulugbekna) wants to merge 2 commits into
mainfrom
ulugbekna/agents/fix-pinned-canvas-icon-color

Conversation

@ulugbekna

@ulugbekna Ulugbek Abdullaev (ulugbekna) commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Why

Recycled sidebar rows can retain Customizations' blue badge color when rebound to an inactive pinned canvas or idle Automations entry.

What changed

  • Clear the previous section's inline icon color at section rebinding, before the current renderer assigns its own colors.
  • Add a regression covering Customizations → live/unavailable canvas and Automations reuse through both section rendering paths, preserving the intentional Customizations badge color.

Scope

Merged current main at 9ffac133344. Preserve its renderer extraction and Canvases folding/hover changes from #350586; the reset now lives in sessionsListRenderers.ts. The PR's delta remains one production line and its regression test, with no folding, hover, CSS, or provider behavior changes.

Verification

After merging main, using Node 24.22.3:

  • pnpm run transpile-client — passed.
  • VSCODE_SKIP_PRELAUNCH=1 ./scripts/test.sh --run src/vs/sessions/contrib/sessions/test/electron-browser/sessionsListFocusRing.test.ts --run src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts --grep 'focused row styles|SessionSectionRenderer|[Cc]anvas' --reporter dot — 36 passed, including Canvases folding/focus coverage, using the available Electron 43.8.10 rather than main's requested 43.8.13.
  • pnpm run oxlint src/vs/workbench/contrib/sessions/browser/views/sessionsListRenderers.ts src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts — passed.
  • git diff --cached --check origin/main — passed before committing the resolution.
  • pnpm install — blocked by a dependency-feed 404; retrying with --frozen-lockfile --registry=https://registry.npmjs.org failed because the public registry was unreachable. No dependency manifests or registry configuration were changed by the repair.
  • pnpm run build-fast --client-only and pnpm run typecheck-client — blocked by the outdated installed Copilot SDK after the failed dependency refresh. Both passed on the original pre-merge change.
  • Original isolated Code OSS verification: reproduced the stale blue color on the base, then verified the same production list DOM node becomes neutral after badge-to-canvas reuse with the fix. Checked live, pending, and unavailable canvas inputs in both sidebar layouts under dark/light themes; intentional badge colors remain intact.
  • Live verification used controlled canvas state and list recycling, not an actual provider pin/open workflow; it was not repeated after merging main.

Clear the previous section's inline icon color before rendering a recycled row so pinned canvases and idle Automations do not inherit Customizations badge styling. Preserve colors assigned by the current section renderer and cover both rendering paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merge current main and keep its SessionsList renderer extraction and Canvases folding changes. Move the recycled icon color reset to SessionSectionRenderer in sessionsListRenderers.ts; retain the focused regression test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🟢 Approval recommended

No active review issues remain for the change addressing stale sidebar icon colors.

No open issues 🎉

What changed in this PR

Fixes stale icon colors in the Agents window’s Sessions sidebar when recycled Customizations rows become pinned canvases or idle Automations entries.

Changes:

  • Clears the previous section’s inline icon color before rendering the new section.
  • Adds regression coverage for tree and shortcut rendering paths, including canvas availability changes and preservation of intentional Customizations badge colors.

No actionable findings remain. The PR reports passing targeted tests; post-merge type checking was blocked by dependency issues, and live UI verification was not repeated.

File Description
src/​vs/​workbench/​contrib/​sessions/​browser/​views/​sessionsListRenderers.ts Resets icon color when a section template is rebound.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsList.test.ts Tests recycled icon colors and badge restoration through both rendering paths.

Review effort: Balanced

This branch has not been deployed

No deployments
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