Skip to content

Conversation

@andrinoff
Copy link
Member

This pull request enhances the email inbox UI by improving how the email count is displayed in the list title and by making the logic for fetching more emails more robust and testable. It also adds new tests to verify these behaviors.

Inbox Title Improvements:

  • The inbox and sent mailbox titles now display the current count of emails, making it easier for users to see how many emails are loaded at a glance. This is handled by a new getBaseTitleWithCount method and updates to where the title is generated and set. [1] [2] [3]

Fetching More Emails Logic:

  • The logic for triggering the fetch of more emails when the user scrolls to the end of the list has been refactored into dedicated methods: shouldFetchMore and fetchMoreCmds. This makes the code cleaner and ensures that fetching is triggered correctly for both single-account and all-accounts views.
  • The inbox now shows "(loading more...)" in the title when more emails are being fetched, providing better feedback to users. [1] [2]

Testing Enhancements:

  • Added new tests to verify that the inbox and sent mailbox titles correctly show the email count, and that fetching more emails is triggered when scrolling to the end of the list. A helper function collectMsgs was added to aid in testing command outputs. [1] [2]
  • Minor import addition for strings to support the new tests.

@andrinoff andrinoff requested review from Copilot and removed request for Copilot January 2, 2026 19:17
@andrinoff andrinoff merged commit 5e1bdcb into floatpane:master Jan 2, 2026
5 checks passed
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