Skip to content

feat(ui): let users hide the priority inbox - #14334

Open
dillardblom wants to merge 2 commits into
nextcloud:mainfrom
dillardblom:feat/hide-priority-inbox
Open

dillardblom wants to merge 2 commits into
nextcloud:mainfrom
dillardblom:feat/hide-priority-inbox

Conversation

@dillardblom

@dillardblom dillardblom commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Context

Closes #7630

Some users want their mail in date order and have no use for the priority inbox, which is always listed first and is where Mail opens. Turning off importance classification for an account does not remove it. This adds a Show priority inbox switch to Mail settings › Appearance, on by default.

When the switch is off:

  • the priority inbox is left out of the combined mailboxes in the navigation;
  • Mail opens All inboxes instead, also when the saved start folder was the priority inbox;
  • turning it off while the priority inbox is open moves to All inboxes.

Approach

The preference is stored like the other user preferences (priority-inbox, default true). getMailboxes() leaves the priority inbox out of the unified account when it is off, so the navigation and the start folder logic follow without changes of their own. As a side effect, Mail no longer prefetches the priority inbox while it is hidden.

Considered and discarded: turning off importance classification together with the switch. Classification is a per-account setting and also drives the important tag, so hiding a mailbox should not change it.

Intentionally left out: the mailbox itself still exists, so a direct link to it keeps working.

Screenshots

Setting Navigation with the switch off
settings navigation

Testing

  • Unit tests: the priority inbox is listed by default and left out when turned off; the page controller provides the preference.
  • Manually in a browser on a local Nextcloud 35 with two IMAP accounts: the switch hides the entry, moves from the priority inbox to All inboxes, Mail opens All inboxes after a reload, and turning it back on restores the entry.
  • Not tested with JMAP.

AI assistance

Assisted by ClaudeCode:claude-opus-5-5 (implementation, tests and description). Reviewed locally with Codex CLI and CodeRabbit CLI before opening.

Some users want their mail in date order and see no use in the
priority inbox, which is always listed first and is where the app
opens. Add a "Show priority inbox" switch to the appearance settings.
When it is off, the priority inbox is left out of the unified
mailboxes, so the navigation no longer shows it and the app opens the
unified inbox instead; a start folder that still points to it is
ignored.

Importance classification keeps running: it is a per-account setting
and also drives the important tag. Hiding the mailbox does not change
it.

Closes nextcloud#7630

Signed-off-by: Dillard Blom <dillard.blom@ensembia.com>

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch

  • PR template is incomplete
  • AI disclosure is missing

@ChristophWurst
ChristophWurst marked this pull request as draft November 26, 2026 15:54
feat(ui): let users hide the priority inbox

Some users want their mail in date order and see no use in the
priority inbox, which is always listed first and is where the app
opens. Add a "Show priority inbox" switch to the appearance settings.
When it is off, the priority inbox is left out of the unified
mailboxes, so the navigation no longer shows it and the app opens the
unified inbox instead; a start folder that still points to it is
ignored.

Importance classification keeps running: it is a per-account setting
and also drives the important tag. Hiding the mailbox does not change
it.

Closes nextcloud#7630

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Dillard Blom <dillard.blom@ensembia.com>
@dillardblom
dillardblom marked this pull request as ready for review November 26, 2026 22:49
@dillardblom

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I filled in the pull request template and added the AI disclosure, to the description and as an Assisted-by trailer (an amend! commit, so the history stays readable during review). Ready for another look.

Assisted by ClaudeCode:claude-opus-5-5

This branch has not been deployed

No deployments
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.

Option for Disabling Important Section

2 participants