Clear stale provider update toast CTA - #2755
Conversation
- Factor toast update construction into shared logic - Remove prompt actions from loading and success update states - Keep rejected update states actionable via Settings
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing as the older conflicting duplicate of #3563, which is the maintained version of the provider-update toast behavior. |
Summary
Root Cause
Base UI shallow-merges toast updates. The initial provider update prompt sets the primary CTA to
Update, and the running toast update previously omittedactionProps, so the old CTA remained visible on theUpdating providerstoast.Validation
bun run testbun fmtbun lintbun typecheckNote
Clear stale action buttons from provider update toast on progress and success
buildProviderUpdateToastUpdateinProviderUpdateLaunchNotification.logic.tsto centralize toast update construction for provider update views.actionProps: undefinedexplicitly to clear any action buttons (e.g. 'Update') left over from a previously shown prompt toast, working around shallow merge behavior in the toast manager.updateProviderUpdateToastinProviderUpdateLaunchNotification.tsxto call the new helper instead of duplicating inline logic.Macroscope summarized 6de68fc.
Note
Low Risk
Low risk UI logic change that only affects how provider-update toasts are updated, plus targeted regression tests for the toast manager’s shallow-merge behavior.
Overview
Fixes provider update toasts so progress/success states no longer inherit stale CTA buttons from the initial prompt due to Base UI’s shallow-merge updates.
This introduces
buildProviderUpdateToastUpdateto centralize toast update payloads, explicitly clearingactionPropsforloading/successviews while keeping failed/unchanged views actionable via aSettingsbutton, and refactorsProviderUpdateLaunchNotification.tsxto use the helper. Adds regression tests that simulate merging a prompt toast with subsequent updates to ensure actions/secondary actions are cleared or preserved appropriately.Reviewed by Cursor Bugbot for commit 6de68fc. Bugbot is set up for automated code reviews on this repo. Configure here.