GeezerVison is showing github.com — perf: the desktop app comes back faster after an update by 3xcalibur-tech · Pull Request #37809 · pingdotgg/t3code
Conversation
Problem
After installing an update on macOS the desktop app takes about 8.5 s to come back with the thread list. Traces from ten update restarts on one machine show where the app's own share goes:
- The backend takes ~1.2 s to become ready. Building its layers runs
gh config get http_unix_socket (141 ms) and then two Codex processes, --version and app-server --help (267 ms), one after another, plus scutil and ioreg in sequence.
- Install asks the release feed again before every restart (150–600 ms), even seconds after a check or download just answered.
- Every package carries the 16 MB
patches/ folder that is staged only for the production install. Nothing reads it at runtime, but it is downloaded, unpacked and signature-checked on each update.
Change
- The GitHub HTTP client asks
gh for its socket on the first request instead of while the server starts.
- The Codex local probe runs beside the rest of startup. Every reader of the installation waits for it, and
acquire waits before taking the install gate so a session opened during the probe cannot deadlock the probe's own update.
- The host label and machine probes run together.
- Install trusts a feed answer under five minutes old and skips the second request. A track change still always re-checks. If a release lands inside that window, the downloaded build installs and the next poll offers the newer one.
patches/ is excluded from the packaged app and from the Windows server sidecar.
These span server, desktop and packaging because each one sits on the same restart path.
Scope
A performance problem in the update restart, found from the app's own traces; no issue. #28991 also touches CodexInstallation.ts as part of a much larger startup change; this PR is limited to the probes above and does not depend on it.
Verification
Built server, spawned the way the desktop spawns it (Electron as Node, bootstrap on fd 3), on a 2.3 GB copy of real data, 20 interleaved runs per build, median:
|
main |
this PR |
| spawn → HTTP ready |
725 ms |
601 ms |
| spawn → shell snapshot received |
867 ms |
740 ms |
packaged app.asar |
254.4 MB |
233.2 MB |
On the machine the traces came from, the probes moved off the startup path cost 408 ms of a 1.17 s backend start; that part is a projection from its traces, not a measurement of this build.
Tests added or extended, each failing on main:
CodexInstallation.test.ts: the service is built while the probe is still blocked and readers wait for it; a session acquired during the probe of an older managed runtime no longer deadlocks.
GitHubRest.test.ts: building the client starts no gh process; the first request starts one.
DesktopUpdates.test.ts: install after a just-answered feed makes no second check; after six minutes it still finds and installs the newer release.
build-desktop-artifact.test.ts: the staged patches match the exclusion globs.
Also checked on macOS arm64:
- Full suites against a clean
upstream/main checkout on the same machine: server 8680 passed / 25 failed, desktop 1150 / 2, scripts 285 / 2, source-control-github 410 / 0. Every failure also fails on upstream/main with the same test names (case-insensitive filesystem, /var → /private/var, npm launcher).
- An unsigned app built with
build-desktop-artifact.ts --target dir: no patches/ in app.asar, and its backend boots from the asar on seeded data (616 ms median over 8 runs) with no failed spans.
- A 25 s run of that packaged backend: GitHub REST and GraphQL requests through the lazy client and the Codex status probes all succeeded.
- The web client against an isolated dev server: sidebar and a thread load.
Not checked: launching the packaged window and a real update install, because a production build shares its profile with the installed app on that machine. Windows and Linux packaging were not built.
Claude Fable 5.2 in Claude Code via T3 Code. Research by GPT 6.1 Sol and Muse Wonder Full, review by Claude Opus 5.5.
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 751b96d
Macroscope's review found this PR approvable — This reduces desktop restart overhead through bounded update-feed reuse, deferred initialization, and smaller packaged artifacts. Existing initialization gates, track-switch checks, and HTTP credential safeguards remain in place.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 16, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
The pull request changes desktop release-install freshness checks, server environment resolution and Codex installation initialization, GitHub HTTP client construction timing, and desktop artifact exclusions. It adds or updates tests for these behaviors.
Changes: Desktop Update Freshness
| Layer / File(s) |
Summary |
Feed freshness and prepared installation apps/desktop/src/updates/DesktopUpdates.ts, apps/desktop/src/updates/DesktopUpdates.test.ts |
Successful feed checks record a timestamp. Installation skips a recheck when the answer is less than five minutes old and the retained channel matches the running build’s channel. Tests cover fresh and stale feed answers. |
Server Environment Resolution
| Layer / File(s) |
Summary |
Concurrent environment resolution apps/server/src/environment/ServerEnvironment.ts |
ServerEnvironment.make resolves the environment label and machine kind concurrently. Descriptor construction remains unchanged. |
Codex Installation Initialization
| Layer / File(s) |
Summary |
Initialization and gated operations apps/server/src/provider/CodexInstallation.ts, apps/server/src/provider/CodexInstallation.test.ts |
Initialization runs in the service scope, and installation operations wait for it. Tests cover state reads during a blocked local probe and session acquisition during an update. |
GitHub HTTP Client Construction
| Layer / File(s) |
Summary |
First-request client construction packages/source-control-github/src/server/GitHubHttpClient.ts, packages/source-control-github/src/server/GitHubRest.test.ts |
Client construction and socket configuration lookup occur on the first request. The fallback and socket-backed clients retain the existing redirect rules. Tests verify lookup timing and fallback behavior. |
Desktop Artifact Exclusions
| Layer / File(s) |
Summary |
Patch directory packaging exclusions scripts/build-desktop-artifact.ts, scripts/build-desktop-artifact.test.ts |
Desktop packaging and the Windows server ASAR exclude the patches directory and its contents. A test checks both exclusions against the Cursor SDK patch. |
Estimated code review effort: 4 (Complex) | ~40 minutes
Change: Refactor
Sequence Diagram(s)
sequenceDiagram
participant Request
participant HttpClient.makeWith
participant makeClient
participant gh
Request->>HttpClient.makeWith: Execute request
HttpClient.makeWith->>makeClient: Resolve cached client
makeClient->>gh: Read socket configuration
gh-->>makeClient: Return socket path or lookup result
makeClient-->>HttpClient.makeWith: Return fallback or socket-backed client
HttpClient.makeWith-->>Request: Return HTTP response
Loading
Suggested reviewers: juliusmarminge
Merge Risk: Minimal · up to d8dfe
-
This change speeds up desktop restart after an update and shrinks the packaged app. No concrete merge-blocking defect was found, so the change appears safe to merge after the usual checks.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title 'perf: the desktop app comes back faster after an update' is a conventional-commit style title that names the primary goal of the PR. The objectives show the changes aim to reduce desktop up… |
| Description check |
 |
