Skip to content

fix: maildir fetch errors#1375

Open
andrinoff wants to merge 5 commits into
floatpane:masterfrom
andrinoff:fix/maildir-fetch
Open

fix: maildir fetch errors#1375
andrinoff wants to merge 5 commits into
floatpane:masterfrom
andrinoff:fix/maildir-fetch

Conversation

@andrinoff
Copy link
Copy Markdown
Member

What?

Routes all per-account fetch sites in main.go through m.providers[acct.ID].

Why?

Fixes #1309

Signed-off-by: drew <me@andrinoff.com>
@andrinoff andrinoff requested a review from a team as a code owner May 28, 2026 17:21
@floatpanebot floatpanebot added bug Something isn't working area/fetcher IMAP fetch / IDLE / search labels May 28, 2026
Signed-off-by: drew <me@andrinoff.com>
@floatpanebot floatpanebot added the size/M Diff: 51–200 lines label May 28, 2026
@floatpanebot
Copy link
Copy Markdown
Member

floatpanebot commented May 28, 2026

Benchmark report — no significant change

Metrics worse: 0 · better: 0 (threshold: ±3%).

benchstat output
goos: linux
goarch: amd64
pkg: github.com/floatpane/matcha/backend
cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                           │    old.txt    │               new.txt               │
                           │    sec/op     │    sec/op      vs base              │
ParseSearchQuery_Simple-4    3.107µ ±  46%   2.721µ ± 157%       ~ (p=0.699 n=6)
ParseSearchQuery_Complex-4   7.867µ ±  44%   6.417µ ±  50%       ~ (p=0.818 n=6)
TokenizeSearchQuery-4        3.992µ ± 157%   4.534µ ±  41%       ~ (p=0.394 n=6)
geomean                      4.604µ          4.294µ         -6.73%

                           │  old.txt   │              new.txt               │
                           │    B/op    │    B/op     vs base                │
ParseSearchQuery_Simple-4    26.00 ± 0%   26.00 ± 0%       ~ (p=1.000 n=6) ¹
ParseSearchQuery_Complex-4   762.0 ± 0%   762.0 ± 0%       ~ (p=1.000 n=6) ¹
TokenizeSearchQuery-4        176.0 ± 0%   176.0 ± 0%       ~ (p=1.000 n=6) ¹
geomean                      151.6        151.6       +0.00%
¹ all samples are equal

                           │  old.txt   │              new.txt               │
                           │ allocs/op  │ allocs/op   vs base                │
ParseSearchQuery_Simple-4    2.000 ± 0%   2.000 ± 0%       ~ (p=1.000 n=6) ¹
ParseSearchQuery_Complex-4   23.00 ± 0%   23.00 ± 0%       ~ (p=1.000 n=6) ¹
TokenizeSearchQuery-4        9.000 ± 0%   9.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                      7.453        7.453       +0.00%
¹ all samples are equal

pkg: github.com/floatpane/matcha/tui
                    │   old.txt    │              new.txt               │
                    │    sec/op    │    sec/op     vs base              │
LogPanelView-4        147.1µ ± 23%   144.4µ ±  4%       ~ (p=0.310 n=6)
SearchOverlayView-4   165.2µ ±  6%   171.3µ ± 10%       ~ (p=0.180 n=6)
InboxConstruction-4   940.0µ ± 14%   913.0µ ±  7%       ~ (p=0.589 n=6)
geomean               283.7µ         282.6µ        -0.38%

                    │    old.txt    │                new.txt                │
                    │     B/op      │      B/op       vs base               │
LogPanelView-4        44.67Ki ± 51%   21.79Ki ± 105%        ~ (p=0.242 n=6)
SearchOverlayView-4   56.14Ki ± 41%   56.14Ki ±   0%        ~ (p=0.318 n=6)
InboxConstruction-4   874.2Ki ±  0%   874.2Ki ±   0%        ~ (p=0.900 n=6)
geomean               129.9Ki         102.3Ki         -21.29%

                    │   old.txt   │              new.txt              │
                    │  allocs/op  │  allocs/op   vs base              │
LogPanelView-4         714.0 ± 0%    712.0 ± 0%       ~ (p=0.242 n=6)
SearchOverlayView-4    926.0 ± 0%    926.0 ± 0%       ~ (p=0.273 n=6)
InboxConstruction-4   3.477k ± 0%   3.478k ± 0%       ~ (p=0.896 n=6)
geomean               1.320k        1.319k       -0.09%

auto-generated by benchmarks.yml

Signed-off-by: drew <me@andrinoff.com>
@floatpanebot floatpanebot added the size/L Diff: 201–800 lines label May 28, 2026
@andrinoff
Copy link
Copy Markdown
Member Author

/build

@floatpanebot
Copy link
Copy Markdown
Member

Build complete (9ebb1b7)

Warning

This is an unreviewed PR build and has not been security audited. It may contain bugs, vulnerabilities, or malicious code. Do not use for daily use. Only use for testing purposes.

OS Arch Download
Linux amd64 matcha_preview_linux_amd64.tar.gz
Linux arm64 matcha_preview_linux_arm64.tar.gz
macOS amd64 matcha_preview_darwin_amd64.tar.gz
macOS arm64 matcha_preview_darwin_arm64.tar.gz
Windows amd64 matcha_preview_windows_amd64.zip
Windows arm64 matcha_preview_windows_arm64.zip

andrinoff added 2 commits May 28, 2026 21:37
Signed-off-by: drew <me@andrinoff.com>
Signed-off-by: drew <me@andrinoff.com>
@floatpanebot floatpanebot added the area/config Configuration / settings label May 29, 2026
@andrinoff
Copy link
Copy Markdown
Member Author

/build

@andrinoff andrinoff removed the size/M Diff: 51–200 lines label May 29, 2026
@floatpanebot
Copy link
Copy Markdown
Member

Build complete (9b10fbb)

Warning

This is an unreviewed PR build and has not been security audited. It may contain bugs, vulnerabilities, or malicious code. Do not use for daily use. Only use for testing purposes.

OS Arch Download
Linux amd64 matcha_preview_linux_amd64.tar.gz
Linux arm64 matcha_preview_linux_arm64.tar.gz
macOS amd64 matcha_preview_darwin_amd64.tar.gz
macOS arm64 matcha_preview_darwin_arm64.tar.gz
Windows amd64 matcha_preview_windows_amd64.zip
Windows arm64 matcha_preview_windows_arm64.zip

@FromSi
Copy link
Copy Markdown
Member

FromSi commented May 29, 2026

Non-blocking follow-up: there are still a few legacy Trash/Archive helpers that call connect(account) before reaching the backend-aware fetch path, for example FetchTrashEmails, FetchTrashEmailBody, FetchTrashAttachment / FetchArchiveAttachment, and delete helpers in fetcher.go.

The main folder-based TUI flow now goes through the new maildir dispatch, so this PR fixes the reported maildir loading issue. But if a maildir account later reaches one of those mailbox-kind helpers directly, it can still fall back into the IMAP path and hit the same unsupported service_provider style error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Configuration / settings area/fetcher IMAP fetch / IDLE / search bug Something isn't working size/L Diff: 201–800 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: maildir account fails to fetch with "unsupported service_provider:"

3 participants