Skip to content

Disable theme transitions during theme swaps#1429

Merged
nwparker merged 1 commit intostablyai:mainfrom
KayleeWilliams:KayleeWilliams/disable-theme-transition
May 5, 2026
Merged

Disable theme transitions during theme swaps#1429
nwparker merged 1 commit intostablyai:mainfrom
KayleeWilliams:KayleeWilliams/disable-theme-transition

Conversation

@KayleeWilliams
Copy link
Copy Markdown
Contributor

Summary

Disable CSS transitions only while Orca flips the document theme class so light/dark swaps happen instantly instead of fading different UI elements at different speeds.

Changes

  • Added a shared renderer document theme helper that resolves system, dark, and light preferences.
  • Temporarily applies a root transition-suppression class during theme swaps and removes it after two animation frames.
  • Wired startup, settings, and system theme change handling through the shared helper.
  • Added focused unit coverage for theme resolution, root class toggling, and transition suppression cleanup.

Validation

  • pnpm test src/renderer/src/lib/document-theme.test.ts
  • pnpm run tc:web
  • pnpm exec oxlint src/renderer/src/lib/document-theme.ts src/renderer/src/lib/document-theme.test.ts src/renderer/src/main.tsx src/renderer/src/App.tsx src/renderer/src/components/settings/Settings.tsx
  • git diff --check

…s only during the root light/dark class swap. Normal UI transitions and animations should continue working immediately before and after the swap.
@KayleeWilliams KayleeWilliams marked this pull request as ready for review May 5, 2026 06:38
@nwparker nwparker self-assigned this May 5, 2026
@nwparker nwparker merged commit f0de143 into stablyai:main May 5, 2026
7 of 8 checks passed
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