Skip to content

feat(ui): build the Quarantine folder + count badge#263

Merged
iduartgomez merged 1 commit into
mainfrom
feat/quarantine-folder
May 23, 2026
Merged

feat(ui): build the Quarantine folder + count badge#263
iduartgomez merged 1 commit into
mainfrom
feat/quarantine-folder

Conversation

@iduartgomez
Copy link
Copy Markdown
Contributor

What

The quarantine_unknown toggle previously only hid messages from senders not in the verified address book — no folder, no surface. The Settings copy promised a "Quarantine folder ... count badge" that never existed.

This wires up the real folder.

Changes

  • Folder::Quarantine (⚠) appears in the sidebar only when the toggle is on, with the existing per-folder count badge (unread count).
  • is_sender_verified() — shared predicate that partitions the inbox candidate set: verified senders stay in Inbox, everyone else (including unsigned / empty-vk rows) is diverted to Quarantine. Toggle off → every row is an Inbox row, folder hidden.
  • Quarantine rows reuse the Inbox OpenMessage detail path and carry an unverified badge so the diversion reason is visible.
  • Settings help text now matches reality; the hide_unsigned row no longer falsely claims it moves messages to a quarantine folder (it drops them).
  • folder_count excludes quarantined rows from the Inbox unread count when the toggle is on.

Verifying a quarantined sender in the address book moves their messages back to the Inbox automatically (live re-eval of is_sender_verified).

Tests

  • quarantine_tests unit module pins the empty-vk and unknown-vk cases.
  • Playwright test: toggle-off (hidden) → toggle-on (folder + badge "2" + Inbox empties + 3 quarantine cards with the unverified badge).
  • Full offline suite: 114 passed / 0 failed (16 skipped — firefox/webkit not installed locally).
  • cargo clippy clean; testid drift-guard + mail-local-state tests pass.

QA inventory

Updated the two stale rows describing the old hide-only behavior.

The `quarantine_unknown` toggle previously only *hid* messages from
senders not in the verified address book — no folder, no surface, and
the Settings copy promised a "Quarantine folder ... count badge" that
never existed.

This wires up the real folder:

- `Folder::Quarantine` (⚠) appears in the sidebar only when the toggle
  is on, with the existing per-folder count badge showing unread count.
- `is_sender_verified()` is the shared predicate that partitions the
  inbox candidate set: verified senders stay in Inbox, everyone else
  (including unsigned/empty-vk rows) is diverted to Quarantine. With the
  toggle off, every row is an Inbox row and the folder is hidden.
- Quarantine rows reuse the Inbox `OpenMessage` detail path and carry an
  `unverified` badge so the reason for diversion is visible.
- Settings help text now matches reality; the `hide_unsigned` row no
  longer falsely claims it moves messages to a quarantine folder (it
  drops them).

Verifying a quarantined sender in the address book moves their messages
back to the Inbox automatically (live re-eval of `is_sender_verified`).

Tests: `quarantine_tests` unit module pins the empty-vk and unknown-vk
cases; a Playwright test covers toggle-off (hidden) → toggle-on (folder
+ badge "2" + Inbox empties + 3 quarantine cards with the unverified
badge). Full suite: 114 passed / 0 failed.
@iduartgomez iduartgomez force-pushed the feat/quarantine-folder branch from 1661d5b to 65ed432 Compare May 23, 2026 18:46
@iduartgomez iduartgomez merged commit 5e88a61 into main May 23, 2026
5 checks passed
@iduartgomez iduartgomez deleted the feat/quarantine-folder branch May 23, 2026 19:26
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