Skip to content

fix: migrate to CSS-based Primer theme provider - #3394

Merged
setchy merged 2 commits into
mainfrom
migrate-primer-theme-provider
Oct 8, 2026
Merged

setchy merged 2 commits into
mainfrom
migrate-primer-theme-provider

Conversation

@setchy

@setchy setchy commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Migrate production and visual-test theme providers to @primer/react/next, aligning the appearance hook, public props type, and setter mock.
  • Preserve the existing provider hierarchy, BaseStyles, CSS wrapper attributes, theme mappings, settings, and native bridge behavior. Production changes are imports only; the visual helper changes only its provider import.
  • Add four focused real-provider cases to the existing src/renderer/hooks/useAppearance.test.ts unit-test file:
    • Provider updates and descendant wrapper compatibility.
    • Live light-to-dark settings updates.
    • System-mode OS changes without rewriting the saved preference or forcing a fixed native source.
    • One representative accessibility scheme.
  • Retain all existing mocked appearance tests, resetting mock behavior between cases. No separate integration file, test project, or broad duplicate appearance suite is introduced.

Addresses three SonarCloud typescript:S1874 findings in App.tsx: AaAzhot1E7Zk-3Vizzqj, AaAzhot1E7Zk-3Vizzqk, and AaAzhot1E7Zk-3Vizzql. Unrelated SonarCloud findings are outside scope.

Local validation

  • pnpm check passed.
  • pnpm exec tsc --noEmit --incremental false passed.
  • Focused appearance/theme/settings tests: 41 passed.
  • Full unit suite: 1,869 tests passed across 186 files.
  • pnpm build passed; Vite emitted a non-fatal chunk-size warning.
  • Pre-commit formatting, lint, type checks, and changed tests passed.
  • Strict OpenSpec validation passed; local planning artifacts were aligned with the reduced test scope.

CI status

For latest commit 9703d4d7:

  • Lint and TypeScript/unit-test CI passed.
  • Visual Regression passed against the existing baselines. Docker was unavailable locally, so this is the visual verification result. No screenshot baselines were changed.
  • CodeQL and GitHub Actions security checks passed.
  • SonarQube Cloud Analysis was still running when this description was updated; closure of the three findings is not yet claimed.

No dependency, CSS, persistence, routing, or IPC changes. OpenSpec artifacts remain local, consistent with the repository ignoring openspec/.

@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@setchy
setchy merged commit 98dd13d into main Oct 8, 2026
27 checks passed
@setchy
setchy deleted the migrate-primer-theme-provider branch October 8, 2026 23:46
@github-actions github-actions Bot added this to the Release 7.10.0 milestone Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

1 participant