Hidden “More Features” page, adaptive theme sync, time-period rule, and related fixes#50
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1029b5e1fc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| private void StopAllStates() | ||
| { | ||
| StopCountdownProcess(); | ||
| TryAbortSystemShutdown(); |
There was a problem hiding this comment.
Avoid aborting unrelated system shutdowns
StopAllStates now always calls shutdown /a, which cancels any pending Windows shutdown globally, not just one started by this action. That means stopping this action (or app shutdown via CancelPlanOnAppStopping) can unexpectedly cancel a shutdown scheduled by another tool/admin process, which is a functional regression outside this feature's scope.
Useful? React with 👍 / 👎.
| if (targetTheme == null || targetTheme == _lastAppliedTheme) | ||
| { |
There was a problem hiding this comment.
Reapply theme after re-enabling auto-sync
The early-return on targetTheme == _lastAppliedTheme assumes the app theme still matches the last auto-applied value. If users disable auto-sync, manually switch theme, then re-enable it, RefreshNow can skip SetTheme entirely because _lastAppliedTheme is stale, leaving the theme mismatched to the detected background until a later luminance change.
Useful? React with 👍 / 👎.
Motivation
Description
LocalQuotecomponent: increased UINumericUpDownmaximum to8000and added runtime clamping withMath.Clamp(Settings.CarouselIntervalSeconds, 1, 8000)inRefreshTimerIntervalto enforce range1..8000seconds (Controls/Components/LocalQuoteSettingsControl.axaml,LocalQuoteComponent.axaml.cs).LoadTemporaryClassPlanAction: snapshot the priorTempClassPlanId/TempClassPlanSetupTimewhen invoked (when revertible) and restore that snapshot inOnRevert(or clear if no snapshot) using aConcurrentDictionarykeyed byActionSet.Guid(Actions/LoadTemporaryClassPlanAction.cs).MoreFeaturesOptionsSettingsPage(XAML + code-behind) and registered it withHideDefault=true, added aButtonon the main pluginSystemToolssettings to navigate to the hidden page using aclassisland://app/settings/...?ci_keepHistory=trueURI (SettingsPage/MoreFeaturesOptionsSettingsPage.*,SettingsPage/SystemToolsSettingsPage.axaml(.cs), registration inPlugin.cs).AdaptiveThemeSyncServicethat samples the ClassIsland main-window area every 2s, computes luminance from a few sample pixels and callsIThemeService.SetTheme(...)to switch between Light/Dark; addedAutoMatchMainBackgroundThemeconfig flag inMainConfigData, registered the service as singleton and start/stop hooks in plugin lifecycle (Services/AdaptiveThemeSyncService.cs,ConfigHandlers/MainConfigData.cs,Plugin.cs).shutdown /aas a fallback; addedCancelPlanOnAppStoppingcall during plugin shutdown and call toTryAbortSystemShutdown()when stopping states (Actions/AdvancedShutdownAction.cs,Plugin.cs).InTimePeriodRulewithInTimePeriodRuleSettingsandInTimePeriodRuleSettingsControl, supporting start/end input and cross-day intervals (e.g.22:00 - 06:00); handlerHandleInTimePeriodRuleadded and rule registered inPlugin.cs, and added to feature list in settings view model (Rules/InTimePeriodRuleSettings.cs,Controls/InTimePeriodRuleSettingsControl.cs,Plugin.cs,SettingsPage/SystemToolsSettingsViewModel.cs).Testing
dotnet build -v minimalin the execution environment butdotnetis not available (/bin/bash: dotnet: command not found), so no successful compilation was performed.dotnet build) and smoke-test the plugin inside ClassIsland to verify behavior (start/stop lifecycle, navigation to the hidden settings page, toggleAutoMatchMainBackgroundTheme, triggerLoadTemporaryClassPlanwith revertable automation, and test advanced shutdown cancellation).Codex Task