feat(remote): support path-prefixed direct pairing - #5115
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:
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 |
Summary: - add Matrix OS to web and desktop connection settings - add the same setup action to the mobile environment screen - share one bounded handoff URL and document the flow Rationale: - make a persistent Matrix OS environment discoverable through T3 Connect - reuse existing external-link and T3 authentication infrastructure Tests: - shared package tests (319 passed) - web package tests (1703 passed) - mobile package tests (590 passed) - shared, web, and mobile typechecks - focused lint and format checks
Summary: - distinguish blocked popups without relying on noopener return values - sever the opener before navigation and retain noreferrer behavior - cover the successful secure browser launch contract Tests: - apps/web LocalApi suite - full shared, web, and mobile unit suites - shared, web, and mobile typechecks - targeted lint and formatting
Summary: - label Matrix OS entry points as setup actions on web and mobile - explain that online computers appear under Remote environments - share and test the cross-platform setup copy Rationale: - the entry point launches onboarding and does not represent live status - explicit copy avoids implying an already-connected desktop application Tests: - pnpm exec vp test run src/matrixOsConnect.test.ts - shared, web, and mobile typechecks
Summary: - refresh the relay environment catalog on application-active wakeups - cover the resume behavior and document the Matrix OS handoff Rationale: - Matrix OS links asynchronously in an external window, so the one-time Settings refresh could leave the environment list stale - reuse lifecycle wakeups instead of adding continuous relay polling Tests: - pnpm exec vp test run packages/client-runtime/src/relay/discovery.test.ts - pnpm exec vp run --filter @t3tools/client-runtime typecheck - pnpm exec vp lint packages/client-runtime/src/relay/discovery.ts packages/client-runtime/src/relay/discovery.test.ts - pnpm exec vp fmt --check packages/client-runtime/src/relay/discovery.ts packages/client-runtime/src/relay/discovery.test.ts
c08c0ca to
1faf1ad
Compare
There was a problem hiding this comment.
One finding: a semantically distinct failure is being expressed by stuffing prose into a structured error attribute instead of its own error class. Everything else in the touched Effect code (namespace import of ServerConfig plus yield* ServerConfig.ServerConfig in EnvironmentAuth.make, pure-config threading of pairingBaseUrl into verifyRequestDpopProof, the new Schema.TaggedErrorClass with an attribute-derived message, no new Layer.succeed/ManagedRuntime/runPromise in service code) follows the conventions.
Posted via Macroscope — Effect Service Conventions
Problem
T3's direct remote-environment flow assumed that a server lived at the root of an origin. Matrix OS safely exposes a user's loopback T3 server below an owner-scoped path, so pairing URLs, OAuth/DPoP requests, assets, discovery, and WebSocket connections lost that prefix. The previous Matrix setup also sent users through T3 Connect, which required a T3 account and Clerk.
Solution
--pairing-base-urltot3 serveandt3 pairso a trusted reverse proxy can advertise its public URLt3 pairrequestsapp.t3.codes/pair?host=...link for externally hosted direct environmentsUser story
The user selects Set up Matrix OS, approves setup in Matrix, then scans or pastes the one-time pairing link into the normal T3 desktop, web, or mobile client. The Matrix computer appears as a standard remote environment. No T3 Connect toggle, T3 account, Clerk session, managed relay, or forked T3 client is required.
Tests
HttpResponseCompression.tsBodyIniterror; no changed-file type errors remainSecurity notes
--pairing-base-urlis operator-owned CLI configuration, not derived from request headersRollout dependency
Test plan
--pairing-base-url.app.t3.codes/pair?host=...link in web/desktop or scan it on mobile.Implemented with Codex desktop (GPT-5).