Claude/night shift app toggle 6cm vk#9
Merged
Conversation
…e schedule The restore logic used `wasEnabled || hasSchedule` to decide whether to re-enable Night Shift after leaving an excluded app. This meant that if a schedule existed (e.g. Sunset to Sunrise) but wasn't currently active (e.g. 6pm before a 7:25pm sunset), ShiftChange would still call setNightShiftEnabled(true) on restore — force-toggling "Turn On Until Sunrise" and warming the display unexpectedly. Fix: use the `active` field from BlueLightStatus (whether the display is actually being warmed right now) instead of checking whether a schedule merely exists. Night Shift is only restored if it was actively warming the display when the excluded app gained focus. https://claude.ai/code/session_014Sj5CVs9WfTHtp5NhaK8sw
…o About The previous fix used `status.active` from CoreBrightness, but `active` likely means "the Night Shift feature is running" (schedule is configured and monitoring) rather than "the display is currently being warmed." This meant `active` was true at 6pm with a sunset schedule, causing the same false-restore bug. Now uses `isEnabled` only — the manual/schedule-triggered enabled state. If Night Shift wasn't enabled when entering an excluded app, we don't touch it on restore. The `|| hasSchedule` from the original code was the sole cause of the bug. Also adds version string to the About window (reads CFBundleShortVersionString from Info.plist, falls back to "dev" for debug builds) so it's easy to confirm which build is running. https://claude.ai/code/session_014Sj5CVs9WfTHtp5NhaK8sw
Adds Resources/VERSION read by both the Swift About screen (via Bundle.module) and create-dmg.sh. Eliminates the need to pass a version argument to create-dmg.sh or hardcode it in Swift — just update the one file for each release. https://claude.ai/code/session_014Sj5CVs9WfTHtp5NhaK8sw
Includes key technical details about the CoreBrightness bridge struct fields, the Night Shift restore logic (and past bug), build instructions, and a release checklist covering version bumps and regression tests. https://claude.ai/code/session_014Sj5CVs9WfTHtp5NhaK8sw
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.
No description provided.