Skip to content

feat: theme switching and configurable editor file suffix#8

Open
rwoll wants to merge 4 commits into
mainfrom
yoyokrazy/theme-and-editor-scoping
Open

feat: theme switching and configurable editor file suffix#8
rwoll wants to merge 4 commits into
mainfrom
yoyokrazy/theme-and-editor-scoping

Conversation

@rwoll

@rwoll rwoll commented Mar 12, 2026

Copy link
Copy Markdown
Owner

Brings in @Yoyokrazy's changes from his fork:

Changes

  1. System theme switching — CSS custom properties with prefers-color-scheme light/dark support across extension, web, and CLI
  2. VS Code IDE theme following — when autoDetectColorScheme is off, reads activeColorTheme and forces matching palette
  3. Scope custom editor to *.spec.md — Plan Review editor only activates for spec documents instead of all markdown
  4. Configurable planReview.fileSuffix setting — user-configurable suffix (default .spec.md) that syncs to workbench.editorAssociations

All commits authored by @Yoyokrazy.

Yoyokrazy and others added 4 commits March 11, 2026 14:31
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>
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