Skip to content

feat: collapse quoted reply text#1612

Open
Shabhareash wants to merge 1 commit into
floatpane:masterfrom
Shabhareash:feature-collapse-quoted-text
Open

feat: collapse quoted reply text#1612
Shabhareash wants to merge 1 commit into
floatpane:masterfrom
Shabhareash:feature-collapse-quoted-text

Conversation

@Shabhareash

Copy link
Copy Markdown

Detect quoted/reply blocks (styled in rounded-border boxes) and collapse them into a single '▶ quoted text hidden' indicator by default. Pressing 'q' (configurable via toggle_quotes keybind) expands/collapses the quoted sections.

Changes:

  • view/html.go: add CollapseQuotedText() that identifies rendered quote boxes by their ╭/╰ border chars and replaces them with a one-line summary
  • tui/email_view.go: add showQuotedText toggle, collapse quotes by default, re-render body on toggle; add 'q: toggle quotes' to help bar
  • config: add toggle_quotes keybind (default: q) to EmailKeys

Closes #1598

What?

Why?

Detect quoted/reply blocks (styled in rounded-border boxes) and collapse
them into a single '▶ quoted text hidden' indicator by default. Pressing
'q' (configurable via toggle_quotes keybind) expands/collapses the quoted
sections.

Changes:
- view/html.go: add CollapseQuotedText() that identifies rendered quote
  boxes by their ╭/╰ border chars and replaces them with a one-line summary
- tui/email_view.go: add showQuotedText toggle, collapse quotes by default,
  re-render body on toggle; add 'q: toggle quotes' to help bar
- config: add toggle_quotes keybind (default: q) to EmailKeys

Closes #XXXX
@Shabhareash Shabhareash requested a review from a team as a code owner June 22, 2026 21:32

@floatpanebot floatpanebot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Shabhareash! Please fix the following issues with your PR:

  • Title: Is too long (54 characters). The PR title must be strictly under 40 characters.

@floatpanebot floatpanebot added area/tui Terminal UI / view layer area/config Configuration / settings enhancement New feature or request question Further information requested size/M Diff: 51–200 lines labels Jun 22, 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: AMD EPYC 7763 64-Core Processor                
                           │    old.txt    │               new.txt                │
                           │    sec/op     │    sec/op      vs base               │
ParseSearchQuery_Simple-4    3.772µ ± 304%   3.208µ ± 120%        ~ (p=0.310 n=6)
ParseSearchQuery_Complex-4   5.587µ ±  67%   9.161µ ±  41%        ~ (p=0.132 n=6)
TokenizeSearchQuery-4        5.280µ ±  41%   6.973µ ±  56%        ~ (p=0.485 n=6)
geomean                      4.810µ          5.895µ         +22.57%

                           │  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        173.2µ ± 20%    161.8µ ±  8%  -6.58% (p=0.041 n=6)
SearchOverlayView-4   197.0µ ± 14%    175.7µ ±  7%       ~ (p=0.065 n=6)
InboxConstruction-4   997.7µ ± 17%   1030.1µ ± 33%       ~ (p=0.937 n=6)
geomean               324.1µ          308.3µ        -4.89%

                    │    old.txt    │               new.txt               │
                    │     B/op      │     B/op       vs base              │
LogPanelView-4        44.67Ki ± 51%   44.67Ki ± 51%       ~ (p=1.000 n=6)
SearchOverlayView-4   56.14Ki ± 41%   44.66Ki ± 26%       ~ (p=0.359 n=6)
InboxConstruction-4   874.3Ki ±  0%   874.3Ki ±  0%       ~ (p=0.734 n=6)
geomean               129.9Ki         120.4Ki        -7.34%

                    │   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%    925.0 ± 0%       ~ (p=0.545 n=6)
InboxConstruction-4   3.478k ± 0%   3.478k ± 0%       ~ (p=0.316 n=6)
geomean               1.320k        1.319k       -0.03%

auto-generated by benchmarks.yml

@Shabhareash Shabhareash changed the title feat: collapse quoted reply text behind toggle (q key) feat: collapse quoted reply text Jun 22, 2026
@floatpanebot floatpanebot dismissed their stale review June 22, 2026 21:36

Formatting issues have been resolved. Thank you!

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

Labels

area/config Configuration / settings area/tui Terminal UI / view layer enhancement New feature or request question Further information requested size/M Diff: 51–200 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: Collapse quoted reply text in message view

2 participants