Skip to content

feat(search): find a letter by its whole tracking link and by a part of a link - #1328

Merged
leemour merged 2 commits into
mainfrom
feat/mail-link-search
Oct 15, 2026
Merged

leemour merged 2 commits into
mainfrom
feat/mail-link-search

Conversation

@leemour

@leemour leemour commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Handoff task 2 (mentions-next-handoff.md).

Mail keeps a tracking link only as its site's origin (url rule version 2, #1310), so url:"<link>" found nothing for it.

  • url: in mail now also matches a letter that has a row of the link's site and whose body holds the link, as typed or without utm_*. The body is read only for those letters.
  • New field link: — a part of a link, any case (LIKE with %, _ escaped). Messages: stored links. Mail: stored links plus the body of letters that hold a tracking link.
  • No new rows, no new index, no migration. SQL lives in src/store/sqlite/mention-links.ts (lucene.ts is at its line cap).
  • Fixed stale "messages only, not mail yet" notes in the field registry.

On a copy of the owner's store (WireCatLabs/cli-testing#88, totals only): url: 86 ms median, link: 504 ms, domain: 27 ms; every sampled letter found.

Known limit: link: reads the whole body of such a letter, so it can match a part outside a link there.

Checked locally: typecheck, biome (no errors), 4578 tests, docs:check, parity:render clean.

🤖 Generated with Claude Code

leemour and others added 2 commits October 15, 2026 23:44
…of a link

Mail keeps a tracking link only as its site's origin (url rule version 2), so url:"<link>" found nothing for
it. Now url: also matches a letter with a row of that origin whose body holds the link, as typed or without
utm_*. The new field link: matches a part of a link, any case, in messages (stored links) and in mail (stored
links, and the body of letters that hold a tracking link). No new rows or indexes.

On a copy of the owner's store: url: 86 ms median, link: 504 ms, domain: 27 ms; every sampled letter found
(WireCatLabs/cli-testing#88).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ting

link: and url: values must be quoted: ?, / and = are query syntax, and an unquoted value fails with
invalid-syntax. LIKE folds the case of ASCII letters only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant