Skip to content

feat: sync App Inspector theme with VS Code color theme#152

Merged
skyrpex merged 1 commit intomainfrom
drg-725-vscode-theme-sync
May 4, 2026
Merged

feat: sync App Inspector theme with VS Code color theme#152
skyrpex merged 1 commit intomainfrom
drg-725-vscode-theme-sync

Conversation

@peter-smith-phd
Copy link
Copy Markdown
Contributor

@peter-smith-phd peter-smith-phd commented May 3, 2026

Motivation

The App Inspector webview in the LocalStack Toolkit is currently not synced to the VS Code dark/light mode setting, but instead defaults to the system setting. This gives an awkward appearance if the VS Code theme doesn't match the system theme. This PR chooses the VS Code theme ahead of the system theme.

Summary

  • Detects VS Code's current color theme from the webview body (data-vscode-theme-kind attribute and vscode-* classes) and passes it to LocalStackThemeProvider as the initial themeType.
  • Adds a VSCodeThemeSync component that observes body attribute/class mutations and dispatches LocalStackEventType.THEME_UPDATE events so the App Inspector follows live theme changes from the host VS Code window.
  • Without this, the App Inspector only respected the OS prefers-color-scheme default and ignored the user's VS Code theme choice.

Testing

  • Manually changed system theme and VS Code theme to ensure that App Inspector's theme always updated accordingly.

🤖 Generated with Claude Code

Related

Completes DRG-725

Detects VS Code's current theme from the webview body's
`data-vscode-theme-kind` attribute (and `vscode-*` classes) and
forwards changes to LocalStackThemeProvider via the integrations
event system, so the App Inspector follows the user's VS Code theme
instead of only the OS `prefers-color-scheme` default.

DRG-725

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@peter-smith-phd peter-smith-phd marked this pull request as ready for review May 3, 2026 23:49
Copy link
Copy Markdown
Contributor

@skyrpex skyrpex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@skyrpex skyrpex merged commit 9dd7882 into main May 4, 2026
9 checks passed
@skyrpex skyrpex deleted the drg-725-vscode-theme-sync branch May 4, 2026 07:42
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.

2 participants