Skip to content

fix(mail): derive starred-view row state from the flagged message - #402

Open
krantheman wants to merge 1 commit into
frappe:developfrom
krantheman:fix/mail-starred-row-state
Open

fix(mail): derive starred-view row state from the flagged message#402
krantheman wants to merge 1 commit into
frappe:developfrom
krantheman:fix/mail-starred-row-state

Conversation

@krantheman

Copy link
Copy Markdown
Member

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), so current becomes 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.

starred row shows hollow star

🤖 Generated with Claude Code

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>
@krantheman
krantheman requested a review from s-aga-r as a code owner July 30, 2026 06:50
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