fix: surface app start/stop/restart failures in the ui#2188
Closed
ryanwaits wants to merge 1 commit into
Closed
Conversation
Failed app lifecycle mutations were silently swallowed: the tRPC mutation rejects but no onError handler existed, so users got no feedback when an app failed to start, stop or restart (e.g. after editing its compose file by hand). Show an error toast with the underlying message, following the existing error toast patterns.
Member
|
Merged, same as #2187 (comment). Thanks! |
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.
Problem
When an app fails to start, stop or restart, the tRPC mutation rejects but nothing in the UI listens for it: the mutations in
use-app-install.tshave noonErrorhandlers and there's no global mutation error toast. The failure is completely silent. The user just sees the app sitting in whatever state it landed in, with no idea anything went wrong or why (#2175 shows how confusing that gets).Fix
Show an error toast with the underlying message when start/stop/restart fails, following the existing error toast patterns (factory reset, files uploads). Three new strings in
en.jsononly, assuming the translation workflow picks up the other locales. Happy to adjust if not.The toast surfaces the failing command rather than a user-level explanation (e.g. "your compose file has invalid YAML"). Getting to that would need error shaping on the umbreld side, which felt out of scope for this change.
Testing
Manually in umbrel-dev: broke an installed app's compose file, clicked the app, got "Failed to restart app" with the failing command as the description. The toast is selectable for copying, which the toaster's styling already anticipates.
Caveat
Tested in the umbrel-dev VM (Docker/macOS), not on real umbrelOS hardware.
Pairs with #2187, which makes the app land in a recoverable state when this happens. The two are independent; either stands alone.