Repository navigation
[3936 by GPT-6.2 Sol] MCP connect on Fly (device sign-in): sign-in drops redirect_to, user lands on dashboard instead of the consent screen - #3938
Conversation
Fixed #3936. GitHub device sign-in now preserves a validated same-origin return path and performs a full-page navigation back to MCP consent or Connected Apps. Off-origin targets are discarded, and pending MCP requests still expire after 10 minutes. API and UI regression tests, type checks, and lint passed. Local Chromium testing with simulated GitHub sign-in verified that the browser reached consent, the client received and exchanged an authorization code, and expired requests showed the existing error page. A live Fly deployment remains unverified. ProPR-Agent: codex/gpt-6.2-sol
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationReady to merge within the reviewed scope. The change preserves the device sign-in return target through session creation and uses full-page navigation to reach server-rendered MCP pages. The implementation is appropriately scoped. ✅ Validated return targets — Server validation enforces the frontend origin, rejects normalized protocol-relative paths, and clears previously stored targets when a new target is invalid. ✅ Session continuity — The target survives Passport session regeneration, is consumed on completion, and is returned only after the session save succeeds. ✅ Focused regression coverage — Added tests cover target preservation, consumption, off-origin rejection, and the UI navigation callback. Existing MCP expiration checks remain unchanged. This assessment is based on static review of the supplied code; no commands or tests were run. Current-head checks report 15 passed and no failures. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Automate the complete MCP journeyConsider adding an integration regression that starts with an unauthenticated MCP consent request, completes device sign-in, and follows the returned target to consent. Include an expired pending request. The added tests verify the API and UI handoff separately; testing their composition would preserve the reported manual verification as repeatable coverage. This is optional because the supplied control flow supports both outcomes. ScoreThe implementation addresses the objective with focused changes, defensive validation, and relevant regression tests. No merge blockers were identified, and current-head checks are passing. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
Own review: the device-mode redirect is validated against |
AI Implementation Summary
Closes #3936
Branch:
3936/gpt-6.2-sol-mcp-connect-on-fly-device-20261130-2317-8mcCommits: ✅ Changes committed (d75af24)
AI Processing Completed
Execution Details:
Summary:
Fixed #3936. GitHub device sign-in now preserves a validated same-origin return path and performs a full-page navigation back to MCP consent or Connected Apps. Off-origin targets are discarded, and pending MCP requests still expire after 10 minutes.
API and UI regression tests, type checks, and lint passed. Local Chromium testing with simulated GitHub sign-in verified that the browser reached consent, the client received and exchanged an authorization code, and expired requests showed the existing error page. A live Fly deployment remains unverified.
Review digest
Risk-tiered paths
packages/api/auth.ts(+40/−5): auth-looking pathpropr-ui/src/pages/LoginPage.tsx(+3/−2): auth-looking pathpropr-ui/src/api/deviceSignInApi.ts(+6/−2)propr-ui/src/pages/DeviceSignInPanel.tsx(+2/−2)packages/api/test/deviceAuth.test.ts(+46/−0)packages/api/test/deviceAuthHarness.ts(+3/−2)propr-ui/src/pages/LoginPage.deviceSignIn.test.tsx(+28/−0)Diff size: 7 files changed, +128/−13 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3936.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!
Visual preview
MCP consent after device sign-in
The browser returns to the pending connection and shows permissions and repositories after device sign-in.
Original unavailable: managed storage is unavailable or the upload has expired.