Skip to content

feat(web): show who wrote what — 7…5 ids, full-id identicons and role badges - #368

Merged
PastaPastaPasta merged 10 commits into
masterfrom
feat/e4-identity-display
Oct 5, 2026
Merged

PastaPastaPasta merged 10 commits into
masterfrom
feat/e4-identity-display

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

What

Part 1 of epic E4 "Who is this" (TS-02). You can now tell who wrote something:

  • Ids show both ends. Identity and document ids appear as their first 7 and last 5 characters (G6D3ejK…hgEQH) everywhere one was shown as a prefix. That covers pills, confirm dialogs, assignee labels, fork labels, private-repo errors, the spend panel, the sign-in pickers, page titles, and Oid for any base58 Platform id (Settings, profile, repo settings).
  • Identicons from the whole id. Every identity pill and assignee avatar draws the 5×5 identicon of SHA-256 of the full id. Before, it drew an initial on a hue from a 31-multiplier hash. The default profile avatar is now the same identicon. A profile identicon:<seed> whose seed is another identity's id draws the profile's own pattern, so nobody can borrow a maintainer's picture.
  • Role badges. On issue and pull-request pages, each byline for an issue, PR, comment or review shows Owner, Maintainer, Writer, Triage or Reader. The role comes from the repository's current membership documents, which are read with proofs. Imported items, whose author is the original GitHub user, show no badge.

Why

An identity id is a hash of the asset lock that funded it, so an attacker can grind funding transactions offline until the first 7 characters match a maintainer's (58⁷ tries) and broadcast only the winner. The pill showed exactly those 7 characters on a picture derived from the same id, and nothing marked a maintainer's comment. A fake "maintainer" comment looked identical to a real one. Matching the last 5 characters and the identicon as well is out of reach, and the badge comes from a document only the owner can write.

The badge uses current membership, the set every approval and moderation rule already reads, rather than each document's asMember proof. asMember proves membership only at write time, admits any role, and is optional on comments. A badge from it would keep showing on a former member and miss members who did not attach it.

How tested

  • vitest: shortId, authorRoles (owner beats a maintainer document, a former member shows none), RoleBadge/provider, ProfileAvatar (default identicon, borrowed seed refused), and the contrast test (identicon fill vs white and vs the #f3f4f6 tile, 3:1 for graphics). I updated the sign-in message and target-rail tests for the new id form. tsc and eslint are clean. A full run of the suite on a heavily loaded machine passed except for 4 timeouts in key-derivation tests, which passed when re-run alone.
  • I checked a static export built for sakura against the live chain:

Screenshots: /Users/pasta/workspace/dash-forge-qa/evidence/p0/e4/

Limits

  • Badges appear on issue and PR pages, not on lists, the inbox or timeline event rows (GitHub shows them on comments only).
  • No "Contributor" or "First time here" badges yet.
  • dg already prints full identity ids, so nothing changed there.

🤖 Generated with Claude Code

PastaPastaPasta and others added 3 commits October 4, 2026 11:45
… badges

An identity id is a hash an attacker can grind until its first characters match a maintainer's, and the pill showed only those characters on an initial swatch. Identity ids now show their first 7 and last 5 characters everywhere (shortId, Oid included), every pill and assignee avatar draws the identicon of SHA-256 of the whole id, and issue and pull request bylines carry an Owner/Maintainer/Writer/Triage/Reader badge from the repository's proved membership documents.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A profile's identicon seed that is another identity's id now draws the profile's own pattern, so no one can borrow a maintainer's picture. The empty-repo heading keeps DPNS names whole, the private-repo errors and pack-copy errors name ids by both ends, Oid callers drop the ignored length, the identicon hashes its seed once, and the contrast test checks the fill on the identicon's own tile.

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 43 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: 87c9cafd-bec0-4218-ae7f-485b10e07f34
📥 Commits

Reviewing files that changed from the base of the PR and between 7177d17 and ed1f6e3.

📒 Files selected for processing (52)
  • crates/forge-core/src/rules/profile.rs
  • docs/contracts/forge-v2.md
  • docs/design/style-guide.md
  • docs/guides/identity-and-keys.md
  • forge-web/app/settings/page.tsx
  • forge-web/components/author.tsx
  • forge-web/components/login-modal.tsx
  • forge-web/components/profile-content.tsx
  • forge-web/components/profile-settings.tsx
  • forge-web/components/repo/author-roles.test.tsx
  • forge-web/components/repo/author-roles.tsx
  • forge-web/components/repo/byline.tsx
  • forge-web/components/repo/fork-sync.tsx
  • forge-web/components/repo/invite-banner.tsx
  • forge-web/components/repo/issue-bits.tsx
  • forge-web/components/repo/issue-content.tsx
  • forge-web/components/repo/new-pull-content.tsx
  • forge-web/components/repo/private-members.tsx
  • forge-web/components/repo/pull-content.tsx
  • forge-web/components/repo/pull-diff.tsx
  • forge-web/components/repo/repo-header.tsx
  • forge-web/components/repo/repo-home-content.tsx
  • forge-web/components/repo/repo-settings-sections.tsx
  • forge-web/components/repo/reviewers-card.tsx
  • forge-web/components/repo/settings-content.tsx
  • forge-web/components/repo/target-rail.test.tsx
  • forge-web/components/repo/target-rail.tsx
  • forge-web/components/repo/webhook-settings.tsx
  • forge-web/components/spend-panel.tsx
  • forge-web/components/ui/identicon.tsx
  • forge-web/components/ui/identity-pill.tsx
  • forge-web/components/ui/oid.tsx
  • forge-web/components/ui/profile-avatar.test.tsx
  • forge-web/components/ui/profile-avatar.tsx
  • forge-web/lib/auth/controller.ts
  • forge-web/lib/auth/encryption-key.ts
  • forge-web/lib/auth/limited-key.ts
  • forge-web/lib/auth/responder-profile.ts
  • forge-web/lib/auth/signin-messages.test.ts
  • forge-web/lib/design/avatar.ts
  • forge-web/lib/design/contrast.test.ts
  • forge-web/lib/design/identicon.ts
  • forge-web/lib/page-title.test.ts
  • forge-web/lib/page-title.ts
  • forge-web/lib/repo/private-members.ts
  • forge-web/lib/repo/private-rotation.test.ts
  • forge-web/lib/rules/profile.ts
  • forge-web/lib/utils.test.ts
  • forge-web/lib/utils.ts
  • forge-web/lib/view/author-role.test.ts
  • forge-web/lib/view/author-role.ts
  • forge-web/lib/view/browse-source.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 and others added 7 commits October 4, 2026 12:45
…splay

# Conflicts:
#	forge-web/components/repo/settings-content.tsx
#	forge-web/components/repo/webhook-settings.tsx
#	forge-web/lib/auth/controller.ts
#	forge-web/lib/auth/signin-messages.test.ts
Issue and PR pages keep master's full-width layout inside AuthorRolesProvider; the style guide keeps this branch's identity pill and master's line-icon backend badge.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Brings #390's contract snapshot (sakura runs UPDATE-1) and the latest master; conflicts resolved keeping both sides.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit ec2fd8a into master Oct 5, 2026
34 checks passed
@PastaPastaPasta
PastaPastaPasta deleted the feat/e4-identity-display branch October 5, 2026 09:15
PastaPastaPasta added a commit that referenced this pull request Oct 5, 2026
limited-key.ts keeps the key lifetimes; its prefix-only shortId gives way to master's 7…5 shortId from lib/utils (#368).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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