Skip to content

feat: select composer attachments#1259

Open
FromSi wants to merge 1 commit intofloatpane:masterfrom
FromSi:feat/composer-attachment-select
Open

feat: select composer attachments#1259
FromSi wants to merge 1 commit intofloatpane:masterfrom
FromSi:feat/composer-attachment-select

Conversation

@FromSi
Copy link
Copy Markdown
Contributor

@FromSi FromSi commented May 8, 2026

What?

Added selectable attachment navigation in the composer. Attachments are now shown as a focused list with a cursor, and backspace, delete, or d removes the selected attachment instead of always removing the last one.

Why?

Previously, when multiple files were attached, the composer only allowed removing the most recently added attachment. This makes it possible to choose and remove any specific attachment without deleting newer ones first.

Screencast_20260508_193403 (3)

Closes #543

@FromSi FromSi requested a review from a team as a code owner May 8, 2026 14:51
@floatpanebot floatpanebot added area/tui Terminal UI / view layer enhancement New feature or request labels May 8, 2026
Comment thread tui/composer.go
@@ -472,8 +511,7 @@ func (m *Composer) Update(msg tea.Msg) (tea.Model, tea.Cmd) {

case "backspace", "delete", "d":
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.

lets actually add a keybind to the composer struct. this should be configurable

Copy link
Copy Markdown
Contributor Author

@FromSi FromSi May 9, 2026

Choose a reason for hiding this comment

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

Which keybind is better?

"composer": {
  "external_editor": "ctrl+e",
  "next_field": "tab",
  "prev_field": "shift+tab",
  "suggestions_up": "ctrl+p",
  "suggestions_down": "ctrl+n",
  "suggestions_accept": "enter",
  "suggestions_cancel": "esc",
  "prompt_submit": "enter",
  "prompt_cancel": "esc",
  "account_up": "up",
  "account_down": "down",
  "account_select": "enter",
  "account_cancel": "esc",
  "discard_draft": "y",
  "keep_draft": "n",
  "attachment_up": "up",
  "attachment_down": "down",
  "attachment_remove": "d",
  "activate": "enter",
  "toggle": "space"
}

OR

"composer": {
  "external_editor": "ctrl+e",
  "next_field": "tab",
  "prev_field": "shift+tab",
  "up": "k",
  "down": "j",
  "accept": "enter",
  "cancel": "esc",
  "toggle": "space",
  "remove": "d",
  "suggestions_up": "ctrl+p",
  "suggestions_down": "ctrl+n",
  "discard_draft": "y",
  "keep_draft": "n"
}

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.

no, i meant particularly delete, what are the other keybinds even?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ctrl+e                open external editor (already config: composer.external_editor)
tab                   next field (already config: composer.next_field)
shift+tab             previous field (already config: composer.prev_field)

up                    move contact suggestion up
ctrl+p                move contact suggestion up
down                  move contact suggestion down
ctrl+n                move contact suggestion down
tab                   accept contact suggestion (already config fallback: composer.next_field)
enter                 accept contact suggestion
esc                   close contact suggestions

enter                 submit plugin prompt
esc                   cancel plugin prompt

up                    move account picker up
k                     move account picker up
down                  move account picker down
j                     move account picker down
enter                 select account
esc                   close account picker

y                     discard draft
Y                     discard draft
n                     keep draft
N                     keep draft
esc                   keep draft / cancel exit confirmation (already config: global.cancel)

up                    move attachment selection up
global nav_up         move attachment selection up (already config: global.nav_up)
down                  move attachment selection down
global nav_down       move attachment selection down (already config: global.nav_down)
backspace             remove selected attachment
delete                remove selected attachment
d                     remove selected attachment

enter                 open account picker / add attachment / toggle S/MIME / send
space                 edit catch-all From / toggle S/MIME

ctrl+c                quit (already config: global.quit)
esc                   start exit confirmation (already config: global.cancel)

Copy link
Copy Markdown
Member

@andrinoff andrinoff May 9, 2026

Choose a reason for hiding this comment

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

just add 1 for the attachments delete, if any require latter changes, it will be a separate PR and, please @ me, because I do not receive github notifications from review comments

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

Labels

area/tui Terminal UI / view layer enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Attachment removal in Composer always removes last item

3 participants