Skip to content

feat(auth): add "press c to copy" for the device-login link - #772

Merged
soustruh merged 1 commit into
mainfrom
device-login-copy-link
Sep 16, 2026
Merged

soustruh merged 1 commit into
mainfrom
device-login-copy-link

Conversation

@soustruh

Copy link
Copy Markdown
Contributor

Why

For user convenience, and inspired by the Claude Code workflow, add an option to copy the device-login verification link with c. kbagent auth login (device flow) prints this URL for the user to open in a browser.

What

  • A dim Press c to copy the link prints under the panel. On c, the link goes to the clipboard and a green ✓ Copied to clipboard line prints below it.
  • The panel leads with the pre-filled link (the primary path) in cyan, the colour the hint reuses. The manual URL and code stay as the fallback.
  • The key read folds into the wait between device-token polls, so there is no background thread and no redraw.
  • The hint stays hidden off a terminal, under --json, or with no clipboard tool. Backends: pbcopy, clip, wl-copy, xclip, xsel, or clip.exe under WSL. No new dependency.

Device login only. serve --ui and lineage server could follow, but they run inside a blocking server loop and would need a background thread, so the added comfort may not be worth it. Tests cover detection, the gate, and copy on c.

For user convenience, and inspired by the Claude Code workflow, add an
opt-in way to copy the device-login link with "c". A hint prints under
the panel. On "c" the link goes to the clipboard.

The key read folds into the poll wait, so there is no background thread.
The hint stays hidden off a terminal, under --json, or with no clipboard
tool (pbcopy, clip, wl-copy, xclip, xsel, or clip.exe under WSL). No new
dependency.

@keboola-pr-reviewer-bot keboola-pr-reviewer-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: auto_approve (risk 2/5) · profile keboola-mcp-server

Self-gated "press c to copy" UX affordance for the device-login URL, well-tested and auth control flow untouched.

@soustruh
soustruh merged commit f5eb4c0 into main Sep 16, 2026
3 of 5 checks passed
@soustruh
soustruh deleted the device-login-copy-link branch September 16, 2026 16:18
martinsifra added a commit that referenced this pull request Sep 17, 2026
Covers everything merged since v0.94.0: #768 (uv audit / uv >= 0.12.15),
#772 (device-login "press c to copy") and #773 (test housekeeping).

No `vNEXT` placeholders were outstanding (`make vnext-check` clean), and
no `whatsnew.ts` entry is added -- nothing under `web/` changed this
release, so the popup correctly has nothing new to show.

gotchas.md: #772 reordered the device-login panel without updating the
doc surface. The 0.92.0 "one-click link is conditional" gotcha quoted the
old label ("Or open this link (code pre-filled):") and the old ordering,
so a relay keying on either now picks the wrong line -- rewritten, plus a
new entry for `press c to copy` being absent in exactly the situations an
agent drives (`--json`, no TTY, no clipboard command).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@soustruh soustruh mentioned this pull request Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants