Repository navigation
Conversation
The zone select started on "None", so a broadcast sent without touching it went nowhere and still showed "Broadcast sent!". The select now starts on the first zone. If no zone is chosen or the sound queue is empty, the page says what is missing instead of showing success. broadcast() now says why it did nothing and logs it. Co-Authored-By: Claude Opus 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 happens now
Broadcast a sound from the panel, leave the zone select alone, and nothing plays. The page still says "Broadcast sent!".
The zone select starts on "None":
and the finish action skips the send for that value but renders the success page anyway:
broadcast()has two more silent exits: an empty sound queue, and a queue where no audio row has afileName. Bothreturnwith nothing logged, and the user again sees success.We chased this on a live school bell system. Nothing reached the sounder, nothing was added to the job queue, and the panel said it worked, so it looked like the sounder was broken.
The change
zones[0].id.broadcast()returns{sent: true}or{sent: false, reason}and logs the reason withconsole.warn. The two other callers ignore the return value, so they are unaffected.enandpl.broadcast.zone.noneOptionis removed from both locale files; it had exactly one use.Checks
npm run typecheck,npm run prettierandnpm run buildpass.npm run linthas 0 errors; its 17 warnings are all pre-existing and none are in the files touched here. The repo has no tests.Unrelated, not touched
app/routes/broadcast.builder.tsxhas the samesounds[0].idcrash when there are no sounds in the database, andbroadcast()still throws a 500 for a stale zone id instead of a friendly message.🤖 Generated with Claude Code