Repository navigation
feat(web): warn when a name looks like one you already know - #376
Merged
Merged
Conversation
DPNS folds only o/0 and i/l/1, so dash-pay, dashpay2 and a Cyrillic dashpаy are all registrable look-alikes. The browser now remembers (locally only) the owners and repositories the viewer visits, stars or follows, and a repo header or profile whose owner or repo name has the same confusable skeleton, or is one edit away from a longer one, says "Not to be confused with dashpay, which you starred." Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A name only visited is noted without taking sides (the impostor's page may be the one seen first); only a star or follow is warned against. Names are kept per network, the viewer's own and an owner's own repos are never compared, unstarring or unfollowing makes the entry a visit again, another owner's repo of the same name counts unless it is a fork, digits fold before the rn/vv/cl joins, stored entries are validated, and a page records its names in one write. The skeleton covers only what DPNS and repo names allow (ASCII), and the docs no longer claim otherwise. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Part 3 of epic E4 "Who is this" (TS-24). A repository or profile page now warns when its owner name or repository name looks like one you already know for someone else.
Skeleton and edit distance (
lib/view/confusable.ts): folds case, drops-, treats0/oand1/i/las one letter, and joinsrn→m,vv→w,cl→d. Two names are look-alikes when their skeletons match, or when both are 5 or more characters and one edit apart (dashpay2,dashpai). Short names need an exact skeleton match, sodashanddishstay apart.What you know (
lib/view/known-names.ts): kept in localStorage per network, never sent anywhere. It holds the owners (DPNS names) and repositories you visit, star or follow, up to 300 entries. Unstarring or unfollowing turns the entry back into a visit.The note (
components/lookalike-note.tsx) appears under the repo header and on profiles. There are two wordings:Another owner's repository with exactly the same name also counts, unless this one is a fork. Your own names and an owner's own repositories are never compared.
Why
DPNS normalises only
o→0andi/l→1. Sodash-pay,dashpay2andrnynameare all names anyone can register, and a name with a digit 2–9 avoids the masternode vote. Nothing pointed out that a name looked like one you trust.How tested
confusable.test.ts: folds, one-edit variants, short names, the same name.known-names.test.ts: never self-compared, the same-name rule, stars outrank visits, unstar, bounded size, per-network storage, corrupt or malformed data.lookalike-note.test.tsx: silent on a first visit, starred vs visited wording, the viewer's own names, star recording and unstar.dipsunder another owner placed in the stored list (the store was pre-filled for the screenshot), the dips mirror shows "Not to be confused with 9CVMSjk/dips, which you starred." in light and dark at 390 px.Screenshots in
/Users/pasta/workspace/dash-forge-qa/evidence/p0/e4/:after-lookalike-none.png,after-lookalike-starred.png,after-lookalike-starred-dark-390.png.Limits
dgshows no such note.🤖 Generated with Claude Code