Skip to content

Trash: Show progress while posts move to the trash - #1023

Merged
mmtr merged 2 commits into
trunkfrom
claude/trash-progress-indicator-3bcbed
Oct 19, 2026
Merged

mmtr merged 2 commits into
trunkfrom
claude/trash-progress-indicator-3bcbed

Conversation

@mmtr

@mmtr mmtr commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Proposed Changes

Moving a post to the trash now shows that it's in progress until the list updates:

  • In the classic Posts and Pages lists (and any other list table), Trash, Restore and Delete Permanently dim the rows they act on, whether used as a row action or a bulk action. The list ignores clicks until the next page arrives. Row actions also light the activity dot next to the window title, as bulk actions already did.
  • In the native Posts and Pages windows (Beta), the bulk action button shows a spinner and is disabled while it runs, and the selected stories in the desk view dim. The table view already shows its loading rows.

A second click during the wait no longer sends the action again. In the classic list, clicking Apply twice on a bulk trash could end on WordPress's "Error in moving the item to Trash." page. In the native window, a second click asked to confirm again.

The recordings below add a 3 second delay per trashed post on a local site, to stand in for a slow host. Each one shows trunk first, then this branch.

Classic Posts list

trash-progress-classic.webm

Native Posts window (Beta)

trash-progress-native.webm

Not included: right after a trash, the list refreshes itself again and drops the "moved to the Trash. Undo" notice. That happens on trunk too and is left for a separate PR.

Why are these changes being made?

Users told us that moving something to the trash takes a few seconds and at first looks like nothing is happening.

Testing Instructions

Trashing is fast on a local site, so slow it down first. Add wp-content/mu-plugins/slow-trash.php:

<?php
add_action( 'wp_trash_post', static function () { sleep( 3 ); } );
add_action( 'untrash_post', static function () { sleep( 3 ); } );
add_action( 'before_delete_post', static function () { sleep( 3 ); } );

Classic list (the default):

  1. Open Posts from the dock.
  2. Hover a row and click Trash. Make sure the row dims right away and the dot next to the window title starts pulsing.
  3. Click Trash on the same row again before the list reloads. Make sure nothing happens, and that after about 3 seconds the post is gone, the "1 post moved to the Trash" notice shows, and there is no error page.
  4. Tick two rows, pick Move to Trash in Bulk actions and click Apply twice. Make sure both rows dim, the second click does nothing, and both posts end up in the trash.
  5. Open the Trash view. Try Restore and Delete Permanently on a row, and the same two as bulk actions. Make sure the rows dim the same way.
  6. Click Edit on a row. Make sure the editor opens as before and the list doesn't dim.
  7. Repeat step 2 in the Pages window.

Native window (Beta):

  1. Go to OpenStation Preferences > Features and turn on Use the native Posts window.
  2. Open Posts from the dock. In the Writing desk view, tick two stories and click Move to trash, then Cancel. Make sure nothing dims and the button doesn't show a spinner.
  3. Click Move to trash again and confirm. Make sure the button shows a spinner, the two stories dim, and clicking the button again does nothing.
  4. Make sure that after about 6 seconds both stories are gone and the button is back to normal.
  5. Switch the view to Details table and trash a row the same way. Make sure the table shows its loading rows and the button shows a spinner while it runs.
  6. Repeat step 3 in the Pages window with Use the native Pages window turned on.

🤖 Generated with Claude Code

Open WordPress Playground Preview

In a classic list window, Trash, Restore and Delete Permanently only
update the list once the server is done, which can take a few seconds
with nothing on screen. The rows they act on now dim, the list ignores
clicks until the next page arrives, and row actions light the window's
activity indicator like bulk actions already did. A second click no
longer sends the action again, which could end on an error page.

In the native Posts and Pages windows, the bulk action button shows as
busy, the selected stories dim, and a second click does nothing while
the action runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmtr mmtr self-assigned this Oct 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmtr
mmtr merged commit 8ad245d into trunk Oct 19, 2026
12 of 13 checks passed
@mmtr
mmtr deleted the claude/trash-progress-indicator-3bcbed branch October 19, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant