fix: improve CLI output for auth login and upgrade flows#454
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
Codecov Results 📊✅ 116 passed | Total: 116 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ❌ Patch coverage is 70.73%. Project has 1136 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 95.21% 95.20% -0.01%
==========================================
Files 175 175 —
Lines 23653 23679 +26
Branches 0 0 —
==========================================
+ Hits 22519 22543 +24
- Misses 1134 1136 +2
- Partials 0 0 —Generated by Codecov Action |
Migrate diagnostic output from cluttered stderr log.info() calls to the markdown-rendering pipeline for cleaner, more consistent formatting. **Auth login (interactive-login.ts):** - Show verification_uri_complete (with user_code embedded) instead of bare verification_uri so the URL works in headless environments - Use log.log() for URL/code detail lines instead of log.info() to avoid repeated ℹ icon prefixes - Only show copy hint when browser didn't open - Render user code as inline code span via renderInlineMarkdown() **CLI upgrade (upgrade.ts + human.ts):** - Demote method/version/channel/latest log.info() calls to log.debug() - Add metadata key-value table (method, channel) to formatUpgradeResult via mdKvTable(), rendering through the standard markdown pipeline - Keep log.info() only for progress indicators that fire before the result is ready (Upgrading to..., nightly migration) Closes #452
2b91d66 to
4bfa18b
Compare
- Escape verificationUriComplete with escapeMarkdownInline() before passing to renderInlineMarkdown() to prevent underscores in URLs (e.g., self-hosted instances) from being interpreted as emphasis - Set SENTRY_PLAIN_OUTPUT=1 in upgrade test mock context so table assertions use raw markdown pipes instead of Unicode box-drawing characters that only appear in TTY mode - Add test for URL escaping with underscore-containing URLs
|
Addressed both review comments in af24db3: Seer (URL escaping): Good catch. Wrapped Cursor BugBot (TTY-dependent assertions): Set |
The verification URL must stay intact for copy-paste in all output modes. Passing it through renderInlineMarkdown() after escaping with escapeMarkdownInline() would leave literal backslash-underscore sequences in plain/CI mode (e.g., user\_code=), breaking the URL. Instead, emit the URL line as plain text via log.log() — it doesn't need styling. Only the user code (backtick code span) and copy hint (italic) use renderInlineMarkdown().
|
Fixed in f0c404e: Removed markdown rendering from the URL line entirely. The URL is now emitted as plain text via |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Migrate diagnostic output from cluttered stderr
log.info()calls to the markdown-rendering pipeline for cleaner, more consistent formatting.Auth login (
interactive-login.ts)verification_uri_complete(withuser_codeembedded) instead of bareverification_uriso the URL works in headless environments (SSH, CI)log.log()for URL/code detail lines instead oflog.info()to avoid repeated ℹ icon prefixesrenderInlineMarkdown()CLI upgrade (
upgrade.ts+human.ts)log.info()calls tolog.debug()formatUpgradeResultviamdKvTable(), rendering through the standard markdown pipelinelog.info()only for progress indicators that fire before the result is ready (Upgrading to..., nightly migration)Closes #452