Repository navigation
fix: ignore Input's status queries after a screen unlock - #22
Merged
Merged
Conversation
Input drops and reopens the pad on every screen unlock, then asks for device.status (or sys.version). Those replies are objects, so the null-only filter let them through and the quiet Input was blamed: the warning stayed after every lid open until Recheck. A foreign reply now counts only when it is an error or a dictionary with an "ok" key, which is what the lighting calls and fs.write answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
After closing and reopening the MacBook's lid, the panel showed "Also driving this pad: input — colours may fight." until Recheck was pressed.
Why
Work Louder's Input app listens for Electron's
unlock-screen, drops and reopens every device, and a second after reconnecting asks the pad fordevice.status(falling back tosys.version) — read from its bundle (app.asar:disconnectAllDevices(),onDeviceConnected). Both replies are objects, so the null-only filter from #21 let them through. Input was a known quiet holder, the fallback laid the reply at it, and the warning stayed for as long as Input runs.Change
BridgeController.isAboutTheLighting(result:error:): a foreign reply counts only when it is an error or a dictionary with anokkey — what the lighting calls andfs.writeanswer. Queries (sys.version,device.status,fs.list,fs.read) andhost.focused_appno longer count; errors still do.README.md,docs/hacking.md,CLAUDE.md,design/pad-contention.mdNotes.Behaviour change: the Inspector only sends
sys.versionanddevice.statuswhen it connects, so opening it no longer raises the warning; sending a colour from it does.Checks
swift build -c release(zero warnings) andenv -u HERDR_SOCKET_PATH swift testgreen.🤖 Generated with Claude Code