Skip to content

Commit d9a351e

Browse files
rynfaraorightgbarros-devBil0000Rishet11
authored
chore(upstream): adopt the 2026-08-19 T3 Code batch (#55)
* refactor(server): simplify error transformation with Effect.mapError in GitHubPullRequestCli (#7385) Signed-off-by: aoright <102943475+aoright@users.noreply.github.com> (cherry picked from commit 1896f39a38f6fe980ea137fbc402dde8be17b83a) * fix(preview): open local environment ports on localhost (#7300) (cherry picked from commit a87f691bd40c9e3c87715e3ce99ab39a584bdd1e) * fix(desktop): prevent quit shortcut spillover (#7397) (cherry picked from commit f3cb7f509595d304c6e2ccc7afe05c95ec45a7d8) * fix(desktop): stop overwriting a custom dock icon on launch (#7125) (cherry picked from commit 3b5d476eb6af9d14efe037e9d163848d6fd048d7) * feat(web): show project location in new thread picker (#7392) Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com> (cherry picked from commit fda740ad7b28334a6c579d801db22ad8f5914b5f) * fix(web): label pull request merge actions (#7381) (cherry picked from commit 26af903b9bec7f8da56bb5f545d9980d08d418e1) * fix(server): avoid PRs inherited from default upstreams (#7317) (cherry picked from commit 636caf4c70345d74c5391cbf9a607a91426a6e39) * fix(desktop): stop the passkey dialog from popping as soon as sign-in opens (#7437) (cherry picked from commit 6a687ee43bf222672ab8d3f4c0bab3d8d174f79f) * feat(desktop): mute a browser tab (#7252) (cherry picked from commit 3a02c9cf1d6767cad60e5056cb5b722931f6cc5d) * fix(web): improve disconnected composer placeholder (#7122) Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com> (cherry picked from commit bcfd485869a5eb9e97c6d281ac839c1cd7c1bd99) * fix(desktop): throttle hidden preview rendering (#7445) Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com> (cherry picked from commit fe281c5408164250da6688de6fc71ac12d8a9d8f) * fix(server): stop probing Grok, Cursor, and OpenCode unless turned on (#7459) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit e7f6a30caba5c390d5bbc9c300de89b68601c057) * fix(desktop): boot the main window unthrottled so cold start paints at full speed (#7460) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit efcf7d1ac03e784bdb26843d61ae0ff81c03cec6) * fix(threads): a merged PR settles its thread only once (#7454) (cherry picked from commit f21b47e52d988839a4e488d9fa98344891a69b7f) * fix(marketing): Safari gets the arm64 Mac download (#7473) (cherry picked from commit 5ea5a80a83c21c50f97f0851a8bd2cb9871f413a) * feat(web): add shortcuts to the surface dropdown (#7318) (cherry picked from commit 3b8e7bbbe0c49b00630f0c89e931056df679a650) * fix(marketing): never serve the Intel build to Apple Silicon Macs (#7477) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 67e2fe71d937b45384a53c4e0addd9a167aed885) * fix(web): animate command palette when closing (#5169) (cherry picked from commit 36f4314ab768dca3fc20af6ac25e7011b4b0447f) * fix(desktop): upgrade Clerk OAuth transport (#7479) (cherry picked from commit 7441b36926eb111a193183f98c06aced4f4c3acf) * feat(server): run the background service on macOS via launchd (#6286) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 2aa5f095fc3bb65c00cc4efce66a5473e2d4554a) * fix(server): keep the inherited-upstream PR guard a skipped lookup The guard adopted in 636caf4c returns before asking GitHub whether the branch has a PR, but returned without `skipped`, so the caller treated it as an authoritative "there is no PR": it called rememberLastKnownPr with a null result, wiping the branch's cached PR, and returned null instead of the fallback. The unpublished-branch guard immediately below returns `skipped: true` for exactly this reason, and its comment says a skipped lookup means "we did not ask", not "there is no PR". This is the same case, so it carries the same flag. A branch whose upstream is later repointed keeps its Merged badge instead of silently losing it. Found by an xhigh review of the 2026-08-19 upstream batch. Worth sending upstream. * docs(upstream): record the 2026-08-19 T3 Code batch --------- Signed-off-by: aoright <102943475+aoright@users.noreply.github.com> Co-authored-by: aoright <102943475+aoright@users.noreply.github.com> Co-authored-by: Guilherme Barros <gbarros1095@gmail.com> Co-authored-by: Bilal Bakr <62337003+Bil0000@users.noreply.github.com> Co-authored-by: Rishet11 <154429365+Rishet11@users.noreply.github.com> Co-authored-by: Wout Stiens <71498452+StiensWout@users.noreply.github.com> Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com> Co-authored-by: Taras <Taras.Fomin@gmail.com> Co-authored-by: Gianmarco <gianmarcosimone89@gmail.com> Co-authored-by: Theo Browne <me@t3.gg> Co-authored-by: Chris Deeming <chris@xenforo.com> Co-authored-by: Inaya Yousfi <zied.essaber@gmail.com> Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 6ebf6b6 commit d9a351e

80 files changed

Lines changed: 2951 additions & 468 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/upstream-review.md

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
remote: t3code-upstream
33
branch: main
4-
reviewed-through: "82b8a9380298509d68170961d9717be62836e490"
5-
reviewed-through-date: "2026-08-18"
4+
reviewed-through: "2aa5f095fc3bb65c00cc4efce66a5473e2d4554a"
5+
reviewed-through-date: "2026-08-19"
66
---
77

88
# T3 upstream review log
@@ -1618,6 +1618,90 @@ rather than on busy pull requests generally.
16181618

16191619
**Mobile (N7, N8) was not exercised at all.**
16201620

1621+
## 2026-08-19 — `82b8a9380298509d68170961d9717be62836e490..2aa5f095fc3bb65c00cc4efce66a5473e2d4554a`
1622+
1623+
Twenty-two upstream commits, ten change sets, one PR. **Twenty commits adopted** onto
1624+
`upstream/2026-08-19-batch`; two skipped. `git cherry` reported every one absent from Pylon,
1625+
so nothing was patch-equivalent. The deferred register was empty going in and stays empty.
1626+
1627+
**CS-1 (`#7459`) is the most valuable change here.** It flips the Grok and OpenCode schema
1628+
defaults to `false` (Cursor was already `false` in Pylon) and adds
1629+
`providerInstanceConfigEnabledFlag` / `resolveProviderInstanceEnabled`, resolving an
1630+
envelope-vs-config `enabled` conflict most-restrictively so a user's explicit disable is
1631+
never silently undone. **Accepted consequence worth remembering:** `writeSettingsAtomically`
1632+
strips values equal to the default, so an install that had Grok on by matching the old
1633+
default has nothing written for it and comes back disabled after this change. That is the
1634+
point of the commit rather than a regression, but it is a one-way default flip with no
1635+
migration, and the sparse-persistence detail means an explicit opt-in is indistinguishable
1636+
from an untouched default.
1637+
1638+
**CS-2 (`#7473` then `#7477`) had to be taken as an ordered pair.** `#7477` deletes
1639+
`macArch.ts` and `macArch.test.ts` outright and moves detection into `download.astro` and
1640+
`index.astro`, superseding the fix in `#7473`. Adopting only the later commit risks a
1641+
delete/modify conflict. The end state deliberately serves **every** Mac the arm64 build from
1642+
the hero button, with a code comment saying not to add arch detection back — browsers cannot
1643+
tell Apple Silicon from Intel, and Intel users choose on `/download`.
1644+
1645+
**CS-3 (`#7445` then `#7460`) is likewise inseparable**: the first throttles hidden preview
1646+
rendering, the second exempts cold start because the first regressed first paint.
1647+
1648+
**The launchd change (`#6286`) carried every branding conflict in the batch** — three files,
1649+
all resolved Pylon-first by taking upstream's platform-aware behavior and keeping Pylon's
1650+
copy. The launch agent label stays the compatibility identifier `com.t3tools.t3code.service`
1651+
per AGENTS.md; see the open question below.
1652+
1653+
Conflicts and adaptations, all resolved Pylon-first:
1654+
1655+
| File | Conflict | Resolution |
1656+
| ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1657+
| `apps/web/src/components/ThreadCommandSubtitle.tsx` | `#7392` adds a `ThreadCommandSubtitleVariant` design-review toggle; Pylon had simplified that away | Kept Pylon's single `WorkspaceIcon(isWorktree)` and dropped the variant harness; adopted the `COMMAND_PALETTE_META_ICON_CLASS` / `CommandPaletteMetaDot` renames the new palette imports. Nothing outside the file referenced the variant. |
1658+
| `apps/web/src/components/chat/ChatComposer.tsx` | `#7122` against a file that has diverged structurally (Pylon 4240 lines vs upstream 2824) | Manual port of the two-line change (import + placeholder constant) onto Pylon's file. Applied byte-wise because the file carries 6 NUL bytes and defeats `grep`. |
1659+
| `apps/web/src/providerInstances.ts`, `.../settings/ProviderSettingsPanel.tsx` | Import-list collision: Pylon's `providerInstancePrioritySortKey` vs upstream's `resolveProviderInstanceEnabled` | Union — both symbols are used. |
1660+
| `apps/server/src/cli/service.ts`, `apps/server/src/cli/connect.ts` | `#6286` platform-aware copy written as "T3 Code" / "T3 Connect" | Took the darwin/else branching, kept Pylon naming. |
1661+
| `docs/user/background-service.md` | Same, plus a whole new Platform Support section | Adopted the macOS content verbatim except product names; kept the literal `t3code.service` and `com.t3tools.t3code.service.plist` paths because that is what the code writes. |
1662+
1663+
Skipped:
1664+
1665+
| ID | Upstream | Why |
1666+
| ----- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1667+
| CS-10 | `db0659fe` (`#7421`) | AUR launcher icon paths. Pylon has no `packaging/aur` directory, so it is not applicable. |
1668+
| CS-9 | `324ddda3` (`#6563`) | `npx t3 triage`. 779 insertions whose playbook hardcodes `pingdotgg/t3code`, fetches the playbook from T3's raw GitHub URL, searches T3's issues, and builds a `github.com/pingdotgg/t3code/issues/new` URL. Adopting as-is would funnel Pylon users' bug reports into T3's tracker. Held for a from-scratch Pylon implementation, which needs a product decision first: `pylon-code/pylon` is private, so there is no public tracker for a user's generated issue to land in. |
1669+
1670+
Review and validation:
1671+
1672+
- 21 changed test files, **617 tests, 0 failures**. Note for future sessions: `vp test run`
1673+
globs nested worktrees under `.prime/` and `.claude/worktrees/`, which have no
1674+
`node_modules`, producing ~72 phantom module-resolution failures **and still exiting 0**.
1675+
Pass `--exclude '**/.prime/**' --exclude '**/.claude/worktrees/**'` for a real signal.
1676+
- Typecheck clean across 8 packages (server, web, desktop, contracts, shared, client-runtime,
1677+
marketing, mobile).
1678+
- Validated live in the web client against a seeded copy of real data: pairing, the new
1679+
composer placeholder, Settings → Providers showing Cursor/Grok/OpenCode disabled, and the
1680+
command palette rendering the new project-location subtitle.
1681+
- An xhigh review produced 13 findings. One was confirmed and fixed in `7d0a295db`: the
1682+
`#7317` inherited-upstream guard returned without `skipped`, so the caller wiped the
1683+
branch's last-known PR and dropped the Merged-badge fallback — the adjacent
1684+
unpublished-branch guard sets that flag for exactly this reason. **Worth sending upstream.**
1685+
The rest describe upstream design tradeoffs that were adopted as-is rather than rewritten
1686+
inside an adoption PR; the notable ones are recorded below.
1687+
1688+
Open questions raised by this batch, for a later decision:
1689+
1690+
- **The launchd label is `com.t3tools.t3code.service`.** AGENTS.md forbids renaming
1691+
compatibility identifiers during adoption, so it was kept. But Pylon's stated goal is that
1692+
Pylon and T3 Code can be installed side by side, and both would now claim the same launch
1693+
agent label and TCC records on one Mac. Upstream's own comment says the label is chosen so
1694+
those never collide — which only holds for a single product.
1695+
- **`QuitHold`** (`#7397`) clears its watchdog on entering `quitOnRelease` without installing
1696+
a replacement, so if key events stop arriving mid-hold the "Hold to Quit" overlay can stay
1697+
up with no quit.
1698+
- **The launchd plist has no `StartLimitBurst` equivalent**, so a server that cannot boot
1699+
respawns every 5 seconds indefinitely where systemd gives up after 5 failures in 300s.
1700+
- **`backgroundThrottling` now has two independent owners**`#7460`'s first-reveal trigger
1701+
and `#7445`'s frame-capture accounting — with no shared state between them.
1702+
- **A muted preview tab loses its speaker affordance** once the guest goes silent
1703+
(`tabAudioState` returns "none"), leaving no in-strip way to see or undo the mute.
1704+
16211705
## Deferred register
16221706

16231707
_The register is currently empty. DEF-1 and DEF-2 were adopted on 2026-08-11

apps/desktop/src/app/DesktopAppIdentity.test.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ describe("DesktopAppIdentity", () => {
208208
assert.equal(calls.setAboutPanelOptions[0]?.applicationName, "Pylon (Alpha)");
209209
assert.equal(calls.setAboutPanelOptions[0]?.applicationVersion, "1.2.3");
210210
assert.equal(calls.setAboutPanelOptions[0]?.version, "0123456789ab");
211-
assert.deepEqual(calls.setDockIcon, ["/icon.png"]);
211+
// Packaged: the bundle's own icon stands, so a custom one the user
212+
// attached survives.
213+
assert.deepEqual(calls.setDockIcon, []);
212214
}),
213215
{
214216
calls,
@@ -221,4 +223,28 @@ describe("DesktopAppIdentity", () => {
221223
},
222224
);
223225
});
226+
227+
it.effect("sets the dock icon only when running unpackaged", () => {
228+
const calls: ElectronAppCalls = {
229+
setAboutPanelOptions: [],
230+
setDockIcon: [],
231+
setName: [],
232+
};
233+
234+
return withIdentity(
235+
Effect.gen(function* () {
236+
const identity = yield* DesktopAppIdentity.DesktopAppIdentity;
237+
yield* identity.configure;
238+
239+
// Electron shows a generic icon for an unpackaged run, which is the
240+
// reason this call exists at all.
241+
assert.deepEqual(calls.setDockIcon, ["/icon.png"]);
242+
}),
243+
{
244+
calls,
245+
environment: { isPackaged: false },
246+
pngIconPath: Option.some("/icon.png"),
247+
},
248+
);
249+
});
224250
});

