feat(mail): capture and surface IMAP \Seen read state (unread)#946
Open
seonghobae wants to merge 1 commit into
Open
feat(mail): capture and surface IMAP \Seen read state (unread)#946seonghobae wants to merge 1 commit into
seonghobae wants to merge 1 commit into
Conversation
The mail experience had no read/unread signal: ingestion fetched only "(RFC822)" and discarded IMAP flags, the Email model had no read field, and the API/UI could not show unread mail — so mockup_19's unread indicator was unbacked. This is the first backed slice toward the mail folder/label/LNB the design specifies. - Email.is_read column (default read; migration 0011 server_default true so existing/file-imported mail is not surfaced as unread). - imap_worker fetches "(RFC822 FLAGS)" and threads the \Seen flag through to process_fetched_email via flags_indicate_seen() — a pure, unit-tested parser that defaults to unread on a parse miss (never silently marks mail read). - /api/emails EmailListItem exposes is_read (coalescing unflushed None -> read). - EmailList renders an '안 읽음' badge from is_read === false. Verified: backend 53 passed (emails + imap + threading + pop3), new flags_indicate_seen unit test, frontend EmailList 5 passed, tsc + eslint clean, migration parses and chains from 0009. Follow-ups (same defect, design-backed): multi-folder ingestion (select beyond INBOX) + folder column, labels, then the left folder-LNB per mockup_19. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RkKdtHRLG4wSLh6PVsp8J
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.
Why
The mail experience had no read/unread signal: ingestion fetched only
(RFC822)and discarded IMAP flags,Emailhad no read field, and the API/UI couldn't show unread mail — somockup_19's unread indicator was unbacked. Per the reframe that this missing capability is itself a defect (not a reason to defer the mail LNB), this is the first backed slice toward the design's mail folder/label/LNB.What
Email.is_readcolumn (defaults read; migration0011server_default trueso existing/file-imported mail isn't surfaced as unread).imap_workernow fetches(RFC822 FLAGS)and threads the\Seenflag throughprocess_fetched_emailviaflags_indicate_seen()— a pure, unit-tested parser that defaults to unread on a parse miss (never silently marks mail read)./api/emailsEmailListItemexposesis_read(coalescing unflushedNone→ read).EmailListrenders an '안 읽음' badge fromis_read === false.Verification (local)
flags_indicate_seenunit test.EmailList.test.tsx5 passed;tsc+eslintclean.0009.Follow-ups (same defect, design-backed)
Multi-folder ingestion (
selectbeyond INBOX) +foldercolumn → labels → the left folder-LNB permockup_19.🤖 Generated with Claude Code