fix: prevent theme flash on settings page and remove duplicate main.js import - #645
fix: prevent theme flash on settings page and remove duplicate main.js import#645GeethaBurigalla wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe campaign builder now embeds its client runtime for sequence editing, campaign operations, templates, and AI email generation. The settings page also loads a theme bootstrap script. ChangesCampaign builder runtime
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hello reviewer!! Turns out theme persistence is already built (theme-boot.js + main.js already have getTheme/setTheme/toggleTheme, cross-tab sync, Ctrl+T shortcut). So I just fixed what was actually broken: settings.html was missing theme-boot.js so it flashed light mode on load, and campaign-builder.html was importing main.js twice. Kept it minimal — happy to add the toggle to other pages too if you want that instead. |
Description
Theme persistence (localStorage + restore on load) is already implemented via
theme-boot.jsandmain.js. This PR fixes two gaps that undermined it:settings.htmlwas missingtheme-boot.jsin<head>, causing a flash of light mode on load — the one page with the actual toggle switch.campaign-builder.htmlimportedmain.jstwice, double-registering theme and other event listeners.Resolves #503.
Summary by CodeRabbit