chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
Mention suggestions match handles from their start
Merged Approved
This makes the @ suggestions in MarkdownField.svelte keep only accounts whose handle starts with the typed text. It applies the same filter to thread people, follows and searchOwners results, in one pass before the dedupe and the SUGGESTED cut. I read the whole change and the surrounding code; I did not run anything.
- Empty query: a bare
@still suggests thread people and follows, becausestartsWith('')is true. This matches the old behaviour. - Lowercasing:
qis already lowercased and the handle is lowercased in the filter, so the comparison is consistent. - Dedupe: the prefix test comes before the
seen.addside effect, so non-matching accounts don't use up aseenslot. SUGGESTEDcut: the search ranks prefix matches first, so the owner list it returns at the limit still holds every owner that can show. That is the PR's claim, and I found nothing against it.- Changeset and docs:
Changeset: nonefits, since this is a web-only change. No docs page appears to describe the suggestion rule.
All checks have passed
8 passed, 2 skipped
Merged as 0b54e22
What changes
Typing
@in a comment now suggests only accounts whose handle starts with what follows it. Before, people in the thread and accounts the viewer follows were suggested when their handle held the text anywhere, and listed ahead of everyone else:@cputjohnandersen777.bsky.socialfirst, for the "c" in "social". The ownersdev.knotless.searchOwnersfinds, which can also match mid-handle, are held to the same rule.Why
A mention is typed from the start of a handle, as GitHub's suggestions take it. A match in the middle, often in the host part every Bluesky handle shares, buries the account meant. The search already puts handles that start with the text first, so its first
SUGGESTEDanswers still hold every owner that can show.How it was checked
just look pull-files --signed-in --set 'getThread.item.state="open"' --click 'details.review-menu>summary' --type '.review-menu textarea=@t'now suggests no one (before,bob.test, for its "t"), and@bstill suggestsbob.test. No recorded page has the suggestions showing, so no shots move.Shortcomings
A handle is matched only at its start, not at each dot-separated part:
@socialfinds no*.bsky.socialaccount.Changeset: none
🤖 Generated with Claude Code