From 0f217558bc2e4654a38de1e1ae1735fd13f4f48f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 18:50:19 +0000 Subject: [PATCH] Fix showToast not displaying error message Agent-Logs-Url: https://github.com/refined-github/refined-github/sessions/0b9ac115-d8a9-412e-abc8-1e3f56e1d3d0 Co-authored-by: fregante <1402241+fregante@users.noreply.github.com> --- source/github-helpers/toast.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/github-helpers/toast.tsx b/source/github-helpers/toast.tsx index f86a67a40fef..6f83f84adc2f 100644 --- a/source/github-helpers/toast.tsx +++ b/source/github-helpers/toast.tsx @@ -54,8 +54,6 @@ export default async function showToast( }; const finalUpdateToast = async (message: ToastMessage): Promise => { - updateToast(message); - // Without rAF the toast might be removed before the first page paint // rAF also allows showToast to resolve as soon as task is done await frame(); @@ -95,6 +93,8 @@ export default async function showToast( throw error; } finally { // Use the last message if `false` was passed - void finalUpdateToast(finalToastMessage || lastRawMessage); + const toastMessage = finalToastMessage || lastRawMessage; + updateToast(toastMessage); + void finalUpdateToast(toastMessage); } }