Skip to content

Normalize profile names for verified-name matching - #2348

Merged
shellz-n-stuff merged 1 commit into
block:mainfrom
jpeedikayil:jpeedikayil/profile-identity-safety
Nov 5, 2026
Merged

shellz-n-stuff merged 1 commit into
block:mainfrom
jpeedikayil:jpeedikayil/profile-identity-safety

Conversation

@jpeedikayil

@jpeedikayil jpeedikayil commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Why

Profile names can contain surrounding whitespace or Unicode characters that do not render visibly. Exact string comparison can miss a name that should receive the existing public-key qualifier, leaving different identities with labels that look alike.

What

  • Trim projected profile names and use the existing handle/key fallback for layout, directional, and annotation controls.
  • Ignore default-ignorable characters, then trim whitespace, when comparing names against loaded verified names.

How

Keep the change in the shared kind-0 profile projection and profile directory. Apply the comparison to both verified and self-published names. Preserve displayed script joiners, variation selectors, and signed event content. Identity keys, authorization, and the contextual naming policy stay unchanged.

Risk

Ignoring joiners or selectors for comparison can add a qualifier to names that render differently. Qualification still depends on the verified profile being loaded; this does not provide general Unicode confusable detection.

Testing

Adds a compact Unicode matrix in the existing unit tests and one browser scenario; no browser cases were removed. The browser scenario checks the real Members → Profiles integration: a whitespace namesake shows its qualifier, keyboard activation opens the exact identity, and no event is published.

The new parser/directory regressions failed against the original production files and passed with the fix. The browser scenario was checked on the patched code only. The complete affected browser file passed in Chromium and WebKit with bin/pnpm test:browser profiles.spec.mjs --project chromium --project webkit --no-deps.

Human acceptance and native packaging remain pending.

Bigger picture

Builds on the verified-name qualification introduced in #2005. That change preserved scoped name disambiguation; this covers whitespace and default-ignorable differences in the shared profile directory.

Generated with Codex

@jpeedikayil
jpeedikayil marked this pull request as ready for review November 3, 2026 23:37
@jpeedikayil
jpeedikayil requested a review from a team as a code owner November 3, 2026 23:37
@jpeedikayil

Copy link
Copy Markdown
Contributor Author

@shellz-n-stuff if you can review

@shellz-n-stuff shellz-n-stuff left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kazemek21 kazemek21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kyle reviewed this PR and the Nexus review-tracker notes and approved with no comments.

Posted by Codex (gpt-6.1-sol) on behalf of kylez

Compare names without default-ignorable characters and surrounding
whitespace. Use existing fallbacks for layout and directional controls,
while preserving script joiners, variation selectors, and signed events.

Co-authored-by: Codex <[email protected]>
Signed-off-by: Josiah Peedikayil <[email protected]>
@jpeedikayil
jpeedikayil force-pushed the jpeedikayil/profile-identity-safety branch from 13d58ef to 677743e Compare November 5, 2026 18:21
@shellz-n-stuff
shellz-n-stuff merged commit a49d196 into block:main Nov 5, 2026
50 checks passed
wpfleger96 added a commit that referenced this pull request Nov 5, 2026
…-service

* origin/main: (29 commits)
  Normalize profile names for verified-name matching (#2348)
  Add BuzzTerm font settings and compact glyph spacing (#2502)
  feat(plugins): let a host command run only verified bytes (#2535)
  NEXUS-4228: Add plugin toolbar actions and panel links (#2645)
  Keep plugin update controls stable and spaced (#2636)
  feat(inbox): rename to Activity and simplify the filter bar (#2543)
  fix(goose): track every replaced protected worker and check its security gate (#2528)
  docs(agents): say Pi agents don't take plugin notes yet (#2534)
  feat(agents): reorder agent cards with hold and drag (#1837)
  fix(messages): keep own sends from before the loaded history off the timeline (#2525)
  feat(github): rework the GitHub settings page (#2450)
  fix(mcp): accept create scopes in durable approvals (#2650)
  feat(bestie): Bestie tab and Remembers you for a hosted Bestie (#2478)
  fix(relay): p-tag a one-to-one DM's agent partner on new messages (#2475)
  fix(agents): show each message author's username and display name (#2628)
  fix(agents): preserve visible edits in conversation history (#2355)
  fix(canvas): keep todo edits from approving unrelated instructions (#2350)
  fix(messages): keep messages in their canonical channel (#2349)
  NEXUS-4165: Add Thinking to agent creation (#2409)
  feat(plugins): let a plugin paint a backdrop behind the shell (#2437)
  ...

# Conflicts:
#	src/bundled/goose/runtime.ts
wpfleger96 added a commit that referenced this pull request Nov 5, 2026
…leanup

* origin/main:
  Normalize profile names for verified-name matching (#2348)
  Add BuzzTerm font settings and compact glyph spacing (#2502)
  feat(plugins): let a host command run only verified bytes (#2535)
  NEXUS-4228: Add plugin toolbar actions and panel links (#2645)
  Keep plugin update controls stable and spaced (#2636)
  feat(inbox): rename to Activity and simplify the filter bar (#2543)

# Conflicts:
#	src/bundled/inbox/InboxPage.test.tsx
#	tests/browser/inbox-archive.spec.mjs
#	tests/fixtures/profiles.tsx
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.

3 participants