Repository navigation
T3 Code clone: open prompt and thread links as unsent drafts - #758
Merged
Merged
Conversation
Co-Authored-By: Codex <noreply@openai.com>
…yeon/t3-up-prompt-links
…choices Register the T3 Code protocol only for distribution builds, route cold and warm links through the app, and reuse existing project, fleet and pull request preparation operations. Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Collaborator
Author
daehyeon-mun
marked this pull request as ready for review
October 18, 2026 16:19
daehyeon-mun
added a commit
that referenced
this pull request
Oct 18, 2026
) Settings → General can install or remove the desktop `t3` command. The app writes an executable launcher in `<T3 home>/bin`, prefers a writable command directory already on PATH, preserves foreign commands, and warns when another `t3` runs first. Its launcher preserves arguments and `T3CODE_HOME` overrides and passes `T3CODE_CLI_PATH` to the bundled CLI and backend. Installed-backend admission and CLI availability share the exact distribution-only handler plus registered-scheme predicate. No unwritten resource marker is needed; ordinary development and `--release` builds retain the isolated home/port guard. Desktop bootstrap credentials derive from a native in-memory secret in twelve-hour HMAC windows. The server receives the secret through its stdin bootstrap envelope; fresh exchanges derive the current token after suspend. Diff previews preserve the project's cwd without retrying at the server's cwd. Project icon writes and the native picker admit `.icns`; server conversion is supplied by #740's immutable runtime. Upstream commits followed at `9c161462c9`: `0678e4e23d` (#16683), `73e87f683a` (#16676), `3bfbc37dbf` (#17351), `5afe18eaf9` (#16275), `cfbd1457ad` (#17724), `de49d637d4` (#17149). Their server-side portions come from the merged runtime pin. | Acceptance | Result | Proof | | --- | --- | --- | | Install/remove, PATH ordering and foreign command preservation | Native executable/filesystem fixtures pass | [Native tests](https://github.com/ccheever/exact2/blob/c9b1f2e41aa5bba81675683ab7adc49dda34ef45/examples/t3-code/macos/tests/local-backend/cli.swift) | | Launcher arguments, home override, CLI path and moved app | Real launcher subprocesses pass, including Unicode and shell metacharacters | Same native tests: three focused launcher cases pass at final source | | Installed backend and distribution-only CLI availability | One metadata predicate requires the exact handler and scheme; marker-only, incomplete and wrong metadata remain refused | [Policy](https://github.com/ccheever/exact2/blob/c9b1f2e41aa5bba81675683ab7adc49dda34ef45/examples/t3-code/modules/apple/T3LocalBackend.swift), sixteen native policy/launcher/inspection cases pass | | Twelve-hour rotation and secret envelope | Native known HMAC vector, boundary, secret separation, dynamic clock and stdin tests pass; real app connects to the official server | [Live connection](https://github.com/user-attachments/assets/5541c209-39f6-431b-ac82-b88eb71454cd) and native tests | | Project cwd remains authoritative | Actual client command makes one request and preserves its error | [Diff regression](https://github.com/ccheever/exact2/blob/c9b1f2e41aa5bba81675683ab7adc49dda34ef45/examples/t3-code/tests/diff/diff-opens-on-changes.test.ts) | | `.icns` project icons | Project-update validation and native picker admission pass | Native picker fixture and immutable server conversion from #740 | Validation: - Final integrated source `c9b1f2e41a` includes reviewed provider integration `4d312fec8f`. Generated assets, **891 affected tests with zero failures (5,431 assertions/72 files)**, strict app TypeScript, full Contract preflight (36,911,323 bytes), caps and whitespace passed. - All app Swift plus backend/media-preview inspection fixtures compiled at this final head. **Sixteen focused native policy/launcher/inspection tests passed** with temporary homes and metadata dictionaries. They cover complete/missing/wrong metadata, marker-only backend refusal, packaged defaults and explicit home/port overrides, virtual port exhaustion, launcher execution, and legacy inspection compatibility. No packaged app was launched against the real home/3773, no lane metadata was altered, and no OS scheme was registered. - Frozen feature snapshot `4c791b6bd`: full Bun suite **5,576 passed, zero failures, 125,211 assertions across 359 files**. Frozen install/generator, strict app TypeScript, optimized Contract preflight (34.4 MB plan), caps and boot passed. - Native local-backend/CLI suite: **94 passed, zero failures**, including six new CLI/bootstrap/icon cases. The subsequent `6af0045d5` adjustment changed only the launcher's internal shell variable to `t3_home`; all app Swift recompiled, three focused real launcher tests passed, and caps/whitespace passed. No full native rebake was needed for that variable rename. - Terminal assets, offline runtime staging and signed native bundle at `4c791b6bd` passed. The bundled 80,665,649-byte official archive independently hashes to `6bd4ba617d321f31ac0c4bffe154ab14bf9ed8d67a7c244dcbda4c5f9581c521`; staging verified eleven Mach-O signatures, the actual CLI version and isolated startup. - Matched native BEFORE/AFTER passed on their first attempts, at 1280×840 with fresh isolated stores and homes. The search entry changes from absent to present; AFTER connects to the real `0.1.1-nightly.20261018.3302` server at port 16498 with the new secret envelope. BEFORE uses the required baseline bundle at port 16499. Their 4,052/3,145-entry journals contain no 3773 requests. Both apps closed and their PIDs are gone.   The runtime version difference in the second pair belongs to #740; this PR's verified change is successful startup/authentication with the rotating secret envelope. Development bundles intentionally hide Install, so launcher mutations are qualified by native filesystem/subprocess fixtures rather than forcing distribution metadata into a lane build. Known differences: Exact ships the server as an executable rather than Electron's Node entry, so the launcher invokes the verified installed executable directly. The packaged-local-home blocker is resolved by the shared metadata predicate, using #758's approved distribution-only handler. Existing home/port overrides and defaults remain unchanged. A legacy `distribution.json` marker alone no longer admits backend/browser home access; it remains an additional Web Inspector-disable condition, preserving old release inspection behavior and production receipt handling. The resolution is recorded in `clone/issues/cli-and-tokens-packaged-local-home.md`. The existing isolated real-bootstrap images qualify frozen bundle `4c791b6bd`; the shared packaging predicate is separately qualified by the final-head pure policy tests, so no full bundle rebake was needed. No framework files change, and evidence stays outside git. Prepared with Codex; continues work begun in the prior Claude session. --------- Co-authored-by: Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Prompt links now open a draft in T3 Code. A plain prompt opens No project; repository and pull request links find the matching project or existing thread across connected environments. Hidden characters are removed with a persistent warning, existing drafts require Replace draft, and a new pull request worktree requires Check out before any setup script runs. Links never send messages automatically.
The palette offers Copy prompt link and Copy prompt link with repo and model; user messages have a Copy prompt link action. Packaged builds declare
t3codewithdistribution_only: trueand/open?u=%s, using the separately adopted framework support. Development and lane bundles register no scheme. Lane verification enters the app route directly.Ported upstream
5fe7568e87(pingdotgg/t3code#18454), matching reference9c161462c9. Shared parsing, hidden-character rules, repository/model selection, draft replacement text and checkout choices follow the upstream implementation; the app reuses its existing connection fleet, project cloning and PR preparation operations.Native qualification at
c5f5ed247; final source merges integrationde2558b58b(including #754) at673945745:CFBundleURLTypesnorExactProtocolHandlers.Known differences: none identified in the scoped behavior. The scheme-registration framework change was reviewed separately in #747 and is already adopted by the target branch; this PR changes app files only.
Prepared with Codex; continues work begun in the prior Claude session.