Skip to content

feat(ui): mark entities queued for deletion across every list - #52

Merged
SiteRelEnby merged 1 commit into
mainfrom
fix/pending-delete-indicators
Aug 1, 2026
Merged

feat(ui): mark entities queued for deletion across every list#52
SiteRelEnby merged 1 commit into
mainfrom
fix/pending-delete-indicators

Conversation

@SiteRelEnby

@SiteRelEnby SiteRelEnby commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Closes #50.

System Safety queues destructive actions behind a grace period rather than doing them immediately, so an entity can sit in a list looking perfectly alive while already scheduled for deletion. Home's banner said the system had pending actions; nothing said which rows.

What you see

A dimmed row plus a badge - "Deletes in 18h" - wherever a deletable thing is listed:

list detail
Members People > Members member profile
Groups People > Groups group detail
Front history History -
Journals Journals journal detail
Board messages board detail -
Polls Polls poll detail
Reminders Reminders -
Tags Settings > System > Tags -
Custom fields Settings > System > Custom Fields -
Notification channels Notifications > Channels you own -

Detail screens are marked too, so the state survives the tap that opens them - otherwise a dimmed row leads to a page that looks fine.

Why the models were the bulk of it

Only NotificationChannelRead carried pending_delete_at; the other ten had no idea the field existed, so the data was being dropped on the floor before the UI ever got a chance. JournalEntryRead also has a parallel JournalEntryReadWithCount that the detail screen reads, which needed it too, or an entry would look safe the moment you opened it.

Countdown rounding (a fix, not just a port)

The countdown now rounds down. The helper was lifted from Home's banner, which rounded up, and that's the wrong direction for this: it's a deadline for undoing something destructive. Telling someone they have "2 days" when 25 hours remain can cost them the window; erring short only makes them act sooner. Below an hour it reads "in under an hour" rather than flooring to "in 0h", which would look like it had already happened.

Home now shares that one implementation instead of keeping its own copy, so the banner and the badges can't drift apart - and the banner picks up the same fix.

Judgement calls

The badge isn't clickable, though web's is a link to the Safety page. These sit inside cards that are already clickable, and a tap target inside a tap target is a coin toss on a phone. Cancelling stays in Settings > Safety, which the Home banner deep-links to.

Relative countdown, not an absolute date. Web shows the finalize date on the badge and puts the countdown on the Safety page. Android already had a relative countdown in the Home banner, so this matches what's there.

Not covered

Watch tokens carry pending_delete_at server-side but have no list UI here to mark. The model field is added for consistency; nothing renders it.

Testing

:app:assemblePlayRelease, :app:assembleOpenRelease, :wear:assembleRelease, :app:testPlayReleaseUnitTest all green. 8 new unit tests cover the countdown boundaries (round-down at 25h and 71h, the sub-hour wording, elapsed deadlines, unparseable input).

Device checklist - needs a system with a grace period configured and something queued for deletion:

  • Queue a group delete: the row dims and shows the countdown; the group detail shows it too
  • Same for a member, journal entry, poll, reminder, tag, custom field, notification channel
  • Cancel it from Settings > Safety: badge and dimming clear on next refresh
  • A system with nothing pending looks exactly as before (no stray spacing where badges would be)
  • Countdown reads sensibly near the boundaries - just under an hour, just over a day

System Safety queues destructive actions behind a grace period rather than
doing them immediately, so an entity can sit in a list looking perfectly alive
while already scheduled for deletion. Home's banner said the system had pending
actions, but nothing said which rows they were.

Adds a shared badge, "Deletes in 18h", plus a dimmed row, wherever such a thing
is listed: members, groups, front history, journals, board messages, polls,
reminders, tags, custom fields and notification channels, and again on the
member, group, poll and journal detail screens so the marking survives the tap
that opens them.

Only NotificationChannelRead carried pending_delete_at; the other ten models
had no idea the field existed, so this adds it to each. JournalEntryRead has a
parallel JournalEntryReadWithCount that the detail screen reads, which needed
it too, or an entry would look safe the moment you opened it.

The badge is deliberately not clickable. These sit inside cards that are
themselves clickable, and a tap target inside a tap target is a coin toss;
cancelling stays in Settings > Safety, which the Home banner deep-links to.

The countdown now rounds down rather than up, which also fixes the Home banner
it was lifted from: this is a deadline for undoing something destructive, and
telling someone they have 2 days when 25 hours remain can cost them the window,
while erring short only makes them act sooner. Below an hour it says "in under
an hour" rather than flooring to a "in 0h" that reads as already gone. Home now
shares that one implementation instead of keeping its own copy.

Not covered: watch tokens carry the field on the server but have no list UI
here to mark.
@SiteRelEnby
SiteRelEnby enabled auto-merge August 1, 2026 01:16
@SiteRelEnby
SiteRelEnby merged commit e0528f7 into main Aug 1, 2026
1 check passed
@SiteRelEnby
SiteRelEnby deleted the fix/pending-delete-indicators branch August 1, 2026 01:20
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.

pending deletes should be specifically distinguished like in webui

1 participant