Repository navigation
fix(config): open the oauth-url link in the browser and print it unwrapped (SUPPORT-17391) - #726
Conversation
…apped (SUPPORT-17391) Co-Authored-By: Zora Jelínková <zora.jelinkova@keboola.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…block (SUPPORT-17391) Co-Authored-By: Zora Jelínková <zora.jelinkova@keboola.com>
# Conflicts: # plugins/kbagent/skills/kbagent/references/gotchas.md # src/keboola_agent_cli/auth/environment.py
# Conflicts: # plugins/kbagent/skills/kbagent/references/gotchas.md
…json, verify by the config version
keboola-pr-reviewer-bot
left a comment
There was a problem hiding this comment.
Verdict: auto_approve (risk 2/5) · profile keboola-mcp-server
Well-tested CLI bug fix for oauth-url URL truncation; auto-opens the browser only in interactive human mode, fully gated and reversible.
Impact flags: possible rollback re-introduction — see Check Run summary.
Concerns:
CLAUDE.md: config oauth-url command list entry not updated with new --no-open flag (convention #17 drift)
|
❌ Cannot revive Devin session - the session is too old. Please start a new session instead. |
soustruh
left a comment
There was a problem hiding this comment.
Review of the diff against main. Two non-blocking findings and one low-severity note. No blocking findings.
Checked and fine:
- The open is interactive-only:
--jsonreturns before it, a non-terminal stdout never opens, and--no-openopts out.browser_openedis alwaysfalseunder--json. - The URL is printed with
soft_wrap=True, markup=False, so it is not wrapped and a literal[in it is not read as markup. - The
vNEXTtags inoauth-workflow.md,SKILL.md,commands-reference.mdandgotchas.mdmatch the code. The related tests fail on regression. The affected test files pass locally (138 passed).
Non-blocking:
src/keboola_agent_cli/commands/context.py:577andCLAUDE.md:558still listconfig oauth-urlwithout--no-open. These are two of the silent-drift places in the plugin synchronization map. Add[--no-open]to both.- The new WSL branch in
open_browseralso runs forauth login(viaauth_service, defaultwait_seconds=0). Before, the open was fire-and-forget on a thread. Now it is synchronous, up to 10 s, before the login loop starts polling. See the inline comment.
Low severity:
data-app password --openis opt-in, andconfig oauth-urlopens by default with--no-opento opt out. The interactive-only gate makes this defensible, but the two commands now differ for the same action.- Wording: the new docstring and docs use "mint" as a verb ("Mints a short-lived ...", "The minted token") in
_config_oauth.pyandoauth-workflow.md. "Generates" or "created" is plainer.
…o-open to the command lists
Dismissing prior approval — a new commit was pushed and this review was for an earlier SHA. Run @keboola-pr-reviewer-bot review to get a fresh verdict.
|
New commit on |
keboola-pr-reviewer-bot
left a comment
There was a problem hiding this comment.
Verdict: auto_approve (risk 2/5) · profile keboola-mcp-server
Well-tested UX fix: config oauth-url now opens the link interactively and prints it unwrapped, plus a WSL browser-open fix.
zajca
left a comment
There was a problem hiding this comment.
Actionable findings from the automated review.
Dismissing prior approval — a new commit was pushed and this review was for an earlier SHA. Run @keboola-pr-reviewer-bot review to get a fresh verdict.
|
New commit on |
Summary
SUPPORT-17391:
config oauth-urlprints a ~200-char URL, so it fits no terminal row, and the wrapped copy is what users actually follow. Two layers truncate it — Rich inserted real newlines at the console width, and terminals/chat renderers autodetect URLs per visual row — and both lose the config id in the trailing#/<component>/<config>fragment while keepingtoken/sapiUrl. The wizard therefore authenticates and then 404s on the configuration, reportingFailed to load config data. Please contact us on support@keboola.com, which reads like a broken OAuth flow.Nothing printed can fix a renderer we don't control, so the command opens the link itself and keeps the text as a copy fallback:
_should_openis interactive-only:--jsonreturns before it, a non-terminal stdout (pipe, CI,serve) never opens a window, and--no-openopts out when authorizing on another machine. JSON output is unchanged.auth.environment.open_browsergains the WSL branch it lacked.webbrowserkeys its Windows handling offsys.platform == "win32", which islinuxinside WSL, so it either resolved no handler (→False, no browser) or opened a Linux-side browser with a separate profile that shares none of the logins the flow needs.wslviewwas already probed here for the login-flow heuristics but never used to open anything:Skill docs: a new
references/oauth-workflow.md(generate → consent → verifyoauth_api.versionbumped) whose reporting rule is the other half of the fix — an agent answering in chat must echo the URL in a fenced code block, never as inline prose, because that is the surface where per-row link detection truncates it. Plus theoauth-urlrow incommands-reference.mdand a gotchas entry recording the symptom.Unchanged on purpose: the 1 h token TTL (the UI mints 48 h) and the absence of a config preflight before minting.
Release Notes
Justification, description
kbagent config oauth-urlhanded out a link that terminals and chat renderers truncate at the first visual row, dropping the configuration id and failing in the browser with "Failed to load config data". The command now opens the link in the default browser itself (interactive use only;--no-opento suppress) and prints the complete URL unwrapped. Includes a WSL fix so the Windows-side default browser is used instead of none, and a skill workflow telling agents to echo the URL in a fenced code block.Plans for Customer Communication
N/A
Impact Analysis
config oauth-urlin interactive human mode now opens a browser window as a side effect.--jsonand non-terminal stdout are unaffected, so scripted, piped and server callers see no change; the response payload is identical.Deployment Plan
Ships with the next
kbagentrelease.Rollback Plan
Revert the commits;
--no-openreproduces the previous behavior in the meantime.Post-Release Support Plan
N/A
Link to Devin session: https://app.devin.ai/sessions/e0d8eb25504b4b7cb6b1f9c354d448e3
Open in Devin Desktop: https://app.devin.ai/desktop/session/e0d8eb25504b4b7cb6b1f9c354d448e3?variant=devin
Requested by: @ZoraJel
Update 2026-10-10
main(0.98.0).make checkpasses.data-app password --open. Before, the process could exit before the opener thread ran, and the command reported an open that did not happen. A new test covers a slow opener.--jsonoutput has a new key,browser_opened. It is alwaysfalse, because--jsonnever opens a browser. The other keys are unchanged. This replaces "JSON output is unchanged" above.oauth-workflow.mdand theSKILL.mdrow: the agent tells the user that the link is open only whenbrowser_openedistrue. The agent verifies the authorization by a higher configurationversion, not byoauth_api.version.wslviewruns on the same background thread as thewebbrowseropen and follows the caller's wait.auth logindoes not wait, as before this PR.config oauth-urlwaits up to 2 s. Like thewebbrowserpath,open_browserreturnstruewhen the open started, not when the browser accepted the URL.[--no-open]is in theconfig oauth-urlline ofcontext.pyandCLAUDE.md.tests/test_oauth_workflow_doc.pychecks the verify step ofoauth-workflow.md.