Spam review

Repository
rubas/inbox
Pull request
#346 Spam review: AI label, AI-filed filter, and Not spam with a correction log
Base
c3819fe main
Head
1ccfcac feat/spam-review
Captured
24 September 2026, 10:43 CEST, Chromium, seed data from task dev:seed
Status
Open. The CLI CI job fails on 1ccfcac; Test, CLI integration, and both reviews pass.

Changes

The owner can now see which mail TypeSafe put in Spam, filter to it, and move a wrong one back with Not spam.

Main has no TypeSafe stub in dev, so the two seeded scams land in the Imbox (badge 8) and Spam holds only the rules-filed parcel notice. On the PR the stub files them as AI spam (badge 6).

Desktop, 1440 px

Spam list

Before. One rules-filed row, no chips. main c3819fe.
After. Chips above the list. Crypto Desk shows AI 0.86, Prize Desk AI 0.97, CH Post has no label.

Hovered row

Before. The row action is Imbox.
After. The row action is Not spam. On the hover fill the AI label loses its visible chip background.

AI-filed filter, reader, and undo

AI-filed selected. Only the two AI rows remain.
Reader. Not spam sits next to the star.
After Not spam on Crypto Desk: the row leaves Spam and the toast offers Undo on Z. Captured at 1x.

Mobile, 390 px

Spam list

Before.
After. Chips and labels fit at 390 px.

Hovered row

Before. Icon-only Imbox action.
After. Not spam is icon-only below 520 px with the 44 px hit area. The actions clip the AI label to A.

AI-filed filter and reader

AI-filed selected.
Reader with Not spam.

Facts

TopicWhat the PR does
RecordIngest writes x-imbox-classification, for example {"folder":"spam","source":"ai","score":0.86}. It uses the existing synthetic-header mechanism, so there is no schema change. Ingest strips inbound copies, so a sender cannot forge one. Spam stored before this change has no record and gets no AI label.
Not spamRow pill, reader button, palette, and s in Spam. It moves the conversation to the Imbox with the shared undo on Z.
Correction logMailboxDO.moveEmail logs spam_correction with messageId, source, score, and corrected. An undo logs corrected: false. No subject, body, or address; no call to the vendor.
Filter scopeAI-filed filters the loaded Spam list: the newest 50 conversations, the same set the Spam view shows.

Click the image for actual size. Escape closes.