Skip to content

feat: offer to open the token-creation page during token-based connects - #26

Merged
boristane merged 1 commit into
mainfrom
claude/connect-token-open-browser
Aug 12, 2026
Merged

feat: offer to open the token-creation page during token-based connects#26
boristane merged 1 commit into
mainfrom
claude/connect-token-open-browser

Conversation

@claude

@claude claude Bot commented Aug 11, 2026

Copy link
Copy Markdown

Requested by boris · Slack thread

Before

For token-based providers (e.g. polylane integration connect --type honeycomb), the wizard showed the provider instructions and the token-creation URL in a note, then went straight to a hidden input. It wasn't clear enough that the user has to go create an API token, and they had to copy the URL into a browser themselves.

After

The credential step now:

  1. Leads the note with "You need to create a credential and paste it here." above the existing provider-specific instructions and link.
  2. Asks "Open https://ui.honeycomb.io in your browser?" (Y/n, default yes) — confirming opens the browser directly at the provider's token-creation page via the existing openBrowser helper (same one the GitHub/Slack connect flow uses).
  3. Prompts for the paste with an explicit "…(paste it here)" label.

Non-TTY / --non-interactive behavior is unchanged (no prompts, no browser): the Missing required flag: --api-key error now just includes the token-creation URL as its hint.

How

Implemented once in secretStep (src/commands/helpers.ts), the shared wizard step behind every credential prompt — so it uniformly covers Honeycomb, Datadog (API + app keys), Axiom, Better Stack (all three tokens), Devin, Cursor, Factory, and the token-based cloud connect providers (Cloudflare, Fly.io, PlanetScale, Modal, Render, …). The per-provider token-creation URLs already existed in the codebase as SecretPromptOptions.link on every call site, so no new metadata or hardcoded map was needed. Ctrl+C/back on the new confirm behaves like backing out of the step, matching the existing wizard back-navigation.

Testing

  • npm run typecheck (against the live OpenAPI spec via codegen), npm run lint, npm test — all green (183/183 tests).
  • Non-interactive smoke test: integration connect --type honeycomb --region us --non-interactive errors with Missing required flag: --api-key and hint Open Honeycomb: https://ui.honeycomb.io — no prompt, exit non-zero.
  • Interactive pty smoke test (honeycomb): note with "You need to create a credential…" + instructions + URL, then the "Open … in your browser?" confirm (accepts y), then the hidden paste prompt — in that order.

🤖 Generated with Claude Code

https://claude.ai/code/session_01216vVfPt7yoPrJd6aMeBm7


Generated by Claude Code

Token-based integration and cloud connects (Honeycomb, Datadog, Axiom,
Better Stack, Devin, Cursor, Factory, Cloudflare, ...) now say explicitly
that a credential must be created and pasted, ask "Open <url> in your
browser?" (Y opens it directly at the provider's token-creation page via
the existing openBrowser helper), and then prompt for the paste. In
non-interactive mode nothing changes except the missing-flag error now
includes the token-creation URL as a hint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01216vVfPt7yoPrJd6aMeBm7
@boristane
boristane merged commit a156205 into main Aug 12, 2026
3 checks passed
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