Skip to content

feat: per-account email signatures#847

Merged
andrinoff merged 3 commits intofloatpane:masterfrom
kyooosukedn:feat/signature-per-account
Apr 23, 2026
Merged

feat: per-account email signatures#847
andrinoff merged 3 commits intofloatpane:masterfrom
kyooosukedn:feat/signature-per-account

Conversation

@kyooosukedn
Copy link
Copy Markdown
Contributor

What?

Adds per-account signature support. Each account can have its own signature that overrides the global one.

Changes:

  • Account.Signature field for inline per-account signatures (in config)
  • LoadSignatureForAccount() with 3-tier fallback: per-account file -> inline field -> global signature
  • SaveSignatureForAccount() to persist per-account signatures in signatures/<id>.txt
  • Composer loads the correct signature based on selected account

Why?

Fixes #794

Only a global signature was available. Users with work and personal accounts need different signatures. The fallback chain ensures backward compatibility: existing global signatures still work for accounts without a per-account override.

Testing

  • go build . — compiles clean
  • go test ./tui/ — all tests pass

Implements floatpane#794

Adds signature support per account. Each account can have its own
signature stored in signatures/<accountID>.txt, falling back to
the global signature.txt. The Account struct also supports an
inline signature field for config-based setup.

Changes:
- Account.Signature field for inline per-account signatures
- LoadSignatureForAccount() with fallback chain: per-account file
  -> inline field -> global signature
- SaveSignatureForAccount() for per-account signature editing
- Composer loads the correct signature based on selected account
@kyooosukedn kyooosukedn requested a review from a team as a code owner April 22, 2026 20:28
@github-actions github-actions Bot added bug Something isn't working ci CI / build pipeline enhancement New feature or request labels Apr 22, 2026
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.

@andrinoff andrinoff closed this Apr 22, 2026
@kyooosukedn
Copy link
Copy Markdown
Contributor Author

Hi @andrinoff , my apologies, I'm still trying to learn go and hence doing a lot of smaller things. Do u have a preferable feature in mind that i can take?

@andrinoff
Copy link
Copy Markdown
Member

oh, actually, this is valid, sorry, wanted to keep this one. i'd just prefer if already contributors worked on bigger issues, rather than small 3 line changes, those are meant to involve new people, you are free to pick up any issue, that you think will be at least a bit more complicated. You don't have to contribute a lot, you can start working on an issue, and then draft a PR, and keep making progress. No contributions are perfect, and I, personally, or my teammates will help you through it. Just refrain from working on super easy chore tasks!

I will now reopen this PR!

@kyooosukedn
Copy link
Copy Markdown
Contributor Author

will do!

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.

Generally, a good PR,

Other than the comments, I will probably come up with a design for settings, and finish the PR tomorrow for me, if you don't beat me to it!

Comment thread config/signature.go
}
if signature == "" {
// Remove the file to fall back to global
os.Remove(path)
Copy link
Copy Markdown
Member

@andrinoff andrinoff Apr 22, 2026

Choose a reason for hiding this comment

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

you should handle this error, as the file may be not removed for some reason, other than it not existing (os.Remove returns nil, i believe, when the file does not exist)

Comment thread tui/composer.go Outdated
@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 dismissed their stale review April 23, 2026 11:11

Fixed up the PR

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 andrinoff merged commit fd781ce into floatpane:master Apr 23, 2026
12 checks passed
@andrinoff andrinoff removed ci CI / build pipeline bug Something isn't working labels Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: Add signature per account

3 participants