Rework close/delete/discard logic and UI, and move out of actions.
Review Request #14654 — Created Oct. 27, 2025 and updated — Latest diff uploaded
Formerly, actions were handling the UI logic for closing and deleting
review requests, and unified banner was handling all discard logic.
There was some overlap in that both were implementing review request
discard logic. And then some of that logic ended up running two
instances of the samenavigateTo().Some of those actions provided confirmation of operations using the old
modalBox, which is a couple generations out of date.This change reworks all of this to better centralize logic and update
the UI.
ReviewRequestEditorViewnow has new methods that handle some of this
common logic:
closeCompleted()closeDiscarded()deleteReviewRequest().discardDraft()
The actions can call this directly, and no longer need to reimplement
any of the logic. This simplifies them considerably.
UnifiedBannerView also calls out to two of these: closeDiscarded()
and discardDraft(). It no longer has its own confirmation dialog logic
for these.
All operations requiring confirmation now use Ink's new
showConfirmDialog(), and use reworked confirm button labels that
better convey the action being invoked. These new versions keep the
dialog open while the operation is being performed, managing the busy
state on the confirm button.
The post-operation page refreshes/navigation no longer live in any of
these functions. We had code already that handled this as a result of
various signals, and were just missing one for deleting review requests,
which have been added. We also no longer need the closeError signal,
handling error handling instead in the central functions.
There's also a fix for error reporting for closing review requests. When
closing was converted to actions, the triggering of closeError was
performed on the wrong object, meaning we weren't handling it correctly.
This is no longer a problem with the new implementation.
Unit tests pass.
Tested each of the actions and buttons on the Close menu and Unified
Banner, both canceling and performing the action. Checked the message
handling as well.