The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section states the symptom (about 8.5 s to show the thread list after an update on macOS) and trace… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title 'perf: the desktop app comes back faster after an update' is a conventional-commit style title that names the primary goal of the PR. The objectives show the changes aim to reduce desktop update-restart latency through server startup, updater, and packaging changes. The title is broadly related to the main change, though it does not name the specific mechanisms (lazy gh socket lookup, concurrent Codex probe, feed-check caching, patches exclusion).
Full details: Description check
-
Explanation
The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section states the symptom (about 8.5 s to show the thread list after an update on macOS) and traces it. The Change section lists each fix and explains why the server, desktop, and packaging changes belong together. The Scope section explains that no issue exists for this performance bug, which the template allows for small obvious fixes, and it links a related PR. The Verification section gives benchmark tables, the focused tests added, and the full-suite results, and it names what was not checked. The template's agent-attribution line is present at the end. The description is thorough and complete, so it passes.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 79ec29d and d8dfeff.
Files selected for processing: 7
-
apps/desktop/src/updates/DesktopUpdates.test.ts
apps/desktop/src/updates/DesktopUpdates.ts
apps/server/src/provider/CodexInstallation.test.ts
apps/server/src/provider/CodexInstallation.ts
packages/source-control-github/src/server/GitHubRest.test.ts
scripts/build-desktop-artifact.test.ts
scripts/build-desktop-artifact.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Note Written by gpt-6.1-sol on behalf of Maria
Verified in a real dev environment
verified the linux server/web path at 79ec29dc7e5023b085fae5b198d7d47fdae7765d, after running github/main (373ec12be6) in a separate worktree. each checkout had vp i and its own isolated state. only one dev server ran at a time. playwright used /usr/bin/google-chrome.
- main's live startup trace reproduces the blocking codex probe:
makeCodexInstallation encloses resolveLocal. on the pr, construction ends before that real subprocess probe finishes. the host label and machine probes overlap on the pr; they run sequentially on main. these observations verify the changed ordering, without claiming an end-to-end desktop speedup.
- added a project pointing at a real github-backed git repository through the app. selected codex
gpt-6.1-sol and completed an initial turn and a follow-up through the web composer. reloaded the conversation successfully.
- restarted the dev server, resumed the same real codex conversation through the running server's cli, and saw the result in the web client. provider settings and a provider-status refresh also worked.
- opened this pr's details through the app's github path, then reloaded them. real github rest/graphql reads succeeded.
GitHubHttpClient.makeClient first appears after startup, on demand.
short runtime transcript:
main: codex service construction contains the local probe
pr: codex service construction completes before the local probe
thread provider=codex model=gpt-6.1-sol status=completed
web initial turn -> startup verification ok
web follow-up -> follow-up verification ok
server restart
t3 thread send --wait <same-thread> ... -> restart verification ok
web reload -> all three replies visible
blacksmith-check passed the four focused suites (160 tests). vp run check:changed 750e492ed68c70ac9aadc4c0dc85af8cda7aef37 also passed remotely: format, lint, knip, generated graphql, typecheck of 11 affected packages, and 175 tests. no code changes were needed.
the captures use the same repository, prompt, reply, and model. sidebar projects differ between the isolated environments. the recordings show real follow-up turns; their lengths are not startup benchmarks.




Not verified
the original macos update/relaunch delay, a real electron update install, release-feed caching against the production updater, packaged patch exclusions, windows packaging, and native ios/android clients were not exercised on this linux web setup. the managed codex runtime upgrade/acquisition race has focused test coverage, but was not reproduced with a live managed upgrade; real turns here used the installed codex cli and local proxy. no end-to-end desktop performance claim is made.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR conflicts with main. Rebase it or merge main into it. If it still conflicts after 7 days with no activity, it will be closed automatically.
See the conflict window.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Server startup ran `gh config get http_unix_socket` and two Codex
processes (`--version`, `app-server --help`) one after another while
building its layers, so the desktop window waited on them before the
backend answered.
The GitHub HTTP client now asks gh on its first request, the Codex local
probe runs beside the rest of startup with every reader waiting for it,
and the host label and machine probes run together.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
…B patches folder
Install asked the release feed again before every restart, even seconds
after a check or download had just answered. It now trusts an answer
under five minutes old.
The dependency patches staged for the production install were also packed
into the app, adding 16 MB to every download, unpack and signature check.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
…ts test
Review follow-up: the deadlock case awaited the session's Exit, so a
failed acquire passed. It now joins the session and checks it got a
managed runtime.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|