Skip to content

chore(sync): absorb upstream main through 4696218565 - #591

Merged
NoahHendrickson merged 1949 commits into
customfrom
t3/upstream-sync-2026-11-29
Nov 29, 2026
Merged

NoahHendrickson merged 1949 commits into
customfrom
t3/upstream-sync-2026-11-29

Conversation

@NoahHendrickson

@NoahHendrickson NoahHendrickson commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Brings custom up to upstream main at 4696218: 1,935 upstream commits since the last sync (ad2bdc7), with every fork customization kept. Upstream's biggest changes are durable workflows (server, web and mobile), per-thread MCP servers and skills, machine-load warnings, the removal of the changed-files card under replies, new thread connection statuses, and a SharedTooltipTrigger performance pass across the web UI. 108 files conflicted. custom was merged back in afterwards for #589 and #590.

Report: ~/.t3-fork/scratch/sprints/no3y-code-4ff04de2/context/upstream-sync-2026-11-29.md

How the fork was kept

  • Changed-files card (needs your call). Upstream removed it (feat(web,mobile): remove the changed-files card under assistant turns pingdotgg/t3code#41317). The fork follows and retires fork-changed-files-card and fork-changed-files-fold: their CSS, guards, story and Code Connect file. The "Worked for" diff stat stays. Its onOpenTurnDiff plumbing, which upstream deleted along with the card, is re-added and fenced under fork-inline-turn-diff.
  • Scheduled tasks. Upstream added its own effort picker (fix(web): allow setting reasoning effort for scheduled tasks pingdotgg/t3code#30253) with a new draft shape. The fork keeps its own picker and its modelKey + baseModelSelection draft, and takes upstream's other fixes there (weekday labels, resetting the branch on a project change). Weekdays stay Monday-first.
  • Server.
    • Settlement: the fork's own-checkout delegates (settlesWithParent) and upstream's linked-machine delegates (delegatedFrom) share one check, settlesWithoutPullRequest. Upstream's new SQL clause, which lets a child settle once its run has ended, sits inside the fork's gate.
    • Monitors: the fork's backgroundMonitorRunIds is gone, because upstream's monitorUpdateRunIds already carries the fork's PR-watch exclusion.
    • Launches: a launch without a branch records upstream's recordedBranch for worktrees and still leaves the field out for local checkouts.
    • Bot report tests now provide the Digest service, which upstream's projection store requires.
  • Web.
    • Composer: ChatComposer was rebuilt by replaying upstream's diff, and six rejects were ported by hand. The fork's attach button now offers upstream's Files… / Folder… picker, and its file input sits outside the footer (fix(web): a photo picked on a phone attaches even when the composer collapses pingdotgg/t3code#41021). The fork's runtime-mode menus read upstream's runtime limits and close when Settings or Usage covers the thread. The fork's stash move no longer evicts when the stash is full (fix(web): a full prompt stash no longer discards your oldest prompt pingdotgg/t3code#43183).
    • Shadows: upstream drift was replayed onto the 8 override shadows. Where upstream's SharedTooltipTrigger can't carry a fork data attribute, the attribute moved onto the rendered element, or the fork kept its Base UI tooltip.
    • Sidebar: upstream's new connecting, reconnecting and offline statuses draw no mark on fork cards (follow-up: a fork mark). Upstream fixes were ported into the fork's Sidebar (cmd-click selection, double-click, phone drawer, triage permissions).
    • i18n: 6 fork keys were added to the new Polish catalogs, and the turn diff stat now uses a catalog string that's still translated.
  • Desktop design mode. Upstream isolates the preview preload (fix(desktop): preview pages run in their own JavaScript world and popups open web links only pingdotgg/t3code#41757, contextIsolation=true) and moves its element picker into the page's world. The fork's design-mode source resolver used to read React fibers and install its page global from the preload, so it would have found nothing. It now installs from upstream's PageWorld.ts, and upstream's preload-bundle test checks that the global is there.
  • Desktop. The fork's Clerk scheme-registrar wrapper is kept around upstream's new owner-only token storage, which replaces ClerkTokenStore. Upstream's window-open, spellchecker and permission handlers were ported into the fork's wireRendererWindow.
  • Mobile.
    • Native dependencies: both forked dependencies were rebuilt on upstream's new tarballs. react-native-screens-5.0.0-t3.63-65619e99 carries the hidden-bar back swipe (no3y/hidden-bar-back-swipe-t3.63). react-native-enriched-markdown-1.2.0-t3.19-4134b518 carries the inline code chip and weights (no3y/inline-code-chip-t3.19). Neither has been compiled natively yet.
    • Fonts: upstream's configurable fonts are adopted, and the fork's iPhone font pick wraps them.
    • Unsent attachment-only tasks keep the fork's server-matching title over upstream's "N attachments" (fix(mobile): an offline attachment-only new task is titled by its attachments pingdotgg/t3code#43821), and upstream's two tests are fenced.
  • Docs. Upstream condensed and renumbered the docs. The fork's notes moved into 00_development.md, AGENTS.md and the user guides.
  • Declined upstream tests. These cases need UI the fork replaced: TraitsPicker scheduled-task cases, boring-sidebar thread search, the picker's provider-sidebar tooltip, subagent hover previews, and two draft-layout cases. Each carries a fenced note saying why.

Review

A 3-round Sol loop found three upstream fixes that hadn't reached the fork's own components, and all three are fixed:

A third round reviewed the design-mode fix CI uncovered and approved it. Its one nit, keeping the IME Escape cases against the Prompt font field, is declined and listed as a follow-up.

Browser-test triage then found a fork crash on a subagent row with no prompt, and fork mode menus that stayed open behind Settings. Both are fixed.

Checks run locally

  • Typecheck: contracts, shared, client-runtime, provider-core, server, web, desktop, mobile and fork-storybook.
  • Lint and checks: lint on the touched files, the fork lint ratchet (three baselines lowered), knip, design-lint and i18n:check. LiveStatusLine was re-stamped; its only change is a null prop.
  • Web tests: 1,777 across fork guards and src/custom, plus the touched browser suites. All 38 touched browser files pass after triage.
  • Server tests: the touched suites (968), including the agent context budget, which now holds the fork's measured values.
  • Desktop and mobile tests: the desktop app and window tests, and the full mobile unit suite (4,089).

Follow-ups (not in this PR)

  • A fork card mark for connection statuses.
  • Usage-page shortcut toggle (fix(web): pressing the Usage shortcut again closes Usage pingdotgg/t3code#30459): the fork's Usage is a page, not a modal.
  • The mobile font pickers overlap (upstream's Text picker and the fork's Font picker), and no3yChipHeight should be re-measured for SF Mono and Meslo.
  • Decide on upstream's new reply Share button on no3y mobile.
  • The coordinator item in upstream's cmd+k thread actions.
  • Cover the draft thread-details changes row in the fork's layout.
  • Keep upstream's IME Escape cases against a plain font family field (Prompt font).
  • Design mode in the desktop preview hasn't been checked by hand since the page-world move.

🤖 Signed: Claude Opus 5.5 (claude-opus-5-5) via Claude Code

  • Claude Opus 5.5 (claude-opus-5-5) via Claude Code subagents: resolved the Sidebar and mobile conflict clusters, and rebuilt the react-native-screens and enriched-markdown tarballs
  • OpenAI GPT Sol (gpt-6.1-sol) via Codex: review (fixes applied)

Reviewed with sol-loop: 3 rounds with gpt-6.1-sol on high. Sol verdict: approved

StiensWout and others added 30 commits November 28, 2026 01:29
)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…true guard (pingdotgg#44828)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…s in their URL (pingdotgg#44821)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…hes (pingdotgg#44838)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…4814)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…itory-path groups (pingdotgg#44843)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…y key (pingdotgg#44845)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gg#44846)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…grams (pingdotgg#44853)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ose direction (pingdotgg#44823)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
pingdotgg#44854)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…nks (pingdotgg#44858)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…dotgg#44860)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…otgg#44863)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…tgg#44871)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ows it (pingdotgg#44876)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…es (pingdotgg#44874)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#44878)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…44883)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
… text (pingdotgg#44895)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…g#44888)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…itory path separators (pingdotgg#44870)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ut of the media gallery (pingdotgg#44887)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
only21mil and others added 10 commits November 28, 2026 22:26
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Merges upstream pingdotgg/t3code main (1935 commits since ad2bdc7) into custom,
keeping every fork customization. Fixes for typecheck, lint and guards follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d mobile

Ports the fork's turn-diff stat, stash move, attach button and scheduled-task
editor onto upstream's reworked APIs, rebuilds the two forked mobile native
dependencies on upstream's new tarballs, and replays upstream drift onto the
override shadows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ards

Upstream pingdotgg#41317 removed the changed-files card under assistant turns; the
fork follows it, keeping the turn-diff stat on the Worked for row. Guards
follow upstream's renames (i18n labels, passive refresh, font hooks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #589 and #590, which merged after the sync branched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rops

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… queue banner

Sol review round 1: the fork's model traits follow a queued edit's own draft
(d572ce9), Add project keeps the draft being written (pingdotgg#42889), the queue
banner shows file mentions as text (pingdotgg#40924), and the fork's mode menus close
behind Settings (pingdotgg#29282). Also guards a subagent row without a prompt and
fences or declines new upstream browser cases that need UI the fork replaced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL labels Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

This PR changes the test suite by +2520 test cases (browser +386, unit +1308, server +826).

New browser test files: apps/web/src/browser/BrowserSurfaceSlot.browser.test.tsx, apps/web/src/components/ChatView.queuedEdit.browser.test.tsx, apps/web/src/components/WorktreeLayoutApprovalDialogHost.browser.test.tsx, apps/web/src/components/auth/PairingRouteSurface.browser.test.tsx, apps/web/src/components/chat/ComposerAttachButton.browser.test.tsx, apps/web/src/components/chat/ComposerCommandMenu.browser.test.tsx, apps/web/src/components/chat/FileSearchResults.browser.test.tsx, apps/web/src/components/chat/ProposedPlanCard.browser.test.tsx, apps/web/src/components/chat/TerminalContextInlineChip.browser.test.tsx, apps/web/src/components/chat/ThreadDetailsMachineLoad.browser.test.tsx, apps/web/src/components/chat/tablePng.browser.test.ts, apps/web/src/components/diffs/DiffCommentAnnotation.browser.test.tsx, apps/web/src/components/files/PreviewImageContent.browser.test.tsx, apps/web/src/components/issue/IssueDetailPanel.browser.test.tsx, apps/web/src/components/issue/IssuesPage.browser.test.tsx, apps/web/src/components/pullRequest/PullRequestBaseBranch.browser.test.tsx, apps/web/src/components/pullRequest/PullRequestDiffUnavailableState.browser.test.tsx, apps/web/src/components/pullRequest/PullRequestReviewAnnotation.browser.test.tsx, apps/web/src/components/pullRequest/PullRequestTitleEditor.browser.test.tsx, apps/web/src/components/pullRequest/PullRequestsColumn.browser.test.tsx, apps/web/src/components/pullRequest/PullRequestsUnavailableState.browser.test.tsx, apps/web/src/components/settings/EasDeviceHostEditor.browser.test.tsx, apps/web/src/components/settings/EnvironmentsMap.browser.test.tsx, apps/web/src/components/settings/LabsSettingsPanel.browser.test.tsx, apps/web/src/components/settings/LabsSettingsPanel.scope.browser.test.tsx, apps/web/src/components/settings/OpenSourceLicenses.browser.test.tsx, apps/web/src/components/settings/ProjectIconPickerDialog.browser.test.tsx, apps/web/src/components/settings/SimlockDeviceHostEditor.browser.test.tsx, apps/web/src/components/settings/SourceControlAccountSettings.browser.test.tsx, apps/web/src/components/settings/TextGeneratorsSettings.browser.test.tsx, apps/web/src/components/settings/useRenderedSettingsPathname.browser.test.tsx, apps/web/src/components/sidebar/SidebarHostPressureWarning.browser.test.tsx, apps/web/src/components/ui/combobox.browser.test.tsx, apps/web/src/components/usage/UsageAccessDialog.browser.test.tsx, apps/web/src/components/workflows/WorkflowPane.browser.test.tsx, apps/web/src/components/workflows/WorkflowRunsView.browser.test.tsx, apps/web/src/lib/preserveReadingPosition.browser.test.ts, apps/web/src/markdown-clipboard.browser.test.ts.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

@github-actions github-actions Bot added the 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. label Nov 29, 2026
@NoahHendrickson NoahHendrickson added the agent-context-increase Accepts growth in the agent's built-in instructions or tool list on this PR label Nov 29, 2026
@NoahHendrickson

Copy link
Copy Markdown
Owner Author

Agent context budget: the growth against custom is upstream's own text (claude +102 B, codex +277 B, MCP tool list +4,548 B, mostly upstream's new workflow, milestone and per-thread MCP tools); the fork adds none in this PR. I labelled it agent-context-increase as #402 and #317 were. Remove the label if you'd rather trim it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@NoahHendrickson NoahHendrickson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code-quality review of 9402276fde0bf7f8a15ca330fdaf3860e4305cfe

Scope. This PR shows 3,536 changed files against custom, so I didn't review upstream's own code. I compared each file's fork delta before the sync (ad2bdc76a5..1596ef9408) with its fork delta after it (4696218565..HEAD). 151 files differ, and those are where resolution work happened. I also read the merge's conflict resolutions with git show --remerge-diff d128e5da19 and read the seven follow-up commits. Comments are in the body because inline comments 422 on files past GitHub's 3,000-file list.

Overall the resolution is disciplined. The fork's footprint barely grew, every change is fenced, and the server merges are clean: settlesWithoutPullRequest and the SQL gate, monitorUpdateRunIds replacing backgroundMonitorRunIds, and recordedBranch. One finding is a structural miss that I'd fix before merging. The rest are smaller.

1. Scheduled tasks: upstream now has the draft shape the fork needs, and the fork keeps its stringly-typed copy (structural, missed simplification)

apps/web/src/components/settings/scheduledTasksSettings.logic.ts:146, ScheduledTasksSettings.tsx:354 and :1620, custom/scheduled/ScheduledTaskEditor.tsx:107, custom/scheduled/ScheduledTaskDetail.tsx:400

Upstream pingdotgg#30253 replaced modelKey: string with modelSelection: ModelSelection | null. That one typed field keeps the options, so it keeps the effort too. The fork's modelKey + baseModelSelection pair exists to do exactly that. The sync re-adds the old shape on top of upstream's change:

  • an "instance:model" string encoding with a bespoke parser, splitModelKey, which now exists twice: once in the upstream-shadowed ScheduledTasksSettings.tsx:354 and once in ScheduledTaskEditor.tsx:107
  • two fields that every writer has to keep in step: modelKey and baseModelSelection at ScheduledTasksSettings.tsx:2022-2036 and :1802, ScheduledTaskEditor.tsx:259-274 and ScheduledTaskDetail.tsx:509
  • scheduledTaskModelSelection, whose only job is to merge the two fields back into the ModelSelection upstream already stores

Your ScheduledTaskModelPicker.onSelectionChange already emits a full ModelSelection. I think the fork can keep its picker and take upstream's draft:

  • onSelectionChange: (selection) => ({ ...current, modelSelection: selection })
  • onInstanceModelChange: keep current.modelSelection when the instance and model match, otherwise createModelSelection(instanceId, model). That is upstream's rule, and the fork's baseModelSelection: null branch already does it.
  • taskToDraft and EMPTY_DRAFT take upstream's lines unchanged.

That deletes modelKey, baseModelSelection, both splitModelKey copies and scheduledTaskModelSelection. It also takes the fork's delta in scheduledTasksSettings.logic.ts and the draft parts of ScheduledTasksSettings.tsx to zero, which is the conflict surface for every later sync. One caveat is a behavior edge: today, when a disabled instance falls back to the project default and the saved model happens to be that default, the saved options come back. Upstream's shape drops them. Keep or drop that on purpose, not by accident. The PR body says "keeps its own picker and its modelKey + baseModelSelection draft", but the picker and the draft are separate decisions. Only the picker needs to stay.

2. Re-added onOpenTurnDiff keeps a parameter nothing passes (type contract)

components/chat/useRightPanelActions.ts:317, timelineRowContext.ts:80, MessagesTimeline.tsx:321

Upstream deleted this plumbing along with the changed-files card. Its per-file rows were the only thing that passed filePath. The fork re-adds the full signature (runId: RunId, filePath?: string) through three layers, but its only caller, ForkTurnDiffStat, calls onOpenTurnDiff(summary.runId). Narrow it to (runId: RunId) => void everywhere and drop filePath from the selectTurn call. Re-adding the plumbing is the right call; it should come back the size of what still uses it.

3. Desktop: the spellchecker is no longer awaited, and the reason is the sync/Effect double definition (sequencing and indirection)

apps/desktop/src/window/DesktopWindow.ts:615-640 and :1388

Upstream runs yield* electronApp.preferredSystemLanguages inside window creation, so the languages are set before the renderer loads. Ported into the fork's synchronous wireRendererWindow, it became a fire-and-forget void runPromise(Effect.map(...)), and its ordering against page load is now a race. The sync helper also already has an identity wrapper at :1388 (Effect.fn(... function* (window) { wireRendererWindow(window); })). Make wireRendererWindow the Effect.fn itself and yield* it at :925, which is inside the generator. That puts upstream's ordering back and deletes the wrapper, so there's one definition instead of two.

4. Smaller items

  • draftId?: DraftId | null | undefined (custom/DraftProjectPicker.tsx:84, custom/DraftProjectPill.tsx:99). That type has three ways to say "no draft", and they reach openAddProject(draftId: DraftId | null) through ?? null and props.draftId. Pick one: draftId?: DraftId, with openAddProject(draftId?: DraftId).
  • The traits target in ChatComposer (ChatComposer.tsx:3986) is a three-level nested ternary. It re-derives the same "a queued edit targets its own draft" rule that upstream expresses once, as routeKind/draftId overrides on its bar (typeof composerDraftTarget === "string" ? "draft" : routeKind). Derive traitsRouteKind and traitsDraftId once with upstream's expressions and keep the flat spread, so the fork reads like upstream there.
  • The 1k-line threshold. apps/server/src/orchestration-v2/ThreadSettlementService.ts goes from 960 to 1,050 lines, and BranchToolbarBranchSelector.tsx from 986 to 1,026. Both crossings come mostly from upstream's own growth: upstream alone is at 992 and 978. The fork adds 14 lines to the settlement file (settlesWithoutPullRequest and its fences). I'm not blocking on that in a sync, but settlesWithoutPullRequest and the ownedByAnotherThread(remembered, group) fences are the natural first thing to move out if that file gets split.

Verdict

No approval, because of finding 1. The sync is a clear chance to delete the fork's divergent scheduled-task draft model, and keeping it keeps two hand-rolled string parsers and a two-field invariant in shadowed upstream code. Findings 2 and 3 are quick narrowings worth doing in the same pass. The rest is optional.

@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB +29 B (+0.6%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB +29 B (+0.7%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB +29 B (+0.6%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB +29 B (+0.7%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: 1596ef9 · PR result: aac0603 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@NoahHendrickson NoahHendrickson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review of 9402276fde

I reviewed the fork-authored part of the sync, not the 1,935 upstream commits. That means the conflict resolutions in d128e5da19 (git show --remerge-diff), the follow-ups in d128e5da19..9402276fde, and every file whose fork delta changed: git diff ad2bdc76a5 1596ef9408 against git diff 4696218565 9402276fde, 94 files. I also checked the 8 override shadows against upstream's changes to their originals. Nothing was run: the worktree had no node_modules.

Four bugs, plus one smaller gap. All are inline below.

  1. Design mode loses React source in the preview browser. Upstream turned on context isolation for the preview guest. The fork's DesignSourceResolver still assumes it is off, so the engine never sees the resolver.
  2. Running threads move to Completed while their machine reconnects. The new connecting, reconnecting and offline statuses map to a null kind, which sorts into Idle. The completed-hold then paints those threads as Completed. Mobile has the same mapping.
  3. Upstream's sidebar re-render fix (a9f5749, pingdotgg#45026) is undone for the fork's Sidebar. It still reads useSidebar(), as do three SidebarV2ChromeRows components.
  4. On iPhone, moving the Text size slider resets the interface font to System. Upstream's theme runtime now writes --font-sans, --font-medium and --font-bold, and it overwrites the fork's Interface font. The follow-up list mentions the overlapping pickers, but not this clobbering.
  5. (Lower) The side chat window doesn't get upstream's Origin-header policy, which is scoped to the main window's webContents.

Claims I checked and found correct:

  • Server: settlesWithoutPullRequest (settlesWithParent || delegatedFrom != null) replaces isDelegatedAppThread in all three of upstream's call sites, and the run-ended SQL clause sits inside the fork's gate. The PR-watch exclusion moved into monitorUpdateRunIds, with no remaining reference to backgroundMonitorRunIds. recordedBranch is recorded only for worktree launches.
  • Composer: all of upstream's additions are kept apart from the replaced controls bar. Also correct: the Files…/Folder… attach menu, ComposerAttachInput outside the footer, the runtime-limits context, stash-full returning before the cancel, the onOpenTurnDiff chain, queued-edit traits, the Add project draft id, plain-text file mentions in the queue banner, and the subagent row with no prompt.
  • Sidebar: cmd/shift-click with openThreadKey, double-click only on the open thread, the phone drawer closing, triage permissions on settle and snooze, and the scheduled-task draft shape with Monday-first weekdays. The web locales have matching key sets.
  • Desktop and mobile: the Clerk registrar wraps upstream's storage(). wireRendererWindow carries window-open, openExternal permissions and the spellchecker. Both forked tarballs exist under the names in package.json, pnpm-workspace.yaml and the lockfile, their sha512 matches the lock, and their contents differ from upstream only by the fork patches. Attachment-only titles use deriveThreadTitleSeed.

🤖 Reviewed by Claude Opus 5.5 (claude-opus-5-5) via Claude Code. Four Opus 5.5 subagents each reviewed one area (server, web chat, web sidebar, desktop and mobile), and I checked every finding against the code.

export const PREVIEW_WEBVIEW_PREFERENCES =
"contextIsolation=false,sandbox=true,nodeIntegration=false";
"contextIsolation=true,sandbox=true,nodeIntegration=false";

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Design mode can no longer resolve React source. Upstream switched the preview guest to contextIsolation=true, here and in DesktopWindow.ts:905 (will-attach-webview). It also moved getElementContext into PageWorld.ts, which runs in the page's world.

The fork's apps/desktop/src/preview/DesignSourceResolver.ts, imported from preview-pick-preload.ts:4, still assumes isolation is off; its header says so. It defines __T3_DESIGN_SOURCE_RESOLVER_V1__ on the preload's own globalThis and calls react-grab and bippy from the preload.

The design engine is injected with webview.executeJavaScript(engineCode, false) (ForkPreviewDesignMode.tsx:48) and runs in the page's world. There it reads the global (custom/designMode/engine/nativeSource.ts:25) and finds nothing. Even if it could see the global, the isolated preload can't reach React's fibers or the devtools hook.

What happens: in any previewed app without Forge tags, every design-mode click falls back to "no resolver". You get no data-dc-source, no component name and no props, and nothing reports an error.

Fix: move the resolver into PageWorld.ts and expose it through the pageWorld bridge, the way upstream did for elementContext.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 9b5126e: DesignSourceResolver now exports installDesignSourceResolver(), which upstream's installPageWorld calls (fenced), so the resolver global and its fiber reads live in the page's world. The preload import is gone, and upstream's preview-preload-bundle test now also asserts the global exists in the page world.

@@ -85,6 +85,13 @@ export function resolveSidebarV2CardStatusKind(input: {
}): SidebarV2CardStatusKind | null {
// Worktree setup (upstream "Setting up") draws as working, as upstream's rollups count it.
if (input.status === "preparing") return "working";
// A thread whose machine is (re)connecting or offline has no live run to mark.
if (

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running threads land in Completed while their machine reconnects. resolveThreadConnectionStatus (client-runtime/state/models.ts:137) returns connecting, reconnecting or offline only for a thread whose runtime is active: queued, starting, running or waiting, or idle with background work holding completion.

Mapping those statuses to null makes sidebarV2StatusBucketForKind put the thread in "idle". createSidebarV2CompletedHoldTracker then sees the thread go from working to idle and paints it "done".

What happens: two agents are running on a remote machine and the WebSocket drops for a moment. Both rows move from Working to Completed. If the machine stays offline, they stay in Completed for 5 minutes, then fall to Idle. Before upstream added these statuses, the threads stayed in Working.

"No mark on the card" is fine. The section placement is the problem, because it tells the user the run finished.

Fix: have grouping keep these three statuses in working, or in some neutral bucket, without reusing the null mark.

apps/mobile/fork/forkStatusGrouping.ts:96-101 has the same mapping. Neither status-grouping test covers these statuses.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b3c3123: connecting, reconnecting and offline now resolve to a markless "connection" kind. It files the thread under Working, so the completed hold never sees a working→idle step, and sidebarV2CardTopStatus still returns no mark. Mobile's forkStatusGrouping is mirrored, its mark and colour switches treat it like idle, and sidebarV2StatusGrouping.test.ts covers all three statuses.

Comment thread apps/web/src/components/Sidebar.tsx Outdated
@@ -2461,7 +2469,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
const coordinatorsSectionCollapsed = isListSectionCollapsed("coordinators");
/* fork:end fork-coordinator-threads */
const router = useRouter();
const { isMobile, setOpenMobile } = useSidebar();
const { isMobile, setOpenMobile } = useSidebarMobile();
/* fork:begin fork-collapsed-thread-tabs — see .fork/customizations.yaml#fork-collapsed-thread-tabs */
// A stable store function, so rename keeps its identity across sidebar toggles.
const { setOpen: setSidebarOpen, onCollapse: onSidebarCollapse } = useSidebar();

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line undoes upstream's "sidebar toggle no longer re-renders every thread row" fix (a9f5749, pingdotgg#45026). The sync moved isMobile and setOpenMobile onto useSidebarMobile(), but this line still subscribes to SidebarContext. SidebarProvider (ui/sidebar.tsx:237-248) builds a new context value whenever open or openMobile changes, so every sidebar toggle re-renders this whole component. The comment promises only that setOpen keeps its identity.

setOpen and onCollapse are both stable store functions. Serving them from SidebarMobileContext, or from a third stable context, brings the fix back.

The same applies to custom/SidebarV2ChromeRows.tsx:191, :316 and :352. Those components read only isMobile and setOpenMobile, so they can switch to useSidebarMobile() directly.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b3c3123: SidebarMobileContext also carries the stable setOpen and onCollapse store functions (fenced in ui/sidebar.tsx). The fork's Sidebar and the three SidebarV2ChromeRows components now read useSidebarMobile() only, so a sidebar toggle no longer re-renders them.

previous.monoFontId !== next.monoFontId
) {
const variables = {
...resolveTextScaleVariables(next.baseFontSize),

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On iPhone, moving the Text size slider resets the interface font to System. Before the sync, this operation wrote only the text-scale variables. It now also writes --font-sans, --font-medium and --font-bold from upstream's fontId for every theme, whenever font size, font or mono font changes.

The fork's installNo3yInterfaceFont (fork/no3yInterfaceFontState.ts:22) writes the same variables, but only when its own Interface font pick changes. At startup the fork subscription runs second, so it wins.

What happens: pick Cinnabar Interface, then move the slider. setBaseFontSize calls applyThemeRuntime (AppearancePreferencesProvider.tsx:326), which puts the font back to System. The UI chrome drops to SF Pro, while markdown, read through useFontFamilies, stays Cinnabar. Picking DM Sans in upstream's Font row gives the opposite split. The pick comes back only after a relaunch or another Interface font change.

Fix: on NO3Y_IPHONE, either skip the family variables here or feed the fork's font into resolveFontFamilyVariables. This goes beyond the picker overlap listed in the follow-ups: it reverts a saved setting.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b3c3123: on NO3Y_IPHONE, applyThemeRuntime lays currentNo3yInterfaceFontVariables() over upstream's family variables whenever it writes the text variables. Moving the Text size slider, or changing upstream's font rows, keeps the picked Interface font.

@@ -1092,6 +1133,19 @@ export const make = Effect.gen(function* () {

// Desktop IPC only answers the main window, so register it before its renderer can call in.
yield* electronWindow.setMain(window);
remoteRequestHeaderOwner = window;
const detachRemoteRequestHeaders = installMainWindowRemoteRequestHeaderPolicy(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Lower priority; a missed port, not a new break.) installMainWindowRemoteRequestHeaderPolicy returns early for any details.webContentsId !== mainWebContentsId (RemoteRequestHeaders.ts:95). The fork's side chat window (fork/ForkSideChatWindow.ts) uses the same session but has its own webContents, so its requests to a remote environment still send Origin: t3code://app.

Behind a reverse proxy that checks Origin, the main window now connects to a remote environment, but the side chat is still rejected. If the side chat should behave like the main window, pass its webContents id to the policy too.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in this PR. Upstream's policy is scoped to one mainWebContentsId, and Electron allows only one onBeforeSendHeaders listener per session, so covering the side chat means reworking upstream's policy to take a set of webContents. It's listed as a follow-up.

xxxxxxxxxxxxx and others added 4 commits November 29, 2026 02:57
…orld

Upstream pingdotgg#41757 isolates the preview preload (contextIsolation=true) and moves
the element picker into the page's world. The fork's design-mode resolver read
React fibers and installed its page global from the preload, so it would find
nothing; it now installs from upstream's PageWorld. Also fences two new upstream
browser cases to the fork's brand name and typography picker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s layout

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Threads whose machine reconnects keep their section: a markless
  "connection" kind files them under Working instead of Idle, so the
  completed hold no longer paints them Completed (web and mobile).
- The fork's Sidebar and chrome rows read setOpen/onCollapse and the mobile
  fields from the stable sidebar context, restoring upstream pingdotgg#45026.
- On the no3y iPhone the theme runtime keeps the picked interface font when
  text size or upstream's font settings change.
- Scheduled tasks take upstream's modelSelection draft; the fork keeps only
  its picker (drops modelKey, baseModelSelection and both splitModelKey).
- onOpenTurnDiff narrows to what the Worked-for stat passes, the spellchecker
  is set before the page loads again (wireRendererWindow is an Effect.fn), and
  the queued-edit traits target uses upstream's two expressions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-context-increase Accepts growth in the agent's built-in instructions or tool list on this PR 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. size:XXL vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.