Lightshow status improvements - #18
Merged
Merged
Conversation
The manager now records what the model is doing, not just whether a task exists: - States: idle, running, completed, stopped, errored, plus finished for one-shot actions like "All LEDs on". Each show runs under a supervisor coroutine that records its outcome — MicroPython's Task has no done-callbacks or exception() to inspect after the fact. - Shows are started by their config name, so the start/stop responses and the index page report the real show name instead of "wrapper". - Manual LED routes (/led/<x>/on|off, /all/on|off) go through the manager: they cancel any running show first, so a show can no longer fight the user over the LEDs, and the UI shows the action as the last activity. - New /lightshow/status JSON route; index renders a status one-liner. - Show errors are recorded by the supervisor instead of being swallowed as an unread task result by safe_execution, which now only guards request handlers. lightshow_route/RouteDecorator.py retired; the manager lives in src/server/lightshow_manager.py. Co-Authored-By: Claude Fable 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.
Improves tracking of any running lightshow.