fix(desktop): apply saved theme before window startup - #716
Merged
Merged
Conversation
Seed editor window backgrounds and HTML startup palettes from saved preferences before native window creation. Keep editor reveal gated on complete theme settings and custom CSS. Closes #713
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
When Windows uses a dark system theme and Markra is saved in light mode, an editor window can paint dark before React restores its appearance. Seed the native/WebView background and HTML startup palette from saved preferences before the main window is created, and reuse the same initialization for new editor windows.
Keep the native theme following the OS so switching back to system appearance still works. Startup parameters only seed the editor's palette: reveal still waits for complete saved preferences and any required custom CSS. Existing reveal fallbacks and settings-window behavior are preserved.
Fixes #713.
Validation
pnpm --filter @markra/desktop test— 164 passed, including startup palette regressions for opposite system/app themes.pnpm --filter @markra/app exec vitest run src/App.test.tsx src/hooks/useStartupWindowReveal.test.tsx— 253 passed, including deferred custom-theme startup.cargo test --manifest-path apps/desktop/src-tauri/Cargo.toml --locked— 288 passed, including pre-creation background, startup URL, and native-theme preservation checks.pnpm --filter @markra/desktop build— passed, including vendor chunk verification.pnpm --filter @markra/desktop --filter @markra/app typecheck:test— passed.cargo fmt --manifest-path apps/desktop/src-tauri/Cargo.toml -- --check— passed.Local verification ran on macOS. Windows visual verification is still needed for cold launch, opening a file from Explorer, and creating another editor window with opposing system/app appearances; automated tests do not prove the native first frame is flicker-free.