GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — Let clients without a managed backend manage pairing by colonelpanic8 · Pull Request #4496 · pingdotgg/t3code Conversation
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Needs human review This PR introduces new authentication and access management capabilities, enabling clients without managed backends to manage pairing links and sessions on external servers. Changes to auth/session handling and the introduction of new user-facing features warrant careful human review. You can customize Macroscope's approvability policy. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
b38c6b5 to
f145096
Compare
There was an error while loading. Please reload this page.
…nage pairing) # Conflicts: # apps/web/src/components/settings/ConnectionsSettings.logic.test.ts # apps/web/src/components/settings/ConnectionsSettings.logic.ts # apps/web/src/components/settings/ConnectionsSettings.tsx
…nage pairing) # Conflicts: # apps/web/src/components/settings/ConnectionsSettings.logic.test.ts # apps/web/src/components/settings/ConnectionsSettings.logic.ts # apps/web/src/components/settings/ConnectionsSettings.tsx
…nage pairing) # Conflicts: # apps/web/src/components/settings/ConnectionsSettings.logic.test.ts # apps/web/src/components/settings/ConnectionsSettings.logic.ts # apps/web/src/components/settings/ConnectionsSettings.tsx
…nage pairing) # Conflicts: # apps/web/src/components/settings/ConnectionsSettings.logic.test.ts # apps/web/src/components/settings/ConnectionsSettings.logic.ts # apps/web/src/components/settings/ConnectionsSettings.tsx
…nage pairing) # Conflicts: # apps/web/src/components/settings/ConnectionsSettings.logic.test.ts # apps/web/src/components/settings/ConnectionsSettings.logic.ts # apps/web/src/components/settings/ConnectionsSettings.tsx
b824828 to
c2b774f
Compare
Access management was bound to the primary environment, so it was reachable only from a client that owns a local backend. A hosted-app client has no primary at all — `platformConnectionSourceLayer` emits no registrations for `isHostedStaticApp()` — so the Connections page hid the whole "Authorized clients" section. A user who had paired the hosted app to their own server could not mint a pairing link, revoke a client, or see a pairing QR code for that server. Route the access-management endpoints through the environment supervisor's prepared connection instead of the primary, and administer the active environment when there is no primary. A desktop that manages its own backend keeps administering that backend, so managed mode is unchanged. Pairing also silently lost administrative scope: onboarding always requested the standard client scopes, and the server rejects a wider request rather than clamping it, so a client bootstrapped from a server's own startup token was downgraded to a standard session and could not manage the access it had just been handed. Request no scopes and take exactly what the credential carries. Only a directly addressable HTTP origin yields a shareable pairing URL; relay and SSH environments are reached through a broker or a local tunnel whose address means nothing on another device, so those fall back to showing the bare pairing code.
`t3 serve` already prints a QR code next to its startup pairing URL, but a link minted later with `t3 pair` printed only text, so pairing a phone meant transcribing a URL by hand. Encode the pair URL when there is one. A bare token is not actionable on the device that scans it, and JSON output stays machine-readable.
When the Connections page administers an environment it is not served by — a relay or SSH environment, or a bearer environment whose profile is missing — that environment has no addressable base URL, and the pairing row is meant to fall back to the bare pairing code. It instead fell through to the current page's `/pair` URL whenever this page was itself on a non-loopback host, so the QR code and the copy button handed out a link to this client app rather than to the server the link belongs to. The page's own origin only reaches the administered server when that server is the one that served the page, which is the managed-backend case. Make that a stated input of the fallback rather than an accident of the page's hostname, and move the choice into a tested helper.
c2b774f to
9f1395b
Compare
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fc202bc. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Folded into #9361, which carries this change on a current |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.