sessions: Preserve background layouts per color scheme - #333873
Merged
TylerLeonhardt merged 3 commits intoSep 1, 2026
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Existing preferences are lost, and cancelling a preview after a theme switch can restore the wrong layout.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
src/vs/sessions/services/chatBackground/browser/chatBackgroundService.ts — Reading only the two new keys drops every existing chat.agentSessions.backgroundImageLayout… |
|
src/vs/sessions/services/chatBackground/browser/chatBackgroundService.ts — A color-theme change can occur while the layout quick pick is open (for example, through automatic… |
What changed in this PR
Splits Agents chat background layouts by color scheme and reloads them on theme changes.
Changes:
- Adds machine-local dark/light layout settings.
- Reloads layouts when themes change.
- Updates tests and accessibility guidance.
| File | Description |
|---|---|
chatBackgroundService.ts |
Implements scheme-specific layouts. |
chatBackgroundService.test.ts |
Tests persistence and theme switching. |
chat.contribution.ts |
Registers the new settings. |
sessionsChatAccessibilityHelp.ts |
Clarifies layout scope. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Store and restore dark and light Agents chat background image layouts independently. Keep layout persistence machine-local alongside the corresponding image settings and cover theme switching and preview restoration. Fixes #333690 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the configured layout for the color scheme that is active when the background layout picker is cancelled. This avoids applying a stale preview if automatic theme detection switches schemes while the picker is open. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TylerLeonhardt
force-pushed
the
tyleonha/fix-theme-specific-background-layouts
branch
from
September 1, 2026 22:16
8ae3418 to
2e68e85
Compare
Keep cancellation tied to the layout captured when the picker opens instead of exposing configuration restoration through the background service. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TylerLeonhardt
marked this pull request as ready for review
September 1, 2026 22:33
TylerLeonhardt
enabled auto-merge (squash)
September 1, 2026 22:33
Michael Lively (Yoyokrazy)
approved these changes
Sep 1, 2026
TylerLeonhardt
deleted the
tyleonha/fix-theme-specific-background-layouts
branch
September 1, 2026 22:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Fixes #333690
Testing
npm run transpile-client.\scripts\test.bat --run src\vs\sessions\services\chatBackground\test\browser\chatBackgroundService.test.ts(11 passing)npm run eslint -- src\vs\sessions\services\chatBackground\browser\chatBackgroundService.ts src\vs\sessions\services\chatBackground\test\browser\chatBackgroundService.test.ts src\vs\sessions\contrib\chat\browser\chat.contribution.tsVisual verification
Verified in an isolated native Agents window:
Light Modern — Left
Dark Modern — Right Restored