fix: guard an out-of-range layout_id, show a not-responding badge - #692
Merged
Merged
Conversation
…a not-responding badge for a silent app
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.
Two small, related fixes for how the configurator and firmware handle an app
that doesn't answer a parameter request — one a crash, one a silent gap in
the UI.
Firmware: out-of-range
layout_idcrashGetAppParams/SetAppParamsindexedAPP_PARAM_SIGNALS[layout_id as usize]straight from the client-supplied message with no bounds check. Every other
caller gets
layout_idfrom a realLayout, so it's always valid; these tworead it off the wire raw. A malformed or out-of-range request (
layout_id >= 16) indexes the fixed 16-element array out of bounds and panics, halting thewhole device. Found while reviewing #688/#690/#691's neighborhood, not
triggered by anything currently in the catalogue.
Now answers nothing for an out-of-range id, the same as an app that never
replies — no crash, no behavior change for any valid request.
Configurator: a silent app used to just vanish from the Device tab
An app with declared params that never answers a request (no param handler,
wedged, mid-quarantine) had no entry in the Device tab at all — indistinguishable
from it not being in the layout. Now it still gets a card, with a "Not
responding" badge next to its name and a short explanation instead of a
parameter form (rendering one with empty or default values would look real
and risk overwriting the app's actual state on save).
Verified
frame to trigger (nothing in the catalogue sends an out-of-range
layout_id), and the "not responding" badge needs an app with no paramhandler in a layout, which the catalogue no longer has now that Manifold
and Ripppple both have one (fix: announce only the apps that answered in the param batch #690, chore(release): faderpunk v0.1.0 #60). Both are small, reviewable by
inspection.
🤖 Generated with Claude Code