feat: theme switching and configurable editor file suffix#8
Open
rwoll wants to merge 4 commits into
Open
Conversation
Replace all hardcoded dark-mode colors with CSS custom properties and add a @media (prefers-color-scheme: light) block with a full light palette. The extension, web app, and CLI now all respect the OS theme setting automatically. Changes: - styles.ts: CSS variables for every color token, dark defaults with light overrides via prefers-color-scheme media query - highlighter.ts: dual shiki themes (material-theme-darker + github-light) using CSS variable-based multi-theme output - index.tsx: detect system theme for mermaid diagram initialization, export CSS_VARS for external consumers - Upload.tsx / main.tsx: replace hardcoded hex colors with CSS var() references - index.html / extension.ts: add color-scheme meta tag - Updated visual snapshots Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When window.autoDetectColorScheme is enabled, the extension follows the
OS theme via prefers-color-scheme (existing behavior). When it's
disabled, the extension now reads vscode.window.activeColorTheme and
forces the matching light/dark palette via CSS class overrides.
Changes:
- state.ts: add themeMode signal ('system' | 'light' | 'dark')
- index.tsx: accept themeMode option, resolve mermaid theme accordingly
- styles.ts: extract light vars, apply via both media query (:not(.theme-dark))
and forced .theme-light class
- App.tsx: apply theme-light/theme-dark class on <html> based on themeMode
- extension.ts: detect autoDetectColorScheme + activeColorTheme, pass
themeMode to PlanReview.init(), re-render on theme/config changes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Change the filenamePattern from *.md to *.spec.md so the Plan Review editor only activates for spec documents, not every markdown file. Update the SKILL.md to instruct Copilot to generate *.spec.md files. Update the explorer context menu to match *.spec.md only. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a VS Code setting planReview.fileSuffix (default '.spec.md') that controls which files auto-open in the Plan Review editor. The extension syncs this to workbench.editorAssociations on activation and whenever the setting changes. - Register custom editor for *.md with priority 'option' (available via Open With for any md file, but never forced) - Programmatically manage workbench.editorAssociations based on the configured suffix - Update SKILL.md to reference the setting so Copilot creates files with the correct extension - Context menu shows for all .md files (user can always open manually) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Brings in @Yoyokrazy's changes from his fork:
Changes
prefers-color-schemelight/dark support across extension, web, and CLIautoDetectColorSchemeis off, readsactiveColorThemeand forces matching palette*.spec.md— Plan Review editor only activates for spec documents instead of all markdownplanReview.fileSuffixsetting — user-configurable suffix (default.spec.md) that syncs toworkbench.editorAssociationsAll commits authored by @Yoyokrazy.