Repository navigation
Description
Objective
Make a ProPR instance exposed through ProPR Connect usable as a first-class desktop endpoint. The repository currently calls this hosted Cloudflare path propr tunnel; preserve compatibility with that contract while using the user-facing ProPR Connect terminology.
Scope
- Recognize and normalize the canonical bare hosted endpoint
https://t-<instance-id>.propr.devwith no path, query, fragment, credentials, alternate port, lookalike suffix, or encoded-host ambiguity. Continue supporting ordinary validated HTTPS remote instances and loopback development endpoints. - Use the Connect origin directly for
/api/status, all REST calls, pairing bootstrap/poll/revoke, and/socket.io/; do not require the tunnel to serve the Web UI root. - Use only the API-returned browser approval URL. Support the existing hosted approval contract (
https://app.propr.dev/desktop/pairing?...&tunnel=t-...) and exact tunnel/api/desktop/pairings/.../browserfallback without synthesizing an approval URL from renderer input. - Make paste/add-profile UX identify a verified ProPR Connect endpoint and show clear offline, tunnel-disabled, incompatible-version, and revoked-auth states. Recovery after the tunnel returns must not require recreating the profile when its canonical origin is unchanged.
- Treat an endpoint/origin change as a profile-generation change requiring fresh discovery and pairing. Never send the old origin credential, cookies, authorization events, or Socket.IO auth to the replacement endpoint. Keep all tokens in the main-process credential service.
- Do not place tunnel tokens, pairing secrets, instance tokens, or private paths in URLs, deep links, renderer storage, logs, diagnostics, analytics, or error text. The desktop app does not own or restart cloudflared; local setup may link to the existing CLI workflow.
Automatic local discovery
- Add a versioned, bounded, noninteractive machine-readable ProPR Connect discovery contract to the CLI (preferred user-facing shape:
propr connect --json, with a compatibility alias to the current tunnel implementation if needed). It may report schema version, canonical public endpoint, instance id, configured/enabled/running/verified state, and safe compatibility metadata only. It must never emit the connector token, pairing/device secret, instance access token, environment contents, credential-presence oracle, or private filesystem paths. Human output must remain separate from JSON stdout. - The desktop main process may invoke this contract automatically only through an app-bundled or explicitly trusted CLI executable and a known setup root/profile; use argument-array execution without a shell, a minimal environment, hard timeout/cancellation, output-size cap, exit-code handling, and strict discriminated schema validation. The renderer receives only validated safe metadata. Never recursively scan user disks or parse stack
.envdirectly. - Verify every discovered endpoint independently through bounded
/api/statusand compatibility discovery before presenting it. Require user confirmation before adding/switching a profile or beginning browser pairing. Discovery must not transfer authentication. Manual URL entry remains available when the CLI is absent, old, malformed, slow, or offline. - If multiple known roots yield endpoints, deduplicate by canonical origin and present explicit choices. A changed origin is not silently substituted for an existing profile; it follows the fresh-generation/re-pair rules above.
- Add deterministic tests for JSON schema/version compatibility, secret absence, stdout/stderr separation, missing/old CLI, malformed/oversized output, timeout/abort, nonzero exit, hostile endpoint strings, duplicate roots, endpoint rotation, verification failure, and confirmation cancellation.
End-to-end validation
- Add deterministic client/API/Electron/UI tests for the real
t-<id>.propr.devshape, hosted browser approval, REST and Socket.IO same-origin routing, tunnel down/up reconnect, origin rotation, Unicode/IDNA and suffix lookalikes, path/query rejection, and secret absence. Model the proxy locally in CI; do not require live Cloudflare access.
Dependencies and integration
Coordinate semantically with #1961, which owns remote pairing, credential custody, profile generations, and reconnect behavior. Reuse its single canonical window.proprDesktop bridge and DesktopCredentialService; do not create a parallel auth or connection stack. If #1961 has not landed in the transport epic, limit this PR to shared Connect endpoint classification/contracts and non-overlapping tests, then sync/reconcile before review.
Target the branch selected by base-1953-epic-desktop-transport-api; never target main. Do not merge this PR. It requires Ultrafix, exact-head independent review, green full CI, and final combined validation with #1961 before integration.
Activity
propr-dev commentedon Aug 29, 2026
🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
codexgpt-5.6-sol1985/gpt-5.6-sol-support-propr-connect-tun-20260829-2108-al61953-epic-desktop-transport-apiissue-1985-20260829-2108-gpt-5.6-sol-al6🔍 Track Task Execution
integry commentedon Aug 29, 2026
Requirement added after the initial AI task began: automatic local endpoint discovery is now part of acceptance. The implementation must expose a versioned secret-free
propr connect --json-style CLI contract and invoke it only from the desktop main process with trusted executable/root, no shell, timeout/output bounds, strict schema validation, independent endpoint verification, and explicit user confirmation. If the in-flight implementation does not include this section, apply it as the first follow-up on the generated PR before review.integry commentedon Aug 29, 2026
Security/operations addendum from the tunnel audit:
{canonicalOrigin, instanceIdentity}in the desktop profile, and perform a bounded unauthenticated compatibility/identity probe before any saved bearer is attached to REST or Socket.IO after startup/recovery. On identity mismatch, send no credential, stop reconnect, and require explicit re-pair. Alternatively, the Connect control plane must provide and test a hard non-reassignment guarantee; document which invariant is authoritative. Never use a GitHub installation id or connector token as this public identity.propr tunnel oncan leave an already-running API with staleAPI_PUBLIC_URL/FRONTEND_URL. Discovery must distinguish configured/enabled/running from API-confirmed readiness and surface restart-required rather than beginning a pairing flow. The seamless setup path should correspond topropr tunnel setup ... --startor its safe Connect alias./api/desktop/pairings/:id/browser, which redirects tohttps://app.propr.dev/desktop/pairing?...&tunnel=t-.... Do not loosen approval URL validation to arbitrary hosted pages.integry commentedon Aug 29, 2026
Seamless handoff addendum: the runtime already registers and validates a
propr://connectprotocol, but no adapter/UI currently consumes a Connect endpoint hint. Implement an endpoint-only handoff alongside local CLI JSON discovery. A bounded form such aspropr://connect?url=<canonical-bare-https-origin>&name=<optional-display-hint>is untrusted input: parse and normalize in main, reject credentials/fragments/extra or duplicate parameters/oversize/control/encoded-host ambiguity, pass only safe endpoint metadata through the single canonical bridge, normalize again at the consumer, and require explicit confirmation followed by ordinary/api/statusidentity verification and browser pairing. Never accept a connector token, relay token, pairing/device secret, instance bearer, or auto-approval material in the URL. Never silently overwrite/switch an existing profile; deduplicate exact origin+identity and surface conflicts. Cover cold start, second instance, queued-before-renderer-ready delivery, cancellation, duplicate profile, changed identity, malformed/encoded URL, and secret-bearing parameter rejection. Preserve ordinary dashboard deep-link behavior and do not turn this into OAuth callback handling.fix(ai): Resolve issue #1985 - Support ProPR Connect tunnel endpoints…
integry commentedon Sep 4, 2026
Implemented by #1988, merged into
1953-epic-desktop-transport-api(1af8b44). Closing the completed child issue during epic issue/PR reconciliation. Final desktop integration and delivery remain tracked by #1950 / #1970; this does not claim a main-branch release.