Before submitting
Area
apps/web pull request views + apps/server PullRequestService / GitHub CLI integration
Steps to reproduce
- Use T3 Code with several threads whose PRs appear in the UI (linked PRs, PR tabs or panels opened at some point). Keep a second client connected if possible, e.g. the web UI served over Tailscale.
- Leave the app open and switch focus to and from the window every few minutes, as you normally would while working.
- Watch the GitHub GraphQL budget:
gh api graphql -f query='{rateLimit{remaining resetAt}}'.
- Count
GitHubCli.execute spans in ~/.t3/userdata/logs/server.trace.ndjson*, grouped by their ws.rpc.* ancestor.
Expected behavior
PR detail and activity reads are cached and shared across clients. A merged or closed PR is not re-fetched on every focus change. Refreshing should back off before the user's GitHub quota runs out, not only after (github requests to github.com are paused until the rate limit resets).
Actual behavior
Each client re-requests pullRequests.detail and pullRequests.activity for every PR it shows. This happens on window focus (after 10 s), on visibilitychange, and every 5 minutes while the user is active (the refresh hook with ya=3e5/1e4 in PanelLayoutControls). Merged PRs are included.
Measured on one machine (trace data plus rateLimit sampling):
- Bursts of ~120
gh calls every 3–4 minutes. In one 7-minute window, 822 of 881 T3 gh calls came from ws.rpc.pullRequests.detail (264 RPCs) and ws.rpc.pullRequests.activity (192 RPCs). gh pr view --json author,comments,reviews,commits paginates, so this averaged ~3 GraphQL points per call.
- GraphQL went from 4,974 to 2,206 remaining in 6.5 minutes. The 5,000/h budget ran out three times in one afternoon. Every other consumer combined made 66 GraphQL calls in 40 minutes.
- Two connected clients (desktop window and a Tailscale-served web tab) each refreshed the same PRs independently.
- Unlinking 70 merged PRs from active threads did not shrink the bursts. Of the 39 PRs in one burst, 18 were not linked to any thread; several of those match
t3.pullRequests.detail:* entries in the client's localStorage.
This is a different path from #3581/#5673, which fixed per-branch gh pr list polling.
Impact
Major degradation or frequent failure
Version or commit
t3code 0.0.42-workspace-guard.1 (desktop AppImage), gh 2.101.0
Environment
Linux 7.0 (Ubuntu), desktop app plus a second web client via tailscale serve
Logs or stack traces
ws.rpc.pullRequests.activity -> PullRequestOperationError: Pull request operation activity failed: github requests to github.com are paused until the rate limit resets.
Workaround in use: a gh wrapper earlier on the server's PATH. For calls whose parent is the T3 server, it caches pr view --json and aliased pullRequest(number:) GraphQL reads for 10 minutes, or 24 hours once a PR is merged or closed. With it, later bursts of ~125 calls cost ~9 points instead of ~350.
Before submitting
Area
apps/web pull request views + apps/server PullRequestService / GitHub CLI integration
Steps to reproduce
gh api graphql -f query='{rateLimit{remaining resetAt}}'.GitHubCli.executespans in~/.t3/userdata/logs/server.trace.ndjson*, grouped by theirws.rpc.*ancestor.Expected behavior
PR detail and activity reads are cached and shared across clients. A merged or closed PR is not re-fetched on every focus change. Refreshing should back off before the user's GitHub quota runs out, not only after (
github requests to github.com are paused until the rate limit resets).Actual behavior
Each client re-requests
pullRequests.detailandpullRequests.activityfor every PR it shows. This happens on window focus (after 10 s), onvisibilitychange, and every 5 minutes while the user is active (the refresh hook withya=3e5/1e4inPanelLayoutControls). Merged PRs are included.Measured on one machine (trace data plus
rateLimitsampling):ghcalls every 3–4 minutes. In one 7-minute window, 822 of 881 T3ghcalls came fromws.rpc.pullRequests.detail(264 RPCs) andws.rpc.pullRequests.activity(192 RPCs).gh pr view --json author,comments,reviews,commitspaginates, so this averaged ~3 GraphQL points per call.t3.pullRequests.detail:*entries in the client's localStorage.This is a different path from #3581/#5673, which fixed per-branch
gh pr listpolling.Impact
Major degradation or frequent failure
Version or commit
t3code 0.0.42-workspace-guard.1 (desktop AppImage), gh 2.101.0
Environment
Linux 7.0 (Ubuntu), desktop app plus a second web client via
tailscale serveLogs or stack traces
Workaround in use: a
ghwrapper earlier on the server's PATH. For calls whose parent is the T3 server, it cachespr view --jsonand aliasedpullRequest(number:)GraphQL reads for 10 minutes, or 24 hours once a PR is merged or closed. With it, later bursts of ~125 calls cost ~9 points instead of ~350.