Skip to content

feat: show attachment file sizes#1252

Merged
andrinoff merged 3 commits intofloatpane:masterfrom
FromSi:feature/composer-attachment-file-sizes
May 8, 2026
Merged

feat: show attachment file sizes#1252
andrinoff merged 3 commits intofloatpane:masterfrom
FromSi:feature/composer-attachment-file-sizes

Conversation

@FromSi
Copy link
Copy Markdown
Contributor

@FromSi FromSi commented May 7, 2026

Closes #550

What?

Display attachment file sizes in the composer attachment list, e.g. image.jpg (1.2 MB).

Also wired file size formatting through the existing i18n number formatter:

  • added GetNumberFormatter() to the i18n manager
  • added a short TUI helper tfs(...)
  • reused it in both composer and file picker
  • removed the old file picker-local file size formatter
  • added tests for attachment display

Why?

Composer previously showed only attachment filenames, so users had no quick way to check file size before sending.

The formatter was touched because there was already an unused locale-aware i18n.NumberFormatter.FormatFileSize. Instead of keeping a composer-specific helper or reusing a file picker-private function, this change makes file size formatting a shared i18n-backed path. That keeps formatting consistent across TUI components and supports locale-specific number formatting, such as 1.2 MB vs 1,2 MB.

@FromSi FromSi requested a review from a team as a code owner May 7, 2026 20:53
@floatpanebot floatpanebot added area/tui Terminal UI / view layer area/i18n Localization / translations enhancement New feature or request labels May 7, 2026
@FromSi
Copy link
Copy Markdown
Contributor Author

FromSi commented May 7, 2026

Closes #550

@andrinoff
Copy link
Copy Markdown
Member

Closes #550

add it to description, please.

Comment thread tui/composer.go Outdated
Copy link
Copy Markdown
Member

@andrinoff andrinoff left a comment

Choose a reason for hiding this comment

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

lgtm

@andrinoff
Copy link
Copy Markdown
Member

i'll check how it looks in the evening.

@andrinoff
Copy link
Copy Markdown
Member

/approve

Copy link
Copy Markdown
Member

@floatpanebot floatpanebot left a comment

Choose a reason for hiding this comment

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

Approved on behalf of @andrinoff via /approve command.

@andrinoff andrinoff merged commit 8418535 into floatpane:master May 8, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: Show attachment sizes in Composer

3 participants