Skip to content

feat(composer): filter account picker#1377

Open
FromSi wants to merge 1 commit into
floatpane:masterfrom
FromSi:feature/account-picker-filter
Open

feat(composer): filter account picker#1377
FromSi wants to merge 1 commit into
floatpane:masterfrom
FromSi:feature/account-picker-filter

Conversation

@FromSi
Copy link
Copy Markdown
Member

@FromSi FromSi commented May 29, 2026

What?

Added filtering to the composer account picker. Pressing the configured account picker filter key opens a filter input, narrows the account list, shows filtered result counts, and lets users apply or clear the filter before selecting an account.

view

Why?

Closes #554

Users with many configured accounts need a faster way to find the correct sender account without scrolling through the full list.

@FromSi FromSi requested review from andrinoff and mavonx May 29, 2026 14:45
@FromSi FromSi requested a review from a team as a code owner May 29, 2026 14:45
@floatpanebot floatpanebot added enhancement New feature or request area/tui Terminal UI / view layer area/i18n Localization / translations area/config Configuration / settings area/docs Docs site / README size/L Diff: 201–800 lines and removed enhancement New feature or request labels May 29, 2026
@floatpanebot
Copy link
Copy Markdown
Member

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    2.229µ ± 839%   3.067µ ± 30%       ~ (p=0.132 n=6)
ParseSearchQuery_Complex-4   8.659µ ±  42%   7.069µ ± 77%       ~ (p=0.589 n=6)
TokenizeSearchQuery-4        4.871µ ±  33%   4.519µ ± 79%       ~ (p=0.699 n=6)
geomean                      4.547µ          4.610µ        +1.40%

                           │  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        149.4µ ± 65%   165.3µ ± 13%        ~ (p=0.310 n=6)
SearchOverlayView-4   157.4µ ±  7%   176.0µ ± 16%  +11.78% (p=0.009 n=6)
InboxConstruction-4   858.1µ ±  8%   975.1µ ±  7%  +13.63% (p=0.002 n=6)
geomean               272.2µ         305.0µ        +12.02%

                    │    old.txt    │               new.txt               │
                    │     B/op      │     B/op       vs base              │
LogPanelView-4        44.67Ki ± 51%   44.67Ki ±  0%       ~ (p=1.000 n=6)
SearchOverlayView-4   56.14Ki ± 41%   44.65Ki ± 26%       ~ (p=0.303 n=6)
InboxConstruction-4   874.2Ki ±  0%   874.2Ki ±  0%       ~ (p=0.394 n=6)
geomean               129.9Ki         120.4Ki        -7.35%

                    │   old.txt   │              new.txt              │
                    │  allocs/op  │  allocs/op   vs base              │
LogPanelView-4         714.0 ± 0%    714.0 ± 0%       ~ (p=1.000 n=6)
SearchOverlayView-4    926.0 ± 0%    924.5 ± 0%       ~ (p=0.182 n=6)
InboxConstruction-4   3.478k ± 0%   3.478k ± 0%       ~ (p=0.626 n=6)
geomean               1.320k        1.319k       -0.05%

auto-generated by benchmarks.yml

@andrinoff
Copy link
Copy Markdown
Member

I know that this was a feature previously requested (transferred from non-OSS matcha). But, I don't think we need it yet at least, i'll keep it open

@mavonx
Copy link
Copy Markdown
Member

mavonx commented May 29, 2026

Hello @FromSi

I reviewed the code, and I have one mandatory change request and one optional suggestion (@andrinoff can decide whether to apply it or not).

  • Mandatory: The email list should be circular.
  • Optional: In the current implementation by @FromSi, when a user presses f, they are redirected to the filter page. After selecting a filter value and pressing Enter, the user is redirected back to the previous window with the filtered emails displayed.

My suggestion is slightly different: after the user presses f and selects a filter value, pressing Enter should keep the user on the filtered emails window instead of returning them to the previous one. At that point, the focus/cursor should automatically move to the filtered email list so the user can immediately navigate through the results.

demo

Also, keep the account and filter counters as they are, but only on the filtering page (I removed them in the video by mistake).

@andrinoff
Copy link
Copy Markdown
Member

@mavonx @FromSi. In the current situation, where matcha is not optimized for more, than 4 accounts (in which case filtering is slower, than selecting), this is a bad feature. Let's not spend time on this right now. If we are to do this, I think we should first make matcha many-account-friendly (currently in the inbox, accounts overflow after 4, e.t.c.)

Or maybe no user will ever need many accounts at once

@andrinoff
Copy link
Copy Markdown
Member

As well as that, the screen that you currently are showing, account picker, will just expand downwards and out of the screen on the amount of emails, where filtering is actually needed

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

Labels

area/config Configuration / settings area/docs Docs site / README area/i18n Localization / translations area/tui Terminal UI / view layer size/L Diff: 201–800 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: Search/Filter in Account Picker

4 participants