apps/desktop/src/app/DesktopAppIdentity.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ export const make = Effect.gen(function* () {
134134
yield* electronApp.setDesktopName(environment.linuxDesktopEntryName);
135135
}
136136

137-
if (environment.platform === "darwin") {
137+
// Unpackaged runs only. A packaged bundle already carries its icon in
138+
// Info.plist, so setting the dock tile again changes nothing except to
139+
// overwrite a custom icon the user attached to the app themselves.
140+
if (environment.platform === "darwin" && !environment.isPackaged) {
138141
const iconPaths = yield* assets.iconPaths;
139142
yield* Option.match(iconPaths.png, {
140143
onNone: () => Effect.void,

apps/desktop/src/ipc/channels.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const PREVIEW_ZOOM_OUT_CHANNEL = "desktop:preview-zoom-out";
5454
export const PREVIEW_RESET_ZOOM_CHANNEL = "desktop:preview-reset-zoom";
5555
export const PREVIEW_HARD_RELOAD_CHANNEL = "desktop:preview-hard-reload";
5656
export const PREVIEW_SET_COLOR_SCHEME_CHANNEL = "desktop:preview-set-color-scheme";
57+
export const PREVIEW_SET_AUDIO_MUTED_CHANNEL = "desktop:preview-set-audio-muted";
5758
export const PREVIEW_OPEN_DEVTOOLS_CHANNEL = "desktop:preview-open-devtools";
5859
export const PREVIEW_CLEAR_COOKIES_CHANNEL = "desktop:preview-clear-cookies";
5960
export const PREVIEW_CLEAR_CACHE_CHANNEL = "desktop:preview-clear-cache";

apps/desktop/src/ipc/methods/preview.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
DesktopPreviewRecordingSaveInputSchema,
1414
DesktopPreviewRegisterWebviewInputSchema,
1515
DesktopPreviewScreenshotArtifactSchema,
16+
DesktopPreviewSetAudioMutedInputSchema,
1617
DesktopPreviewSetColorSchemeInputSchema,
1718
DesktopPreviewCreateTabInputSchema,
1819
DesktopPreviewTabInputSchema,
@@ -153,6 +154,15 @@ export const setColorScheme = DesktopIpc.makeIpcMethod({
153154
yield* manager.setColorScheme(tabId, colorScheme);
154155
}),
155156
});
157+
export const setAudioMuted = DesktopIpc.makeIpcMethod({
158+
channel: IpcChannels.PREVIEW_SET_AUDIO_MUTED_CHANNEL,
159+
payload: DesktopPreviewSetAudioMutedInputSchema,
160+
result: Schema.Void,
161+
handler: Effect.fn("desktop.ipc.preview.setAudioMuted")(function* ({ tabId, audioMuted }) {
162+
const manager = yield* PreviewManager.PreviewManager;
163+
yield* manager.setAudioMuted(tabId, audioMuted);
164+
}),
165+
});
156166
export const openDevTools = tabMethod(
157167
IpcChannels.PREVIEW_OPEN_DEVTOOLS_CHANNEL,
158168
"desktop.ipc.preview.openDevTools",
@@ -372,6 +382,7 @@ export const methods = [
372382
resetZoom,
373383
hardReload,
374384
setColorScheme,
385+
setAudioMuted,
375386
openDevTools,
376387
clearCookies,
377388
clearCache,

apps/desktop/src/preload.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ contextBridge.exposeInMainWorld("desktopBridge", {
183183
hardReload: (tabId) => ipcRenderer.invoke(IpcChannels.PREVIEW_HARD_RELOAD_CHANNEL, { tabId }),
184184
setColorScheme: (tabId, colorScheme) =>
185185
ipcRenderer.invoke(IpcChannels.PREVIEW_SET_COLOR_SCHEME_CHANNEL, { tabId, colorScheme }),
186+
setAudioMuted: (tabId, audioMuted) =>
187+
ipcRenderer.invoke(IpcChannels.PREVIEW_SET_AUDIO_MUTED_CHANNEL, { tabId, audioMuted }),
186188
openDevTools: (tabId) =>
187189
ipcRenderer.invoke(IpcChannels.PREVIEW_OPEN_DEVTOOLS_CHANNEL, { tabId }),
188190
clearCookies: () => ipcRenderer.invoke(IpcChannels.PREVIEW_CLEAR_COOKIES_CHANNEL),

0 commit comments

Comments
 (0)