fix: remove user= from ConnectionDialog snippet, add CLI login hint#883
fix: remove user= from ConnectionDialog snippet, add CLI login hint#883
Conversation
The snippet showed user="xxx@guest.user" without password, which broke after auth validation started requiring both or neither. Now the snippet is universal (no user=), and a CLI login command is shown for authenticating as the current user. Also fixes e2e test helpers (CLI env var passing, --room flag) and a TS null-guard in cliLoginApprove. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
for more information, see https://pre-commit.ci
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis change improves credential security in the connection dialog by removing user credentials from Python snippets and adding an authentication workflow. The CLI room creation parameter is standardized across all e2e tests, and a guard clause prevents unauthorized login approvals when code is missing. Changes
Poem
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@frontend/src/components/ConnectionDialog.tsx`:
- Around line 78-80: The UI is rendering "null" because userName (from
state.user?.email ?? null) can be null; update ConnectionDialog to either
conditionally render the Typography block only when userName is non-null (e.g.,
guard around the JSX using userName) or provide a clear fallback string (e.g.,
'your email' or 'an account') instead of null; locate the userName usage in
ConnectionDialog and change the render logic around the <Typography> that says
"To authenticate as <strong>{userName}</strong>, run:" accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4f0c7e38-0813-460e-bc2a-18e37e475f16
📒 Files selected for processing (6)
docs/superpowers/specs/2026-03-20-connection-dialog-snippet-design.mdfrontend/e2e/helpers.tsfrontend/e2e/ui-panels-chat.spec.tsfrontend/playwright.config.tsfrontend/src/components/ConnectionDialog.tsxfrontend/src/pages/cliLoginApprove.tsx
…2e tests - Guard against null userName rendering empty <strong> tags - Replace --room-id with --room in all e2e test files (correct CLI flag) - Remove unnecessary process.env.BASE_URL fallback Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
for more information, see https://pre-commit.ci
…cede ZnDraw() - Connection snippet shown first as the default (connects as guest) - Login command clearly states "before creating the ZnDraw object" - Session access grouped with login as dependent step Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #883 +/- ##
=======================================
Coverage ? 91.24%
=======================================
Files ? 179
Lines ? 17240
Branches ? 0
=======================================
Hits ? 15731
Misses ? 1509
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
user=parameter from the Python connection snippet inConnectionDialog— it broke after auth validation started requiring bothuser+passwordor neitherzndraw-cli auth logincommand hint shown to all users for persistent authentication--room-id→--roomflagcliLoginApprove.tsxTest plan
user=parameterzndraw-cli auth loginis visible🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
New Features
Bug Fixes
Tests