Skip to content

fix(desktop): satisfy pubkey-truncation guard in receipt + time machine UI - #4

Merged
elijamesku merged 1 commit into
eli/github-connectorfrom
eli/fix-pubkey-truncation-guard
Sep 17, 2026
Merged

elijamesku merged 1 commit into
eli/github-connectorfrom
eli/fix-pubkey-truncation-guard

Conversation

@elijamesku

Copy link
Copy Markdown
Owner

Why

PR #3's CI failed at Desktop Domain / Desktop Core → "Desktop lint and format" (just desktop-check). The repo's check:pubkey-truncation guard rejects ad-hoc pubkey.slice(0, N) display truncation because truncated hex prefixes are vanity-forgeable; identity display must go through truncateNpub / truncatePubkey / <PubKey>. Two of the new files hand-rolled it.

Because that step failed, the Tauri clippy/check/tests steps were skipped — this PR is what lets CI actually build the desktop crate with the Trust Receipts + Time Machine code.

Change

  • VerifyReceiptDialog.tsx: issuer + agent → truncateNpub
  • TimeMachineScreen.tsx: unnamed-author fallback → truncateNpub
  • Removed the two local shortKey helpers.

Verified locally

  • node scripts/check-pubkey-truncation.mjs — clean (was 2 violations)
  • node scripts/check-px-text.mjs — clean
  • biome check — clean
  • tsc --noEmit — clean

Test plan

  • CI Desktop Core: lint passes, then Tauri check/clippy/tests run and pass

The desktop-check guard rejects hand-rolled `pubkey.slice()` display
truncation (truncated hex prefixes are vanity-forgeable). Route the
receipt verifier's issuer/agent and the time machine's unnamed-author
fallback through the canonical `truncateNpub` instead. Unblocks the
Desktop Core CI job, which stopped at lint before the Tauri build.

Signed-off-by: Eli <elijamesau@gmail.com>
@elijamesku
elijamesku merged commit ad4d3da into eli/github-connector Sep 17, 2026
31 of 36 checks passed
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