Skip to content

feat(web): warn when a name looks like one you already know - #376

Merged
PastaPastaPasta merged 5 commits into
masterfrom
feat/e4-confusable-names
Oct 4, 2026
Merged

PastaPastaPasta merged 5 commits into
masterfrom
feat/e4-confusable-names

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

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 -, treats 0/o and 1/i/l as one letter, and joins rn→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, so dash and dish stay 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:

    • For a name like one you star or follow: "Not to be confused with dashpay, which you starred. Compare the identity id before you trust this page."
    • For a name like one you only visited: "Looks like dash-pay, another identity you've visited. Compare the identity ids." A visit says nothing about which page is real, because the impostor's may have been seen first, so this note takes no side.

    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→0 and i/l→1. So dash-pay, dashpay2 and rnyname are 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

  • vitest:
    • 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.
  • tsc and eslint are clean.
  • I checked a static export built for sakura. With no stored names, the dips mirror shows no note and records itself as visited. With a starred repo named dips under 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

  • The list is per browser: a new browser knows nothing yet.
  • The note does not compare against the top Most-starred owners (TS-24's second source). That needs a proved ranking read on every repo page, which the page request budget does not allow.
  • DPNS labels and repo names are ASCII only, so there is no Unicode confusables table.
  • dg shows no such note.

🤖 Generated with Claude Code

PastaPastaPasta and others added 2 commits October 4, 2026 12:50
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]>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d7f915f7-adfb-43f8-ab36-f99879fb5b27
📥 Commits

Reviewing files that changed from the base of the PR and between e2e2b0c and d96b85a.

📒 Files selected for processing (10)
  • docs/guides/identity-and-keys.md
  • forge-web/components/lookalike-note.test.tsx
  • forge-web/components/lookalike-note.tsx
  • forge-web/components/profile-content.tsx
  • forge-web/components/repo/repo-header.tsx
  • forge-web/components/repo/star-button.tsx
  • forge-web/lib/view/confusable.test.ts
  • forge-web/lib/view/confusable.ts
  • forge-web/lib/view/known-names.test.ts
  • forge-web/lib/view/known-names.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PastaPastaPasta
PastaPastaPasta merged commit 40b9bc1 into master Oct 4, 2026
13 checks passed
@PastaPastaPasta
PastaPastaPasta deleted the feat/e4-confusable-names branch October 4, 2026 22:44
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