Repository navigation
refactor(frontend): share one dialog for confirm-then-act flows - #939
Merged
Merged
Conversation
ConfirmDialog runs an async action with a pending state, cannot be dismissed while it runs, and stays open with an error when it fails. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A failed removal now keeps the dialog open with an error, instead of closing it and reporting the failure above the list. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The dialog now stays open while the disconnect runs, and a failure keeps it open with an error instead of reporting it above the card. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
abdulrafey1
force-pushed
the
rafe/confirm-dialog
branch
from
October 21, 2026 11:58
78e502d to
00735b0
Compare
zaira-bibi
requested changes
Oct 22, 2026
The title is translated and can hold user content, such as a pxc activity's name, so the same failure logged differently per locale. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Returning early counted as success to the confirm dialog, so a missing token showed a spinner, did nothing and reported no error. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # frontend/tests/app/dashboard/admin/whitelist/WhitelistPage.test.tsx
hamza-56
reviewed
Oct 22, 2026
A failed whitelist removal, Slack disconnect or pxc delete showed only a fixed string, so an admin hitting a permission error or a stale entry got no hint why. The dialog now shows the message of an ApiRequestError, which the backend sends in the UI's language, and keeps the fixed string for any other error. disconnectSlack now rejects with the ApiRequestError itself so its dialog can tell it apart. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A request that never reached the server showed "Unable to connect to server" in English whatever the UI language, now that confirm dialogs show API error messages. The message comes from the active catalog, which LocaleProvider records next to the active locale, so code outside React can translate. i18n-check cannot see keys used outside React's hooks, so the key is declared with an i18n-check marker comment. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Stacked on the PXC delete frontend PR (
rafe/pxc-delete-frontend), which adds the dialog this extracts from.What
Three screens each built their own confirm-then-act dialog: deleting a PXC activity, removing a whitelist entry, and disconnecting Slack. They now share one
ConfirmDialog, so the pending state, dismiss rules and failure display behave the same everywhere.Changes
components/ui/ConfirmDialog.tsx:onConfirmwith a spinner on the confirm button.errorMessage.deletingreducer state is gone.How to Test
make test.frontend.Notes
This description was written with the assistance of an LLM (Claude).
🤖 Generated with Claude Code