Skip to content

feat: add temp stop mode - #1403

Open
AlexKaravaev wants to merge 1 commit into
mainfrom
alex/stop-ui-event
Open

feat: add temp stop mode#1403
AlexKaravaev wants to merge 1 commit into
mainfrom
alex/stop-ui-event

Conversation

@AlexKaravaev

Copy link
Copy Markdown
Collaborator

No description provided.

@AlexKaravaev
AlexKaravaev requested a review from a team as a code owner September 6, 2026 04:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 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-09-06T05:03:43.135135Z 6716d97 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.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
  • [P2] Short sampling requests can expire without blanking any LEDsui/src/engine/diamond.rs:1114. The deadline starts when the event is handled, but black frames are only sent on the next 30 Hz rendering tick. A positive request shorter than ~33 ms can therefore expire before any black frame is sent; longer requests also lose part of their blackout interval. Start the duration when the blackout frame is emitted, and add coverage for requests arriving between ticks.

@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: 6716d971aa

ℹ️ 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 ui/src/engine/diamond.rs
Comment on lines +1114 to +1116
self.ambient_light_blackout_until = (*duration_ms > 0).then(|| {
std::time::Instant::now()
+ Duration::from_millis(u64::from((*duration_ms).min(5000)))

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 Start timing after emitting the first blackout frame

When a positive duration is requested, the deadline starts while the previously illuminated frame is still on the MCU; black frames are only emitted on the next 30 FPS engine tick. Consequently, every blackout can be shorter than requested by up to roughly 33 ms, and values below one tick can expire without ever blanking the LEDs, undermining the ambient-light sample. Emit the blackout immediately or start the deadline when the first black frame is sent.

Useful? React with 👍 / 👎.

Comment thread ui/src/engine/diamond.rs
Comment on lines +1134 to +1135
let frame = if blackout {
[Argb(Some(0), 0, 0, 0); DIAMOND_CENTER_LED_COUNT]

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 Honor blackout requests while the engine is paused

When Diamond has entered UiState::Paused(UiMode::Api) after BootComplete { api_mode: true }, the event handler records this deadline but every front-LED transmission remains guarded by if !paused. An AmbientLightSample request received over D-Bus therefore succeeds without sending any black frame, so it cannot suppress LED interference in API mode. The blackout writes need to bypass this pause or the request must be explicitly unsupported in that mode.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant