fix(auth): move OAuth account controls below consent actions - #7575
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR reorders the OAuth consent controls and suppresses the redundant loopback destination sentence for Sim CLI authorization.
Confidence Score: 4/5The PR appears safe to merge, with a non-blocking test-coverage gap for preserved non-CLI destination visibility. The changed rendering logic correctly distinguishes the exact Sim CLI client and preserves existing pending and error behavior; only the new non-CLI conditional branch lacks direct regression coverage. Files Needing Attention: apps/sim/app/(auth)/oauth/consent/consent-view.test.tsx
|
| Filename | Overview |
|---|---|
| apps/sim/app/(auth)/oauth/consent/consent-view.tsx | Reorders account controls beneath consent actions and restricts destination text to non-CLI clients. |
| apps/sim/app/(auth)/oauth/consent/consent-view.test.tsx | Covers the revised CLI behavior and control order, but lacks a positive non-CLI destination test. |
Reviews (1): Last reviewed commit: "fix(auth): move OAuth account controls b..." | Re-trigger Greptile
| expect(container.querySelector('h1')?.textContent).toBe('Authorize Sim CLI') | ||
| expect(container.textContent).toContain('Continuing as test@example.com.') | ||
| expect(container.textContent).toContain('Returns to this computer.') | ||
| expect(container.textContent).not.toContain('Returns to this computer.') |
There was a problem hiding this comment.
The new assertion covers only the CLI suppression path because the fixture always uses clientId='sim-cli'. The new non-CLI branch has no positive test confirming that Returns to {destination} remains visible, so a future regression in that requirement could pass unnoticed. Add a non-CLI case with a valid redirect URI and assert that its destination is shown.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Type of Change
Testing
All 12 consent and OAuth hook tests passed. Full repository lint, all 46 audits, the block registry check, and docs-manifest validation passed.
Checklist