feat(ui): build the Quarantine folder + count badge#263
Merged
Conversation
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.
1661d5b to
65ed432
Compare
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.
What
The
quarantine_unknowntoggle 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.OpenMessagedetail path and carry anunverifiedbadge so the diversion reason is visible.hide_unsignedrow no longer falsely claims it moves messages to a quarantine folder (it drops them).folder_countexcludes 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_testsunit module pins the empty-vk and unknown-vk cases.unverifiedbadge).cargo clippyclean; testid drift-guard +mail-local-statetests pass.QA inventory
Updated the two stale rows describing the old hide-only behavior.