bug(cli): /provider login — "URL copied to clipboard" but no clipboard copy occurs #194
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Running
/provider login anthropicreturns a success message containing "(URL copied to clipboard)" but no actual clipboard copy is performed. The URL is only displayed as text in a system message.Root Cause
The gateway
CommandExecutorService.handleProvider()(line ~294) hardcodes the string "(URL copied to clipboard)" in the response message, but neither the gateway nor the TUI actually copies anything to the clipboard.The gateway constructs the login URL and returns it in
command:result.data.loginUrl, but:use-socket.tsline 235) handlescommand:resultby displayingdata.messageas a system message but never readsdata.loginUrlor attempts a clipboard writeLocation
apps/gateway/src/commands/command-executor.service.ts~line 294 — misleading "(URL copied to clipboard)" stringpackages/cli/src/tui/hooks/use-socket.tsline 235 —command:resulthandler only renders message text, ignoresdatapayloadFix
The TUI needs to handle the
loginUrlfrom thecommand:result.datapayload and copy it to the clipboard. This is a client-side responsibility since only the TUI process has access to the user's desktop clipboard.Options:
clipboardypackage (cross-platform clipboard access for Node.js)pbcopy(macOS) /xclip/xsel(Linux) /clip(Windows) viachild_processThe gateway message should not claim the URL was copied — it should say "Copy this URL" or let the TUI append "(copied to clipboard)" only after a successful clipboard write.
Steps to Reproduce
/provider login anthropic