Skip to content

fix: only pin favorites when it s not part of the query#13216

Open
hamza221 wants to merge 1 commit into
mainfrom
fix/sort-favorites/query
Open

fix: only pin favorites when it s not part of the query#13216
hamza221 wants to merge 1 commit into
mainfrom
fix/sort-favorites/query

Conversation

@hamza221

@hamza221 hamza221 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

fix #12953

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Summary by CodeRabbit

  • Bug Fixes
    • Favorites are now sorted consistently based on the saved preference, including when viewing starred items.

Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
@hamza221

hamza221 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

As a followup we might consider disabling it while search for starred messages aswell

@hamza221

hamza221 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable5.10

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2aa93aa9-9aaf-4f71-bcfb-ed57a5e0b379

📥 Commits

Reviewing files that changed from the base of the PR and between 3758910 and 726601c.

📒 Files selected for processing (1)
  • src/components/MailboxThread.vue

📝 Walkthrough

Walkthrough

The sortFavorites computed property in MailboxThread.vue was modified to remove a condition that previously prevented favorites sorting when the route filter equals 'starred'. Sorting now depends solely on the sort-favorites preference value.

Changes

Favorites sorting fix

Layer / File(s) Summary
Update sortFavorites condition
src/components/MailboxThread.vue
Removed the this.$route.params.filter !== 'starred' check from sortFavorites, so it now depends only on the sort-favorites preference.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Related Issues: #12953

Related PRs: None identified

Suggested labels: bug, javascript

Suggested reviewers: None identified


🐇 A tiny hop, a single line,
No more "starred" to redefine,
Favorites sort by preference true,
No double listing, fresh and new,
The rabbit nods — the fix is fine.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The change removes the starred-route guard, which appears to keep favorites pinned even when the favorites query is already shown, so it does not satisfy #12953. Restore the condition that skips pinning when the current query already targets favorites, so pinned items do not duplicate the favorites list.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main behavior change around pinning favorites only when they are not already in the query.
Out of Scope Changes check ✅ Passed The PR only changes the favorites pinning logic in the related component and adds no unrelated code paths.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sort-favorites/query

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hamza221

hamza221 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When favorites are pinned above other emails, the are also shown in the favorites section (so they appear twice)

1 participant