Skip to content

Support unsubscribed mailboxes - #810

Open
senier wants to merge 3 commits into
bulwarkmail:mainfrom
senier:feature/hide-unsubscribed-mailboxes
Open

Support unsubscribed mailboxes#810
senier wants to merge 3 commits into
bulwarkmail:mainfrom
senier:feature/hide-unsubscribed-mailboxes

Conversation

@senier

@senier senier commented Aug 13, 2026

Copy link
Copy Markdown

Summary

Hide unsubscribed mailboxes in folder list and move target to improve usability for accounts with many unsubscribed mailboxes. Add mechanism to subscribe and unsubscribe from mailboxes in folder settings.

Changes

  • Hide unsubscribed mailboxes from folder sidebar by default
  • Filter unsubscribed mailboxes from "Move to" destinations
  • Add icon to folder settings to subscribe and unsubscribe from folders
  • Implement/fix handling of folder hierarchies and isSubscribed handling in mock JMAP server

Related issues

n/a

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactor / code quality improvement
  • Chore / dependency update / CI change

Checklist

  • I have read the Contributing Guide
  • My code follows the project's code style and conventions
  • I have run npm run typecheck && npm run lint and there are no errors
  • The build passes (npm run build)
  • I have tested my changes locally
  • (n/a) I have added or updated documentation if needed
  • (partially, only for English and German) I have updated translations (locales/) if my changes affect user-facing text
  • I have included screenshots or a screen recording for UI changes

Screenshots / demo

Screenshot From 2026-08-13 21-50-07 Screenshot From 2026-08-13 21-54-19 Screenshot From 2026-08-13 21-49-45

Notes for reviewers

This is my first shot and the minimal viable solution I could think of to tackle my folder subscription problem. I like Bulwark very much - keep up the great work! However, my 20+ years old account has so many unsubscribed folder which I don't want to delete. Having all those folders displayed made Bulwark practically unusable for me as I could find anything and would have to scroll through huge lists when moving emails.

Please let me know what you think - I'm open for feedback. Especially using strikethrough text for unsubscribed mailboxes in the folders settings view is not perfect. I played with graying out unsubscribed folders, but this was hardly readable.

There are some corner cases that one might want to improve upon later: e.g. if you unsubscribe from a folder which still has subscribed children. Right now, everything starting from the unsubscribed parent folder will be filtered out in the folder sidebar (and move target list). One could consider displaying those parent folders in a disable state, just to anchor the subscribed child nodes. This would complicate things quite a bit - unsure whether that would be worth the added complexity.

At this point only English and German translations are present.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds end-to-end support for mailbox subscription state so unsubscribed folders are hidden from the sidebar and move-target lists by default, while still being manageable from folder settings.

Changes:

  • Filter unsubscribed mailboxes out of the sidebar tree and “Move to” destination tree.
  • Add a folder-settings toggle (subscribe/unsubscribe) and corresponding i18n strings.
  • Extend JMAP client/update types and the dev mock JMAP server to support isSubscribed and parent hierarchies.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
stores/email-store.ts Adds store action to update isSubscribed and refresh mailbox lists.
locales/en/common.json Adds English strings for subscribe/unsubscribe UI.
locales/de/common.json Adds German strings for subscribe/unsubscribe UI.
lib/utils.ts Adds helper to detect subscribed descendants for tree rendering.
lib/jmap/client.ts Extends updateMailbox to allow updating isSubscribed.
lib/jmap/client-interface.ts Updates IJMAPClient.updateMailbox type to include isSubscribed.
lib/demo/demo-client.ts Keeps demo client in sync with updated updateMailbox signature.
components/settings/folder-settings.tsx Adds subscribe/unsubscribe control and visual styling for unsubscribed folders.
components/layout/sidebar.tsx Hides unsubscribed folders from sidebar tree rendering.
components/email/email-context-menu.tsx Filters unsubscribed folders out of “Move to” destinations.
app/api/dev-jmap/[...path]/route.ts Updates mock mailbox model and Mailbox/set handling for isSubscribed and hierarchy.
Suppressed comments (1)

components/settings/folder-settings.tsx:542

  • This uses <EyeIcon />, which is not a valid Lucide export in this project. Use the existing <Eye /> import for the subscribed state icon.
                  {mb.isSubscribed ? <EyeIcon className="w-3.5 h-3.5" /> : <EyeOff className="w-3.5 h-3.5" />}

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread components/settings/folder-settings.tsx Outdated
Comment thread stores/email-store.ts
Comment thread components/settings/folder-settings.tsx
Comment thread app/api/dev-jmap/[...path]/route.ts Outdated
Comment thread components/layout/sidebar.tsx
@senier
senier force-pushed the feature/hide-unsubscribed-mailboxes branch from db333fd to 9dffea9 Compare August 22, 2026 09:49
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.

2 participants