Skip to content

Add lighting schedules, application rules, cues and focus timers - #58

Merged
mskutin merged 2 commits into
mainfrom
codex/lighting-routines
Oct 19, 2026
Merged

mskutin merged 2 commits into
mainfrom
codex/lighting-routines

Conversation

@mskutin

@mskutin mskutin commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Adds a local routines editor in Scenes: recurring weekday schedules with immediate/fade transitions, explicitly selected application rules, temporary cues and focus/break timers. Manual lighting changes cancel pending app restoration and fades; cues preserve the underlying scene and honor Stop, quiet hours and comfort limits. Schedules deduplicate local dates and skip missed/startup/wake/timezone-change boundaries.

Adds authenticated API v1/CLI routine controls and bumps desktop/CLI to 0.13.0 for automatic release. Routines use offline profile snapshots; capture starts remain explicit. App matching uses local OS application names, with X11 support and an explicit Wayland unavailable status. docs/routines.md describes timing, precedence, restoration and supported scope.

Validation: 81 native unit tests pass (one separate interactive capture test remains excluded from the ordinary suite), strict desktop/control Clippy, 9 control tests, 14 release tests, browser controls and isolated Windows native timer/off-state smoke. No physical USB or capture was started by the routine smoke. Physical Mac/X11, strip fades and assistive technology validation remain in #37, #38 and #45.

Closes #10
Closes #15
Closes #25
Closes #9

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T09:55:03.933982Z b0efcde PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b0efcde086

ℹ️ 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".

Comment thread src-tauri/src/engine.rs
Comment on lines +699 to +700
self.restore_routine()?;
self.routines.configure(config)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Persist config before restoring the active app rule

When the user saves while an application rule is active, this restores the underlying scene before Runtime::configure attempts to write the new configuration. If that write fails—for example because the disk is full or the configuration directory becomes unwritable—the save reports an error even though lighting has already changed; moreover, the old foreground value remains while the restoration state is cleared, so the previous rule will not be reapplied until focus changes. Save successfully before restoring, or explicitly roll back/re-evaluate the rule on failure.

Useful? React with 👍 / 👎.

@mskutin
mskutin merged commit 8342be9 into main Oct 19, 2026
9 checks passed
@mskutin
mskutin deleted the codex/lighting-routines branch October 19, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant