Skip to content

fix(cache): trim <> from email keys#1190

Merged
andrinoff merged 1 commit intofloatpane:masterfrom
mvanhorn:osc/1122-strip-angle-brackets
Apr 29, 2026
Merged

fix(cache): trim <> from email keys#1190
andrinoff merged 1 commit intofloatpane:masterfrom
mvanhorn:osc/1122-strip-angle-brackets

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

@mvanhorn mvanhorn commented Apr 29, 2026

What?

Add < and > to the trim cutset in normalizeContactEmail so the cache key is the bare email regardless of whether the input came from a header or a UI field. Whitespace and commas continue to be trimmed.

Why?

Email addresses arriving from From: headers commonly come wrapped in angle brackets (<foo@bar.com>). The previous trim cutset was , only, so the cache stored the literal <foo@bar.com> and never matched future lookups against foo@bar.com.

Resolves #1122.

Resolves floatpane#1122.

Email addresses arriving from `From:` headers commonly come wrapped in
angle brackets (`<foo@bar.com>`). The previous trim cutset was `","`,
so the cache stored the literal `<foo@bar.com>` and never matched
future lookups against `foo@bar.com`.

Add `<` and `>` to the trim cutset so the cache key is the bare
address regardless of whether the input came from a header or a UI
field. Whitespace and commas continue to be trimmed.
@mvanhorn mvanhorn requested a review from a team as a code owner April 29, 2026 07:58
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.

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

  • Title: Is too long (57 characters). The PR title must be strictly under 40 characters.
  • Body: Missing the ## What? or ## Why? headings required by the PR template.

@github-actions github-actions Bot added the bug Something isn't working label Apr 29, 2026
@mvanhorn mvanhorn changed the title fix(cache): strip angle brackets in normalizeContactEmail fix(cache): trim <> from email keys Apr 29, 2026
@floatpanebot floatpanebot dismissed their stale review April 29, 2026 13:55

Formatting issues have been resolved. Thank you!

@mvanhorn
Copy link
Copy Markdown
Contributor Author

Updated title to fix(cache): trim <> from email keys (35 chars) and rewrote the body with ## What? / ## Why? headings. No code changes.

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

/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 8cc9c37 into floatpane:master Apr 29, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: contact normalization does not strip angle brackets

3 participants