feat: sync App Inspector theme with VS Code color theme#152
Merged
Conversation
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>
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.
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
data-vscode-theme-kindattribute andvscode-*classes) and passes it toLocalStackThemeProvideras the initialthemeType.VSCodeThemeSynccomponent that observes body attribute/class mutations and dispatchesLocalStackEventType.THEME_UPDATEevents so the App Inspector follows live theme changes from the host VS Code window.prefers-color-schemedefault and ignored the user's VS Code theme choice.Testing
🤖 Generated with Claude Code
Related
Completes DRG-725