Repository navigation
[Brew] Finished toasts no longer keep a Cancel button - #33036
Conversation
A finished install could stay on its progress toast, "Installing ... / Operation completed successfully", with a live Cancel button. settle() finished by replacing the toast with showToast, and a progress update sent in the same tick could land on top of the replacement. settle() now finishes the toast in place: it sets the style and title and clears the message and both actions. Close After Action still hides the toast and shows a HUD.
|
Thank you for your first contribution! 🎉 🔔 @nhojb @Aayush9029 @mathieudutour @urwrstkn8mare @ashokbaruaakas @MillerApps @pernielsentikaer @jfkisafk @vpukhanov @j3lte @alexander-cato @ViGeng @ridemountainpig @chrismessina @clins1994 @alexibuild you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="brew/finish-toasts-in-place"
FORK_URL="https://github.com/dibas-np/extensions.git"
EXTENSION_NAME="brew"
REPO_NAME="extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryBrew now finishes action toasts in place instead of replacing them.
No actionable issues found. Tests and Raycast UI checks were not run during this review. Known deferral: Reviews (1) · Last reviewed commit: "[Brew] Finished toasts no longer keep a ..." · Reviewed by Greptile |
|
@nhojb I looked into the It's a known undici bug, nodejs/undici#5936. When undici closes an idle connection, Node can pass the error to a stream that undici already released. That stream has no error listener, so the error goes uncaught. The fix, nodejs/undici#5983, merged on Oct 22 but isn't in a release yet. The crash depends on timing, which would explain why you saw it locally and not in the store build. Brew only reaches this code through the |
|
Thanks - all good then. I thought it might be something about my local dev env. |
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@dibas-np). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag. |

Description
Fixes #30201 in the Brew extension. Also done: the "Finish action toasts in place again" item in the extension's
TODO.md.When an install finished, Brew could leave its progress toast on screen ("Installing Tinycast / Operation completed successfully") with a Cancel button that no longer did anything, instead of showing "Installed Tinycast". Brew finished an action toast by replacing it with a new
showToast. A progress update sent in the same tick could land on top of the replacement, because Raycast's toast updates act on whichever toast is visible.Brew now finishes the toast in place, as
TODO.mdplanned and as most Raycast extensions do.settleinsrc/utils/toast.tssets the toast's style and title and clears its message and both actions, so Cancel goes away with the progress text. With Close After Action on, nothing changes: the toast is hidden and a HUD is shown.Other changes:
src/utils/toast.test.ts: a finished success or failure toast is the same toast, with no message and no Cancel, and Close After Action still shows the HUD. The first two cases fail before this change.confirmAndRun.test.ts: the progress-label test now reads the title while the command runs. The toast it read afterwards now holds the final title.AGENTS.md: the toast note now describes the in-place finish and why replacing the toast was dropped.TODO.md: removed the finished item.CHANGELOG.md: new entry.Testing
npm test: 423 tests pass.npm run lintandnpm run buildpass.npm run build: installed theslformula from Search. The toast ended on "Installed sl" with no Cancel button.Not checked by hand: a cask from a third-party tap (the case that first showed the bug) and the Close After Action path, which the unit test covers. The unit tests check the toast's final state, not Raycast's on-screen timing.
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folder if they were not generated with our metadata toolWritten with Claude Opus 5.5 (claude-opus-5-5) in Claude Code.
🤖 Generated with Claude Code