You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 303c90f
Browse filesBrowse the repository at this point in the historyBrowse files
Two independent-review P2 follow-ups on the D1b hosted-identity repair
(#7489).
The settings card's community rows keyed Connect enablement on
!identityMismatch alone, so an authenticated account whose identity
object was absent (fresh link, or a refresh after unpair/failed rebind)
still rendered — and invoked — Connect for its owned communities, since
mismatch is false when identity is null. Require a usable bound key in
the row's canConnect and guard the invocation callback, so Connect
cannot occur without a binding the action would act on; the community
list, linking, and delete+rebind recovery stay available.
usableBoundIdentityNpub delegated operational usability to the display
parser canonicalNpub, which accepts npub strings and padded hex, while
all three consumers compared raw lowercased pubkey_hex — so a payload
the helper called usable could display the device's own key yet demand a
destructive delete/rebind, and an npub stored in the hex field read as a
usable binding whenever the local comparison was skipped. Define one
hex-only normalized bound-key form (normalizedBoundKeyHex: trim +
lowercase + 64 hex chars, npub rejected), use it for usability and both
sides of every comparison in all three consumers, and derive the
display npubs from the same normalized keys; the general display helper
keeps its intentional npub support.
Tests: helper unit tests pin npub-in-hex rejection and same-key
normalization; the unlinked-account settings regression (already
seeding a community) now asserts Connect cannot occur; browser specs add
padded same-key (ready, Connect kept — no false rebind) and npub-in-hex
(recovery, neutral label, no Connect) cases across the settings card,
the create flow, and first-community onboarding, preserving the
existing mismatch/rebind recovery assertions.
Validation: focused helper suite 8/8; just desktop-typecheck; just
desktop-check (formatting fixed narrowly with biome check --write on
the touched files only); full desktop unit package 6,477/6,477;
affected browser workflows on a fresh dedicated port: add-community +
hosted-communities-settings specs 18/18, onboarding integration spec
69/69.
Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <[email protected]>
0 commit comments