feat: LED preview surface, Hue transport correctness, and full IPC status-code coverage - #176
Merged
Conversation
…xtend the verifier
Dependency ReviewThe following issues were found:
|
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.
Twenty-three commits covering a correctness pass over the Hue transport and the
lighting hot path, the new LED preview surface, a contract-coverage overhaul,
and the first real test infrastructure for this app.
Correctness
targets from
activeOutputTargetsone way and never put them back, so thequick solid path saw an empty target set and updated the UI and the persisted
state while nothing reached any device. It appeared to "heal itself" whenever a
later slow-path mode transition repopulated the set. The poll is now a two-way
reconciler keyed on the selected targets, and the Rust-side pending-colour
flush no longer depends on a status code that the DTLS path never writes.
HUE_SENDER_MIN_INTERVAL_MSgated loop iterations rather than requests, andthe timestamp was stamped after the whole fan-out, so an N-light area issued N
writes per tick with no spacing. Replaced with a per-request pacer at 10 req/s,
a
429/Retry-Afterarm in the classifier, and a single-threaded round-robinin place of the nested
thread::scope.branch now wins the token via a shared
AtomicBool.ActiveSinkRegistrywaspopulated but never read: Solid bypassed
LedSinkentirely, and theDEVICE_NOT_CONNECTEDgate consulted only the serial state, so a WLED-onlysession was rejected outright. Colour correction and brightness now apply to
the WLED path too.
profile, and colour correction were unset, driving an SK6812 RGBW strip
through the WS2812B encoder and an Adalight controller through the LumaSync v1
header, on exactly the hardware the test exists to verify.
per pixel in
derive_base_interval_ms.Performance
previous-colour buffer is allocated only when Hue output is attached.
1.073 → 0.670 req/s measured.
a 10 Hz edge signal no longer re-renders the lights section, and
LedGlowDot'smemo is effective again.
removes the visible swap on load; live telemetry numbers no longer reflow the
row they sit in.
LED preview
A digital-twin overlay and a control popup: patterns apply the moment they are
selected, the chase pattern is a true per-LED comet weighted by real perimeter
length and holding phase across the worker rebuild each tweak forces, edge
ribbons align with the dots they mirror, the overlay opens on the display chosen
in LED Setup, and the popup persists its position behind a single
always-available close. Hex input is validated and capped at six digits.
Contracts
Every status code crossing the IPC boundary is now declared and enforced by the
verifier, which grew from 221 to 274 checks: derived lighting parity, telemetry
field parity, VID/PID allowlist parity, and a phantom-code ratchet with six
baselined entries. Two transposed codes (
UNSUPPORTED_PORTvsPORT_UNSUPPORTED,PERMISSION_DENIEDvsCONNECT_PERMISSION_DENIED) and aharvest bug that truncated
lighting_mode.rsat line 58 of ~3400 are fixed —the Rust code harvest went from 135 to 198.
ShellStatedropsledTwinEnabledLive, which was declared but neither read norwritten. The field was optional, so no schema bump is needed and on-disk states
are unaffected.
Tests
tauri::test's mock runtime.@wdio/tauri-servicewith theembedded driver provider — the only path that works on macOS, where WKWebView
exposes no WebDriver endpoint.
Verification
typecheck,verify:shell-contracts(274/274),vitest(519 passed, 2 todo),build,cargo fmt,clippy --all-targets --all-features -D warnings,cargo test --all-features(398 + 36), andcargo auditall pass.Not verified on hardware: the WLED output path (no device available), and the
comet rendering has not been watched live.