Repository navigation
Bug fixes and additional settings for show/hide Attachments button - #14
alfonsolzrg wants to merge 5 commits into
Conversation
Some users don't use the cross-account attachments gallery and would rather the sidebar not carry the extra row. Adds a "Attachments row" switch under Settings → Mail, persisted in privacy.toml and applied live without restarting.
Sending failed for accounts where the display name equals the email (e.g. GOA imports with no separate name set) with an opaque "Invalid input": the From header was built by formatting "name <email>" and parsing it as one string, but an unquoted RFC 5322 display name can't contain '@' or '.'. Mailbox::new now builds it from its parts instead, which lettre quotes correctly for any name, and the redundant name is dropped when it matches the email. Along the way, address-parsing and SMTP-transport errors in worker.rs now say which field/host failed rather than just the bare underlying error, and goa::oauth_token no longer silently discards the D-Bus error on a failed GetAccessToken call.
…t right before the timestamp on the first line (src/ui/message_list.rs), and dropped the now-unneeded margin-top on .unread-dot in styles.css so it centers correctly on that single line. The sender name label already had hexpand + ellipsize: End, which should let it truncate before hitting the timestamp — let me know if you spot a case where a long name/address still overlaps and I'll dig further. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ior: src/worker.rs — the per-account mail worker started racing to open a network IMAP connection (for background folder backfill) before it ever checked for incoming requests. Since a plain .await isn't preemptible, the initial "load this folder" request — which should've been served instantly from the SQLite cache — sat blocked behind that slow network handshake (measured ~11s in your case). Fixed by wrapping the connect in tokio::select! against the request channel, so an incoming request now jumps ahead of the backfill's connection attempt. src/ui/message_list.rs — once results did arrive, rebuild() cloned the entire matched message set (all 108,669 in your Inbox) before capping it to the ~200 actually rendered. Now it filters/sorts by reference and only clones the page that's displayed, cutting that step from full-list-sized work down to just the visible page. Net effect: cached mail now renders within ~200ms of startup instead of after an 11+ second wait, confirmed in the running app. The debug tracing I added along the way has been removed, and the build is clean.
… dot Adopts most of #14 (thanks @alfonsolzrg), with the address fix carried through to the recipient fields the pull request left alone. - Build every mailbox from its parts instead of formatting "Name <addr>" and parsing that back. A display name is only a bare atom in the simplest cases, so a name with an accent, a comma or a full stop — or one that is itself the address, which is what an import with no separate display name produces — failed to parse and the send was rejected with "Invalid param". From: was the reported case; To:, Cc: and Bcc: went through the same path and are now built the same way, via the existing `parse_recipients`. - Let an incoming request preempt the background backfill's connect. The first thing the UI asks for at startup is the visible folder, which the cache can answer with no network at all, but the worker was awaiting an IMAP handshake before it would look at the queue — so a synced account opened to an empty message list until the connection came up. - Filter and sort the message list by reference and clone only the page actually rendered. 8000 Every rebuild — each keystroke in search, the cache-backed load at startup — previously cloned the entire folder index to then throw all but `render_limit` of it away. - Keep the unread dot's slot in the row and fade it instead of hiding it, so the sender and preview no longer shift left as mail is read. - Add a Preferences switch for the sidebar's Attachments row. - Log why GOA's GetAccessToken failed rather than discarding the reason. Co-Authored-By: Alfonso Lizárraga <alfonso.lzrg@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Thank you — this is a genuinely useful pull request, and most of it is now in It landed as a hand-applied commit (d0ae94f) rather than a merge, because Taken as-is
Taken with a change
Not taken
On your question about how to contribute: there was no CONTRIBUTING file, and that was a gap on my side — the README now says what there is to say (no CLA, AGPL-3.0-or-later, patches may be adapted before landing with the reasoning posted here). Opening a pull request exactly as you did is the right way. Thanks again. |
|
Landed in |
… dot Adopts most of hyprlab#14 (thanks @alfonsolzrg), with the address fix carried through to the recipient fields the pull request left alone. - Build every mailbox from its parts instead of formatting "Name <addr>" and parsing that back. A display name is only a bare atom in the simplest cases, so a name with an accent, a comma or a full stop — or one that is itself the address, which is what an import with no separate display name produces — failed to parse and the send was rejected with "Invalid param". From: was the reported case; To:, Cc: and Bcc: went through the same path and are now built the same way, via the existing `parse_recipients`. - Let an incoming request preempt the background backfill's connect. The first thing the UI asks for at startup is the visible folder, which the cache can answer with no network at all, but the worker was awaiting an IMAP handshake before it would look at the queue — so a synced account opened to an empty message list until the connection came up. - Filter and sort the message list by reference and clone only the page actually rendered. Every rebuild — each keystroke in search, the cache-backed load at startup — previously cloned the entire folder index to then throw all but `render_limit` of it away. - Keep the unread dot's slot in the row and fade it instead of hiding it, so the sender and preview no longer shift left as mail is read. - Add a Preferences switch for the sidebar's Attachments row. - Log why GOA's GetAccessToken failed rather than discarding the reason. Co-Authored-By: Alfonso Lizárraga <alfonso.lzrg@gmail.com>
Hello there!
While using this email client I noticed a couple of visual bugs:
I also added a couple of nice-to-haves, like:
But more importantly, found a bug while sending email:
To:. When the name wasn't available, it defaulted to the same email twice (e.g. "alfonso.lzrg@gmail.com alfonso.lzrg@gmail.com") which failed at sending with an "Invalid param" error.I used Claude to figure out and fix these bugs. I couldn't find a CONTRIBUTORS file, so I'm sending these fixes upstream like this. Let me know if you'd like me to proceed in a different way!