Skip to content

Offer signing in or an API key at setup, either one enough - #290

Merged
alexkroman merged 1 commit into
mainfrom
setup-key-or-sign-in
Nov 3, 2026
Merged

alexkroman merged 1 commit into
mainfrom
setup-key-or-sign-in

Conversation

@alexkroman

@alexkroman alexkroman commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Where sign-in is configured (every release build since #265), a new install saw only Sign In: pasting an API key was treated as the legacy path and its row was hidden. Teams rolling Blurt out share one key rather than adding every member, engineer or not, to their AssemblyAI account. They were installing an old release to get past setup, and worried the key path would be dropped entirely.

What

Setup offers both, as one choice. With nothing connected, the AssemblyAI section is a single row:

👤 Connect to AssemblyAI                    [Use API Key…]  [Sign In…]
   Sign in, or use an API key. Either works.

Sign In… stays the filled, recommended action; Use API Key… opens the existing key sheet. One row with two buttons reads as pick one; the earlier two-row layout read as two steps.

Once connected, only the way in use shows. A pasted key gets its key row alone (••••4eab, Change…). A Sign In… beside it read as an unfinished step. Signed in shows "Signed in as …" and Sign Out, as before.

Under the hood

  • CredentialRows is now the layout itself: .choice, .keyRow(connectIsPrimary:) or .accountRow. The view switches on it instead of recombining flags, and the rule is unit-tested.
  • The choice wording lives in the engine beside APIKeyDisplay's.
  • The setup header ("Connect to AssemblyAI, then…") and the key sheet's first-run text no longer say one particular way is required.
  • New settled decision + guardrail: don't drop or hide pasting an API key in favour of sign-in.

Trade-off: a user who pasted a key can't switch to sign-in from this screen. If that's ever wanted, it belongs in the Change… sheet.

Testing

  • swift test (1002 tests), check-invariants.sh, and a Debug app build pass on this branch alone; the full scripts/check.sh passed on the combined working tree.
  • Checked by eye in Blurt Dev: the choice row on a fresh install. The key-row-alone layout after pasting a key is covered by the unit test but not yet looked at in the app.
  • The UI-test harness runs without sign-in, so the .choice row has no UI-test coverage.

🤖 Generated with Claude Code

A new install where sign-in is configured saw only Sign In: pasting a key
was treated as the legacy path and its row hidden. Teams rolling Blurt out
share one key rather than adding every member to their AssemblyAI account,
so they were sent back to old releases to get past setup.

- CredentialRows is now the layout itself: .choice, .keyRow, .accountRow.
  Nothing connected gives one "Connect to AssemblyAI" row with Use API Key…
  beside a filled Sign In… ("Sign in, or use an API key. Either works."),
  instead of two rows that read as two steps.
- Once connected, only the way in use shows: a pasted key's row alone (a
  Sign In… beside it read as a step still to do), or the signed-in account.
- The choice row's wording lives in the engine beside APIKeyDisplay's; the
  setup header and the key sheet no longer say a key or a sign-in is required.
- A settled decision and guardrail keep pasting a key from being dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alexkroman
alexkroman force-pushed the setup-key-or-sign-in branch from ebd4da4 to e56ea22 Compare November 3, 2026 21:47
@alexkroman
alexkroman enabled auto-merge (squash) November 3, 2026 22:07
@alexkroman
alexkroman merged commit 40332a5 into main Nov 3, 2026
13 checks passed
@alexkroman
alexkroman deleted the setup-key-or-sign-in branch November 3, 2026 22:22
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants