docs: multi-account NostrConnect spec + Phase 1 implementation plan - #53
Merged
Conversation
Two-phase design. Phase 1 promotes Connect from a HomeView sheet to a top-level cross-account MainTabView tab and unifies account binding through one ConnectAccountPicker (single-select, no protocol changes). Phase 2 extends NostrConnect with an `accounts=multi` URI opt-in that lets one client pairing produce N parallel signer sessions, motivated by Tableau's TweetDeck-style multi-column reader. No code changes; spec only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mechanical fixes: - Fix invalid `.multi(min: 1, max: nil)` reference (Mode enum has no associated values) → `.multi` - Acknowledge supersession of 2026-05-04 segmented-control redesign - Make explicit that multi mode writes N `ClientPermissions` rows, one per `(signer, client)` composite key - Strengthen Tableau-side phrasing: confirm nostr-tools stack, point at the existing `client.signers` Map as the integration target, defer Tableau plan to its own slice in /Users/danielwyler/tableau/ Decision reflections: - Decision 1: Picker → ApprovalSheet stays a two-step flow in multi mode. Picker has "Continue with N accounts" button, ApprovalSheet has "Approve N accounts" button. Adds an explicit "NostrConnect flow in multi mode" subsection. - Decision 2: Phase 1 adopts the `signerPubkeys: [String]` / `HandshakeResult` signature with always-1-element semantics. Adds a new "handleNostrConnect signature adoption" subsection in Phase 1; Phase 2's handleNostrConnect section reframes to focus on the N>1 path (no API reshape). - Decision 3: Tableau-side plan deferred. Scope-boundary callout in Phase 2 acceptance criteria points at Tableau's separate plan cycle in /Users/danielwyler/tableau/docs/superpowers/plans/. No code changes; spec only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
26-task per-phase plan for the spec at docs/superpowers/specs/2026-05-10-multi-account-nostrconnect-design.md. Phase 1 (tasks 1-14): Connect tab restructure + picker unification. 14 tasks producing a self-contained UX/IA refactor with no protocol changes. Lands HandshakeResult value type, refactors handleNostrConnect to array signature (always 1-element in Phase 1), moves Connect from HomeView sheet to top-level MainTabView tab, unifies ConnectAccountPicker across all 3 entry paths (in-app NostrConnect, in-app bunker, deeplink). Ends with a separate PR branched off main (feat/connect-tab-restructure). Phase 2 (tasks 15-26): accounts=multi protocol opt-in. 12 tasks adding the URI flag to the parser, multi-mode picker rendering with cap pre-flight, enriched JSON connect-ack result, per-iteration progress UI, partial-failure UX with per-row retry, and ecosystem documentation. Tableau-side work is documented as scope-boundary referencing a separate plan in /Users/danielwyler/tableau/. Each task is TDD-shaped (failing test → implementation → green → commit) with exact file paths, complete code snippets, and verification commands. Plan ends with execution handoff to superpowers:subagent-driven-development. No code changes; plan only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Docs-only PR — adds the spec and plan documents that drove the Phase 1 implementation (now on main via #52). Lands them in the canonical
docs/superpowers/specs/anddocs/superpowers/plans/directories alongside the existing historical specs.Files
docs/superpowers/specs/2026-05-10-multi-account-nostrconnect-design.md— design spec covering Phase 1 (Connect tab + picker unification) and Phase 2 (accounts=multiURI opt-in + N-up handshake). Includes Backwards-compat matrix, risks, Tableau-side scope boundary.docs/superpowers/plans/2026-05-10-multi-account-nostrconnect-plan.md— 26-task per-phase implementation plan, TDD-shaped (failing test → implementation → green → commit) with exact file paths, complete code snippets, and verification commands.3 commits on the branch (initial spec, cleanup pass with 3 locked decisions, plan added). No code changes — purely additions to
docs/.Why now
The implementation PR (#52) shipped without these documents because they were authored on a parallel
spec/multi-account-nostrconnectplanning branch and weren't bundled with the implementation. Landing them now keeps the historical record complete in their canonical location.Related
accounts=multiprotocol opt-in described in §"Phase 2" of the spec) will land in a separate PR once Tableau's parallel implementation is ready🤖 Generated with Claude Code