Skip to content

fix(settings): refine claude and typesafe key setup dialogs - #3391

Merged
tellaho merged 17 commits into
mainfrom
tho/claude-key-layout
Nov 13, 2026
Merged

tellaho merged 17 commits into
mainfrom
tho/claude-key-layout

Conversation

@tellaho

@tellaho tellaho commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Category: improvement

User Impact: Claude and TypeSafe key setup provides focused inputs and direct key-creation links; Claude preserves unsaved drafts when its storage check fails.

Problem: Initial Claude key entry occupies the Settings pane and repeats its label. Key setup needs concise instructions, consistent spacing, normal Back/Forward behavior and recovery that preserves unsaved drafts.

Solution: Open initial Claude key entry from Set in Connect Claude, matching TypeSafe. Keep one sentence on the Claude page, console links in both popups and storage reassurance below the fields. Preserve inline replacement and shared credential controls. Keep Claude drafts recoverable through failed storage checks.

Changes

File changes

src/bundled/claude-code/ClaudeSettings.tsx
Open Set in Connect Claude and preserve its draft through passive traversal and failed credential reads. Keep the input focused but read-only during verification, with error and Retry inside the dialog; retire setup on explicit dismissal or confirmed saved credentials.

src/bundled/claude-code/auth.tsx
Use the shared key form with storage guidance beneath it, retain its state outside the popup lifetime and forward the caller's read-only verification gate.

src/features/settings/ApiKeyForm.tsx
Add an optional read-only mode that retains keyboard focus. Existing callers keep their default input behavior.

src/bundled/claude-code/index.ts
Register the connect route with the existing Settings navigation owner; history holds only a presentation marker.

src/bundled/claude-code/tabs.tsx
Use compact spacing in existing key-entry dialogs.

src/app/DecisionsSettings.tsx
Provide TypeSafe's direct console link and focus editable inputs while leaving readonly saved-key actions closed.

src/bundled/claude-code/ClaudeSettings.test.tsx
Cover links, storage guidance, pending-save traversal, draft dismissal, focus and read-error recovery with the restored draft preserved through Retry.

src/bundled/claude-code/index.test.ts
Exercise the registered card's open, Back/Forward and dismissal wiring through the real navigation controller.

src/app/DecisionsSettings.test.tsx
Use one real-component journey for TypeSafe's editable and unreadable focus states, dismissal and successful provider selection.

src/bundled/claude-code/tabs.test.tsx
Align setup copy expectations with the separate storage guidance.

src/bundled/typesafe/README.md
Document the key-creation link.

docs/buzz-help.md
Describe both setup dialogs and Claude's history/draft behavior.

Reproduction steps

  1. Open Settings → Claude without a saved key and choose Set. Connect Claude focuses its input and links to Anthropic's API-key settings.
  2. Enter a draft, go Back and Forward within the Claude page, and confirm the draft returns. Explicitly close and reopen to confirm it is cleared. A dismissed visit must not reopen through Forward.
  3. With Builderlab selected in Settings → Decisions API, choose TypeSafe without a key. Its dialog focuses the input and links to the TypeSafe keys page. Closing retains Builderlab; successful setup completes the switch.
  4. With an unreadable saved TypeSafe key, open setup and confirm the saved-key menu stays closed until requested. Replace keeps autofocus on its editable input.
  5. During a pending credential recheck, confirm Claude's key input keeps focus but cannot be edited. If secure-storage access fails, the dialog should retain its draft, show the error and offer Retry. After a successful missing-key check, editing resumes with the same draft; finding an existing key closes setup. The subtitle stays neutral while status is unknown.

