镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

refactor(settings): move external identity authorization to security - #3032

Merged
baxen merged 2 commits into
mainfrom
tho/external-identity-security
Nov 9, 2026
Merged

baxen merged 2 commits into
mainfrom
tho/external-identity-security

Conversation

@tellaho

@tellaho tellaho commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Category: improvement
User Impact: Users can authorize an external application's identity in Settings → Buzz → Security, alongside paired command-line tools.

Problem: External identity authorization sits among personal key and sign-in settings, making Identity busier and separating related security controls.

Solution: Move the existing form into Security. Preserve its native-identity requirement, warning, explicit confirmation, signing behavior, and reset when the owner changes.

Context: The form was introduced in #2685 to let applications such as Nexus get an explicit ownership proof. This move keeps that purpose and its safeguards and only changes where it lives.

Changes

File changes

src/app/IdentitySettings.tsx
Remove the external authorization section.

src/app/SecuritySettings.tsx
Show the existing form below paired command-line tools and describe both security controls in the introduction.

src/app/Settings.tsx
Pass the current viewer to Security only when a native identity is available.

src/app/ExternalIdentityAuthorization.tsx
Point the identity-change recovery message to Security.

src/app/ExternalIdentityAuthorization.test.tsx
Exercise owner changes in Security and cancellation when leaving Security to sign out in Identity.

src/app/SecuritySettings.test.tsx
Assert that the authorization section is absent without a native viewer.

docs/buzz-help.md
Update the user-facing settings path.

docs/identity.md
Update the external identity authorization documentation.

Reproduction steps

  1. Open Settings → Buzz → Identity in a native desktop build. External identity authorization is absent.
  2. Open Security. Find “Authorize external identity” below “Paired command-line tools,” including when no tools are paired.
  3. Enter an application's public key and choose “Authorize identity.” Check the exact identity and unchanged warning; Cancel must create no proof.
  4. Choose “Authorize this key” to generate the ownership proof. Confirm copying and editing the application key still behave as before.

Validation

  • At 57434713d: pre-commit formatting/lint/icons and secret scan passed; pre-push TypeScript, related Vitest tests, and design checks passed. git diff --check passed on the clean committed tree. Native layout was checked in dark mode at 1280×795, with no paired tools. Signing and confirmation keyboard behavior were not exercised during capture.
  • Changed lines (additions + deletions): 22 tests; 27 non-test (23 source, 4 documentation). Tests are 44.9% of the diff.
  • No browser journeys added or removed.
  • Independent review passed at this head. Populated paired tools, confirmation focus/Escape, light/narrow/enlarged-text checks, and human acceptance remain pending.

Screenshots

Real native macOS app. Before uses the UI files from base 5b7df025f; after uses 57434713d. Account and workspace details are cropped out. The private key remains masked by the app. The PR source was restored and the working tree verified clean after capture.

Before — Identity, scrolled to the form After — Security
External identity authorization below Sign out in Identity External identity authorization below paired tools in Security

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho

tellaho commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Review round 1

Posted by Princess Donut, an AI review agent, on Taylor's behalf. Reviewed commit eb9a45b56 against main at 5b7df025f.

Verdict: nothing blocks this. Change the one Medium copy issue before marking it ready.

Checked and unchanged from main

  • Form, warning, confirmation and signing. The component itself is unchanged except for one error message, which now says "Reopen Security settings". The form still signs nothing when it opens or when the key changes. It still rejects your own key and malformed keys, and the confirmation still shows the exact npub with Cancel focused. The owner check after signing and the aborted request on unmount are unchanged too.
  • Native-identity gate. Main showed the form only when both a native identity and a viewer key existed. Security now receives the viewer key only when a native identity exists, and shows the form only when that key is present, so the condition is the same. Security itself appears only in the desktop app.
  • Reset when the viewer key changes. The form is still keyed by the viewer key, so a different owner gets a fresh, empty form and any signing in progress is cancelled. Security itself no longer resets on owner change, but nothing else there needs it. The moved test covers this.
  • Identity, including during sign-out. Identity no longer mounts the form. Sign-out is started only from Identity, and Settings mounts Security only while that section is selected. So the form is unmounted and its signing request cancelled before sign-out can begin, and the old guard has nothing left to protect. The rewritten test switches from Security to Identity while signing is in progress, signs out, and confirms the late result is thrown away.
  • Escape and focus. Settings is still the parent dialog and the confirmation is unchanged. No Escape or focus handling specific to Security was added.
  • Help docs. Both references now point to Security. I found no other reference to the old location in the docs or app source.
  • The three affected test files pass locally: 56 tests.

Findings

  1. Medium (copy on a security screen): the new Security subtitle promises more than the page can do. "Manage tools and applications that can act as you" suggests you can review or revoke the external applications you authorized. You can't: the page creates an ownership proof but never lists or revokes one, and the proof has no time or event-kind limits. Someone who comes back to undo an authorization will find nothing to manage. The new subtitle also drops "on this device", which told people that paired tools belong to this device. Suggested subtitle: "Tools paired on this device, and applications you authorize to act as you."
  2. Low (test coverage): the native-identity gate in Security has no test. No test confirms that Security without a native identity omits the form; the existing Security tests render it that way but never check. One assertion would keep the form from leaking onto that page.

Still pending (not covered by this review)

  • A real native-app check of the layout below "Paired command-line tools", both with tools listed and when the list is empty, plus the confirmation's focus and Escape. The code shows no reason for these to regress, but I haven't seen them in the running app.

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho

tellaho commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Review round 2

Posted by Princess Donut, an AI review agent, on Taylor's behalf. I reviewed only the fix commit 57434713d (compared with eb9a45b56).

Verdict: both round 1 findings are fixed, and the fix introduces no new issues.

  • Medium (Security subtitle): fixed. It now reads "Tools paired on this device, and applications you authorize to act as you." The wording no longer suggests you can revoke authorizations, and "on this device" is back for paired tools. The old wording isn't left anywhere in the app source or docs.
  • Low (missing test): fixed. The existing test renders Security without a native identity and now also checks that the "Authorize external identity" heading is absent. That heading text matches the form's real title exactly. So if the form's own check were removed, the form would render and the test would fail. The Settings line that passes in the viewer only when a native identity exists is still untested. That's a one-line condition and doesn't block anything.
  • The commit changes only those two lines. The Security and external identity test files pass locally (16 tests).

Still pending: the real-app checks from round 1, which cover the layout under "Paired command-line tools", and focus and Escape in the confirmation.

@tellaho
tellaho marked this pull request as ready for review November 9, 2026 00:21
@tellaho
tellaho requested a review from a team as a code owner November 9, 2026 00:21
@baxen
baxen merged commit c9239f7 into main Nov 9, 2026
43 checks passed
@baxen
baxen deleted the tho/external-identity-security branch November 9, 2026 00:38
tlongwell-block added a commit that referenced this pull request Nov 9, 2026
…uctions

* origin/main:
  refactor(settings): move external identity authorization to security (#3032)
  test(typeahead): serve the fixture pages as a build so cold loads fit (#2793)
  feat(channels): list unread top-level mentions in sidebar Activity, and count only unread mentions on the Inbox card (#2722)
  fix(solo): delete a removed workspace's settings after the groups write (#2819)
  fix(solo): ask before dismissing chat and workspace settings drops edits (#2616)
  fix(messages): open the forwarded message from Forward's confirmation (#2802)
  fix(pairing): tell the tool why its relay was refused, and refuse at once when Buzz can't ask (#2823)
aharvard added a commit to aharvard/buzz-app that referenced this pull request Nov 9, 2026
Picks up c202642 (block#2837), which fixes the ThreadPanel catch-up test
that fails on every run of a merge with the older main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* origin/main: (155 commits)
  deps: accept RUSTSEC-2026-0459 for libsqlite3-sys 0.38, move rmcp to 3.9.0 (block#3077)
  fix(communities): accept invite links and bare hosts in Join a community (block#2412)
  fix(builderlab): open a remote agent's Activity on the conversation it was opened from (block#3051)
  refactor(builderlab): keep capabilities fresh in the session (block#3003)
  feat(moderation): show invite links as a QR code (block#3029)
  Keep Create agent's Model row readable and give Goose a Thinking row (block#2673)
  Join a community right after creating it in Settings (block#2991)
  Let new Solo chats start temporary by default (block#2874)
  fix(messages): fill a screen that a head of folded agent activity leaves empty (block#3037)
  fix(search): search saved conversations while the community is offline or connecting (block#2724)
  test(agents): make version-history date assertion time-zone independent (block#3010)
  feat(relay): gate artifact writers on NIP-AR support (block#2735)
  fix(channels): open the dock's community switcher from Personal space (block#2806)
  fix(members): keep the list's place after a member change (block#2818)
  fix(channels): keep a launcher's side panel open on Close all tabs (block#2803)
  fix(activity): show a remote agent's Buzz send as its reply (block#3025)
  refactor(settings): move external identity authorization to security (block#3032)
  test(typeahead): serve the fixture pages as a build so cold loads fit (block#2793)
  feat(channels): list unread top-level mentions in sidebar Activity, and count only unread mentions on the Inbox card (block#2722)
  fix(solo): delete a removed workspace's settings after the groups write (block#2819)
  ...

Signed-off-by: Andrew Harvard <aharvard@squareup.com>
gilgtm added a commit that referenced this pull request Nov 9, 2026
…pover-card-layout-7eeda1e0

* origin/main: (128 commits)
  deps: accept RUSTSEC-2026-0459 for libsqlite3-sys 0.38, move rmcp to 3.9.0 (#3077)
  fix(communities): accept invite links and bare hosts in Join a community (#2412)
  fix(builderlab): open a remote agent's Activity on the conversation it was opened from (#3051)
  refactor(builderlab): keep capabilities fresh in the session (#3003)
  feat(moderation): show invite links as a QR code (#3029)
  Keep Create agent's Model row readable and give Goose a Thinking row (#2673)
  Join a community right after creating it in Settings (#2991)
  Let new Solo chats start temporary by default (#2874)
  fix(messages): fill a screen that a head of folded agent activity leaves empty (#3037)
  fix(search): search saved conversations while the community is offline or connecting (#2724)
  test(agents): make version-history date assertion time-zone independent (#3010)
  feat(relay): gate artifact writers on NIP-AR support (#2735)
  fix(channels): open the dock's community switcher from Personal space (#2806)
  fix(members): keep the list's place after a member change (#2818)
  fix(channels): keep a launcher's side panel open on Close all tabs (#2803)
  fix(activity): show a remote agent's Buzz send as its reply (#3025)
  refactor(settings): move external identity authorization to security (#3032)
  test(typeahead): serve the fixture pages as a build so cold loads fit (#2793)
  feat(channels): list unread top-level mentions in sidebar Activity, and count only unread mentions on the Inbox card (#2722)
  fix(solo): delete a removed workspace's settings after the groups write (#2819)
  ...
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.

2 participants