Skip to content

feat: unread-only inbox toggle - #16

Open
benni-rogge wants to merge 1 commit into
ivanjm3:mainfrom
benni-rogge:feat/unread-toggle
Open

feat: unread-only inbox toggle#16
benni-rogge wants to merge 1 commit into
ivanjm3:mainfrom
benni-rogge:feat/unread-toggle

Conversation

@benni-rogge

@benni-rogge benni-rogge commented Aug 13, 2026

Copy link
Copy Markdown

Summary

Add a u key toggle in the inbox view to switch between all messages and unread-only.

  • When active, the inbox query appends is:unread; the list title shows an unread-only suffix.
  • Marking an email read (m) while in unread-only mode removes it from the filtered list and decrements the count.
  • The removal and title recompute are gated on an active inbox listing (listIsInbox), so search and label results are never affected.
  • Pagination state resets on toggle.
  • Refresh (R) remains a separate key that refetches without toggling the filter.

Testing

  • go test -race -count=1 ./... passes (api + ui).
  • go build, go vet, gofmt clean.
  • Regression tests: toggle flip/query/title, read-removal in unread-only, read keeps in all-mode, search results unaffected by unread-only, refresh does not toggle unread-only.

Add a `u` key toggle in the inbox view to switch between all messages
and unread-only. When active, the inbox query appends is:unread, the
list title shows an unread-only suffix, and marking an email read
removes it from the filtered list. The removal and title recompute are
gated on an active inbox listing (listIsInbox) so search and label
results are unaffected. Pagination state resets on toggle. Refresh (R)
remains a separate key that refetches without toggling the filter.
@benni-rogge
benni-rogge force-pushed the feat/unread-toggle branch 3 times, most recently from 30f1af2 to 577ba37 Compare August 13, 2026 18:25
@benni-rogge benni-rogge changed the title feat: unread-only inbox toggle, container build, inbox query fix feat: unread-only inbox toggle and inbox query default fix Aug 13, 2026
@benni-rogge benni-rogge changed the title feat: unread-only inbox toggle and inbox query default fix feat: unread-only inbox toggle Aug 13, 2026
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