Validation

  • Head 9193df13ad23ecac396523bbc0c5e50f63db0634: typecheck and all 43 affected tests pass (18 Claude Settings, 10 TypeSafe, 15 Decisions Settings). Mandatory type/related-unit-test, design, Rust clippy and push checks pass; hosted CI provides broader integration coverage.
  • The existing routed test cases now hold the read with a deferred promise, verify autofocus and blocked typing, then cover confirmed saved credentials or a failed read followed by Retry with the same draft. No new test cases or browser journeys were added.
  • Test-runner-only mutations confirm the recovery case fails if read errors dismiss setup, and both pending-read cases fail if the input lock is removed. Production source was never edited for these probes.
  • Relative to integrated main ae2a0899a39288920bae2425c7d4f25174e48bd9 (feat(decisions): guide TypeSafe setup and align API key controls #3365), the PR adds 282 test lines and 301 non-test lines (48.4% tests). Changed lines total 326 test / 390 non-test across twelve files.
  • The current read-error recovery state has component-test evidence. A native walkthrough and new capture remain pending: the previously running debug build and frontend server exited during inspection. No credentials were changed, and no substitute capture was created.
  • Earlier native captures below document the normal layout, links and input focus, before this recovery change. External link navigation, native replacement/writes, narrow-width, enlarged-text and light-theme checks remain pending.

Screenshots

Actual native app captures, cropped to Settings content. Claude captures are from 05eeebc49; TypeSafe is from 4ddfd2434. They document the layout and copy; current traversal and unreadable-key behavior are covered by the tests below.

Claude settings
Claude page with its one-sentence introduction
Connect Claude Connect TypeSafe
Claude key popup TypeSafe key popup with console link

tellaho and others added 9 commits November 11, 2026 23:43
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Preserve shared API key controls and the Claude setup dialog; use compact spacing for existing key-entry dialogs.

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
@tellaho tellaho changed the title fix(claude): open api key setup in a compact dialog fix(settings): refine claude and typesafe key setup dialogs Nov 12, 2026
@tellaho
tellaho marked this pull request as ready for review November 12, 2026 22:38
@tellaho
tellaho requested a review from a team as a code owner November 12, 2026 22:38
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Found a navigation-history defect and two smaller setup-dialog issues.

Comment thread src/app/DecisionsSettings.tsx Resolved
tellaho and others added 4 commits November 12, 2026 15:50
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
@tellaho

tellaho commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Consolidated the key-setup regressions in dddc7229e2bd3cd399ae26ee4c5304924630a6d4; production code is unchanged.

  • Added test lines: 262 → 211; non-test additions remain 272 (49.1% → 43.7% tests).
  • One real TypeSafe journey now covers missing-key autofocus, close/retained provider, unreadable-key default focus with no menu, and readiness. Affected cases: 39 → 38.
  • Removed the adapter's repeated generic history-skipping/reopen journey; the existing navigation-controller dismissal test covers that contract. The adapter still verifies its own route, Back/Forward and dismissal. Pending-save recovery and both unknown-status checks remain.

At this head, all 38 tests in the three affected files pass, plus mandatory type/related-unit-test, design, Rust clippy and push checks. Existing native traversal limitations remain documented in the description. The PR stays ready for review.

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Two regression-test coverage gaps remain; no current product defect was established.

Comment thread src/app/DecisionsSettings.test.tsx Resolved
tellaho and others added 2 commits November 12, 2026 16:33
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>

@kazemek21 kazemek21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kyle reviewed the PR and the Nexus review-tracker notes and approves, with the non-blocking suggestion below.

Posted by Codex (gpt-6.1-sol) on behalf of kylez

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <[email protected]>
@tellaho
tellaho merged commit 2e6fe9e into main Nov 13, 2026
64 checks passed
@tellaho
tellaho deleted the tho/claude-key-layout branch November 13, 2026 18:21
joshfriend added a commit that referenced this pull request Nov 13, 2026
* origin/main: (153 commits)
  feat(agents): preview where interrupted agents were working before resume (#3494)
  perf(messages): close the editor and delete dialog on submit (#3493)
  feat(messages): quote selected message text into the composer (#2392)
  perf(toast): scope docked clearance to the toast host (#3489)
  fix(unread): undo exact captured ordinary reads conditionally (#3473)
  fix(solo): keep navigation responsive during chat deletion (#3488)
  fix(channels): keep custom thread tab names until the tab closes (#3458)
  perf(relay): verify cached history in the native host (#3426)
  fix(settings): refine claude and typesafe key setup dialogs (#3391)
  Update bundled help for Bestie and agent settings (#3194)
  feat(profiles): share and show a local time zone (#3332)
  Revert "feat(link-previews): unfurl web links below messages by default" (#3480)
  Show disabled plugin chats in Solo (#3456)
  perf(messages): host one context menu per message list (#3465)
  test(claude): keep the quit-release test copy above the minimum version (#3477)
  fix(profiles): restore verified names from the device cache (#3382)
  fix(mentions): show addressed agents first in Solo audience picker (#2856)
  perf: count member access once and scope find highlights to painting (#3464)
  perf(messages): prepare a message once for its renderer and link previews (#3466)
  fix(composer): speed up long pastes and paste office text as text (#3441)
  ...

# Conflicts:
#	docs/plugin-authoring-guide.md
joshfriend added a commit that referenced this pull request Nov 13, 2026
…when-ready

* origin/main: (21 commits)
  fix(agents): report a conversation wake that fails before its turn starts (#2192)
  fix(usage): read Claude transcripts over 50 MB a page at a time (#3498)
  feat(agents): preview where interrupted agents were working before resume (#3494)
  perf(messages): close the editor and delete dialog on submit (#3493)
  feat(messages): quote selected message text into the composer (#2392)
  perf(toast): scope docked clearance to the toast host (#3489)
  fix(unread): undo exact captured ordinary reads conditionally (#3473)
  fix(solo): keep navigation responsive during chat deletion (#3488)
  fix(channels): keep custom thread tab names until the tab closes (#3458)
  perf(relay): verify cached history in the native host (#3426)
  fix(settings): refine claude and typesafe key setup dialogs (#3391)
  Update bundled help for Bestie and agent settings (#3194)
  feat(profiles): share and show a local time zone (#3332)
  Revert "feat(link-previews): unfurl web links below messages by default" (#3480)
  Show disabled plugin chats in Solo (#3456)
  perf(messages): host one context menu per message list (#3465)
  test(claude): keep the quit-release test copy above the minimum version (#3477)
  fix(profiles): restore verified names from the device cache (#3382)
  fix(mentions): show addressed agents first in Solo audience picker (#2856)
  perf: count member access once and scope find highlights to painting (#3464)
  ...
joshfriend added a commit that referenced this pull request Nov 13, 2026
…n-on-github

* origin/main: (21 commits)
  fix(agents): report a conversation wake that fails before its turn starts (#2192)
  fix(usage): read Claude transcripts over 50 MB a page at a time (#3498)
  feat(agents): preview where interrupted agents were working before resume (#3494)
  perf(messages): close the editor and delete dialog on submit (#3493)
  feat(messages): quote selected message text into the composer (#2392)
  perf(toast): scope docked clearance to the toast host (#3489)
  fix(unread): undo exact captured ordinary reads conditionally (#3473)
  fix(solo): keep navigation responsive during chat deletion (#3488)
  fix(channels): keep custom thread tab names until the tab closes (#3458)
  perf(relay): verify cached history in the native host (#3426)
  fix(settings): refine claude and typesafe key setup dialogs (#3391)
  Update bundled help for Bestie and agent settings (#3194)
  feat(profiles): share and show a local time zone (#3332)
  Revert "feat(link-previews): unfurl web links below messages by default" (#3480)
  Show disabled plugin chats in Solo (#3456)
  perf(messages): host one context menu per message list (#3465)
  test(claude): keep the quit-release test copy above the minimum version (#3477)
  fix(profiles): restore verified names from the device cache (#3382)
  fix(mentions): show addressed agents first in Solo audience picker (#2856)
  perf: count member access once and scope find highlights to painting (#3464)
  ...
joshfriend added a commit that referenced this pull request Nov 13, 2026
* origin/main: (31 commits)
  Let plugin panels name their tab with panels.useTabTitle (#3251)
  fix(agents): report a conversation wake that fails before its turn starts (#2192)
  fix(usage): read Claude transcripts over 50 MB a page at a time (#3498)
  feat(agents): preview where interrupted agents were working before resume (#3494)
  perf(messages): close the editor and delete dialog on submit (#3493)
  feat(messages): quote selected message text into the composer (#2392)
  perf(toast): scope docked clearance to the toast host (#3489)
  fix(unread): undo exact captured ordinary reads conditionally (#3473)
  fix(solo): keep navigation responsive during chat deletion (#3488)
  fix(channels): keep custom thread tab names until the tab closes (#3458)
  perf(relay): verify cached history in the native host (#3426)
  fix(settings): refine claude and typesafe key setup dialogs (#3391)
  Update bundled help for Bestie and agent settings (#3194)
  feat(profiles): share and show a local time zone (#3332)
  Revert "feat(link-previews): unfurl web links below messages by default" (#3480)
  Show disabled plugin chats in Solo (#3456)
  perf(messages): host one context menu per message list (#3465)
  test(claude): keep the quit-release test copy above the minimum version (#3477)
  fix(profiles): restore verified names from the device cache (#3382)
  fix(mentions): show addressed agents first in Solo audience picker (#2856)
  ...
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.

3 participants