fix(mail): derive starred-view row state from the flagged message - #402
Open
krantheman wants to merge 1 commit into
Open
fix(mail): derive starred-view row state from the flagged message#402krantheman wants to merge 1 commit into
krantheman wants to merge 1 commit into
Conversation
The starred pseudo-mailbox matches no real mailbox id, so the row's flag/seen state fell back to the conversation's newest message instead of the starred one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
In the Starred view, a starred thread's row rendered a hollow star. "starred" is a pseudo-mailbox no message carries the id of, so the representative-message pick in
get_threads()never matched and fell back to the whole conversation — the row's identity/state fields (flagged,seen,mailboxes, ...) then came from the conversation's newest message, which may not be the starred one, and star/unstar actions targeted that wrong message. (Reported by Vibhav in #mail, 2026-07-29.)When
mailbox == "starred", the representative is now picked from the thread's flagged messages (falling back to the whole conversation if none), socurrentbecomes the latest flagged message. Preview/date/sender still follow the conversation's most recent activity, unchanged.get_all_inbox_threads(always a real inbox id) and the search path (per-mail results, no representative pick) don't share this pattern and are untouched.🤖 Generated with Claude Code