Skip to content

chore(sync): absorb upstream main through ad2bdc76a5 - #402

Merged
NoahHendrickson merged 2031 commits into
customfrom
t3/upstream-sync-1
Nov 23, 2026
Merged

NoahHendrickson merged 2031 commits into
customfrom
t3/upstream-sync-1

Conversation

@NoahHendrickson

@NoahHendrickson NoahHendrickson commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Brings custom up to upstream main at ad2bdc7 (2,023 upstream commits), keeping every fork customization. The biggest upstream change is the gt-react i18n wave; the rest is server V2 follow-ups, desktop and the context menu, and ChatComposer/ChatView refactors.

How the fork was kept

  • Translations. Upstream now translates all copy and lints for untranslated strings. Fork copy stays English for now:

    • i18n:check tolerates web keys the fork removed (fenced fork-i18n-catalog, with a guard).
    • Fork lines inside upstream files carry a reasoned no-untranslated-copy disable.
    • The rule is deferred in the fork lint ratchet at 890.

    Translating fork copy into every locale is a separate decision.

  • Server.

    • Upstream's thread.create now carries the first message, so the fork resolves a launcher's bot before creation and applies crew rules to that message.
    • Upstream moved the finalize refresh into the background. Shared-checkout threads still run it inline (canFollow), so the next queued turn can't beat the fork's branch follow. A new TestClock test covers this and fails without the fix.
  • Web.

    • ChatComposer was rebuilt by replaying upstream's diff, with 11 rejects ported by hand.
    • ChatView merged 13 hunks, and BranchToolbar picked up upstream's workspace-repositories control. Plain-folder projects keep upstream's workspace-mode selector.
    • The shadows, the icon shim and the stores were updated; the stores are one version past upstream so fork state migrates again.
  • Desktop. The fork-identity fence moved to DesktopSshEnvironment. The fork's copy of the context menu was swapped for upstream's new one.

  • Declined upstream tests. Two upstream tests check UI the fork's sidebar cards don't have, the linked-issue badge and the keyboard sidebar tree. Each carries a note saying why.

  • Merged custom back in at 84afbb4. One conflict: the branch-link copy now sits next to upstream's translated "Copy branch name".

Review

  • A 3-round Sol loop fixed:

    • the workspace picker on plain-folder projects
    • linked-thread opening from subagent groups
    • the branch-follow race
    • the scope of the i18n exception
  • Gemini 4 Neon found upstream fixes that never reached the fork's own components, and those are fixed:

    • digit keys behind open menus answered pending questions
    • queued sends after /clear could be steered into the running turn, and failed sends were silent
    • the "Waiting on N subagents" label was missing
    • bot "working" detection only worked in English
    • a cancelled turn counted as "not following" in the new branch-follow check
    • the Scheduled page didn't lock the model for tasks bound to a thread
    • usage-limit warnings ignored the UI language
  • PR review fixes: the bot is resolved once per launch; shared-checkout threads no longer wait for the workspace rescan; the queue banner uses the quiet projection and translated labels; the Scheduled editor no longer locks the model for GitHub PR tasks; and the usage tray's labels are translated. The fork's draft project picker also follows the manual sidebar order now (upstream fix(web): the new-thread project picker follows the manual project order pingdotgg/t3code#29846).

Checks run locally

  • Typecheck: web, server, desktop and Storybook.
  • Lint and checks: lint, fork lint ratchet, i18n:check, fmt, knip.
  • Web tests: 1,311 tests across fork guards and src/custom, plus the touched browser suites.
  • Server tests: the touched server tests.
  • Known host failures: the ChatView "shortcut conditioned on rightPanelOpen" case fails on macOS even on pristine upstream, and the DesktopLinuxUrlHandler APFS cases fail locally from before this sync.

Follow-ups (not in this PR)

  • The linked-issue badge and the keyboard sidebar tree (Shift+F10 menus) on fork sidebar cards.
  • Expanding queued images in the fork queue banner.
  • Tagging a bot's thread when it's created, so a provider that fails during startup still reports to its Petal; this needs a contract change.
  • Moving the queued-runs model into one hook that follows upstream's QueuedRunsControl, so the fork banner stops drifting.
  • Sign-off on translating fork copy.

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

  • OpenAI GPT Sol (gpt-6.2-sol) via Codex: review (fixes applied)
  • Gemini 4 Neon (gemini-4-neon) via Antigravity: review (fixes applied)

Reviewed with sol-loop: 3 rounds with gpt-6.2-sol. Sol verdict: approved

kobimic887 and others added 30 commits November 20, 2026 20:11
…dotgg#30925)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…t page by default (pingdotgg#40003)

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

Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…tgg#24888)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…s current (pingdotgg#36868)

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

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

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…40020)

Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…asked for a result (pingdotgg#40137)

Co-authored-by: MarcoDotIO <Marcus.Arnett10@gmail.com>
…ding (pingdotgg#39989)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
juliusmarminge and others added 10 commits November 22, 2026 05:21
pingdotgg#27391)

Co-authored-by: Enmani <43571965+Enmani@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…on (pingdotgg#21667)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Wout Stiens <71498452+StiensWout@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Merges 2,023 upstream commits (5cbdf00..ad2bdc7). 75 files conflicted.

Fork adaptations:
- Crew rules: upstream's thread.create now carries the first message, so the
  bot is resolved before the create (forkBotIdFor) and CREW.md rides it.
- Branch follow: the finalize refresh runs in upstream's background fiber;
  the fork's follow rides the same fiber.
- SSH remotes: the archive-version fence moves to DesktopSshEnvironment.ts.
- i18n: upstream translated the app. Fork copy stays English: the
  no-untranslated-copy rule is deferred in fork paths (baseline 884), and
  i18n:check keeps en.json keys for upstream copy the fork removed
  (new fork-i18n-catalog customization and guard).
- Retired: the budget-gate BASE_REF fence (upstream reads HEAD^1) and the
  unenv pin (upstream carries the same override).
- Stores: closed-view and right-panel storage versions bumped past
  upstream's so fork stores migrate again.
- Ported upstream behaviour into fork surfaces: override shadows, the
  subagent card's open intent, the touch keyboard fix in the model picker,
  the schedule label's timestamp format, and nine new Hugeicons mappings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Plain-folder projects with tracked repositories get upstream's workspace
  mode selector in the composer; Git roots keep the fork's combined picker.
- A shared-checkout thread adopts its branch before finalization returns, so
  its next queued turn cannot start first and win the follower's run guard.
  Other threads keep upstream's background refresh.
- Subagent cards open remote tasks through upstream's linked-thread opener,
  honour read-only timelines, and offer the side panel only where it opens.
- i18n:check keeps removed-copy keys for apps/web only.
- fork-storybook's tsconfig gains ES2024.Promise, matching web.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found by a Gemini 4 Neon review of the upstream merge.

- Pending-question digit shortcuts ignore keys already handled and keys
  typed in menus, dialogs and popups, as upstream's panel does.
- The queued-runs banner no longer steers a /clear-armed message into the
  running turn (the server refuses it) and toasts a failed send.
- The folded live status line shows upstream's "Waiting on N subagents"
  label and resolves tool labels in the UI language.
- A bot's working state no longer depends on the UI language.
- The Scheduled page locks the model for a task bound to a thread.
- The usage limits view resolves its notices in the UI language.
- canFollow re-raises interruption instead of reading it as false.
- Corrected the notes on why upstream's keyboard thread-menu test is not
  ported: the fork's cards never installed upstream's sidebar tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps the fork's branch-link copy beside upstream's translated
"Copy branch name" label, passes copyBranchReference a clipboard
target object, and moves the deferred untranslated-copy count to
890 for the six English strings custom added meanwhile.

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 22, 2026
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

This PR changes the test suite by +3463 test cases (browser +234, unit +2231, server +998).

New browser test files: apps/web/src/browserHistoryStore.browser.test.ts, apps/web/src/components/AppSidebarLayout.browser.test.tsx, apps/web/src/components/GitActionsControl.composition.browser.test.tsx, apps/web/src/components/ProjectScriptsControl.browser.test.tsx, apps/web/src/components/PullRequestThreadDialog.browser.test.tsx, apps/web/src/components/SavedViewsMenu.browser.test.tsx, apps/web/src/components/Sidebar.motion.browser.test.ts, apps/web/src/components/chat/ComposerPendingUserInputPanel.browser.test.tsx, apps/web/src/components/chat/DraftHeroHeadline.browser.test.tsx, apps/web/src/components/chat/McpAppFrame.browser.test.tsx, apps/web/src/components/chat/VoiceInputSetup.browser.test.tsx, apps/web/src/components/chat/preparingComposerImages.browser.test.tsx, apps/web/src/components/chat/useComposerStash.browser.test.tsx, apps/web/src/components/cloud/CloudEnvironmentConnectList.browser.test.tsx, apps/web/src/components/diffs/DiffFileTree.browser.test.tsx, apps/web/src/components/diffs/StyledDiffCodeView.browser.test.tsx, apps/web/src/components/files/imageDecode.browser.test.ts, apps/web/src/components/issue/IssueLinkPreview.browser.test.tsx, apps/web/src/components/preview/ThreadPreviewMiniPlayer.browser.test.tsx, apps/web/src/components/pullRequest/PullRequestReactions.browser.test.tsx, apps/web/src/components/settings/AddUsageLimitSourceDialog.browser.test.tsx, apps/web/src/components/settings/IntegrationsSettings.browser.test.tsx, apps/web/src/components/settings/LinkedEnvironmentsSettings.browser.test.tsx, apps/web/src/components/settings/SnoozePresetsSettings.browser.test.tsx, apps/web/src/components/ui/search-input.browser.test.tsx, apps/web/src/components/usage/UsageModelDialog.browser.test.tsx, apps/web/src/lib/imageCompression.browser.test.ts, apps/web/src/lib/pageTranslationGuard.browser.test.tsx, apps/web/src/lib/selectionActions.browser.test.ts, apps/web/src/speech/browserVoiceInput.browser.test.ts, apps/web/src/themeCss.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.

@NoahHendrickson NoahHendrickson added the agent-context-increase Accepts growth in the agent's built-in instructions or tool list on this PR label Nov 22, 2026
@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 22, 2026

@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.

Reviewed 8e8075d344804a16f30b016e3494e5ebe182ee9c against 84afbb479a223d27b63ee381eef26187306f3e95. I found two regressions in the server paths for scheduled worktrees and Petal work threads. This was a targeted source review of the sync. I did not run the PR code locally.

const workspaceStrategy: ScheduledTask["workspaceStrategy"] =
input.workspaceStrategy.type === "worktree" &&
(yield* managedFolders.isScratchProject(input.projectId))
((yield* managedFolders.isScratchProject(input.projectId)) ||
(yield* threadLaunch.isNonGitProject(input.projectId)))

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.

[P2] Keep worktree launches for projects that track Git repositories

isNonGitProject only checks project.workspaceRoot. A plain project folder with tracked Git repositories can still create a task folder with worktrees through TaskFolders.plan, including when the caller explicitly passes workspaceStrategy.repositories. Saving a task for that project now silently changes its strategy to root and discards the repository selection. The next unbound run uses the shared checkout even though the user selected a worktree. Check whether the project can create a task folder before falling back to root.

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 from this sync: this line is upstream's, byte-identical to upstream main (ScheduledTaskService.ts:1583 there). The fork doesn't change upstream behaviour in a sync, so I'm leaving it as is. If it's a bug, it belongs upstream.

@@ -3033,17 +3361,18 @@ const make = Effect.gen(function* () {
...(parent.thread.linkOrigin === undefined
? {}
: { linkOrigin: parent.thread.linkOrigin }),
...(initialMessage === undefined ? {} : { initialMessage }),

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.

[P2] Persist Petal ownership before the first provider turn can start

Passing initialMessage here commits a provider start effect in the same transaction as thread.create. The worker can pick it up before the later linkForkBotWork dispatch commits the bot-work tag. If the provider fails at startup in that window, ForkBotWorkReports sees no owner and permanently skips the failure report. The base tagged the thread before dispatching its first message. Preserve that ordering for Petal work or write the tag in the creation transaction.

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.

Real, but narrow. Bot-work reports read the tag when the failure event arrives, and the tag is dispatched right after thread.create commits. So only a provider that fails during startup, inside that gap, loses its report. Closing the gap means thread.create has to carry the tag, which is a contract and orchestrator change. That's more than a sync should make, so it stays a listed follow-up for the maintainer to decide.

@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.

Thermo-nuclear code-quality review: 8e8075d344

Scope: an upstream sync is mostly upstream code that isn't the fork's to restructure. So I reviewed the fork-authored resolution work: the two fix(sync) commits, plus the 108 files whose fork delta changed between the old and new upstream base.

File size: no file crosses 1k lines because of this PR. The fork deltas in ChatComposer, ChatView, ThreadLaunchService and OrchestratorMcpService stayed about the same size.

Verdict: not approvable as is. The most important finding is #1: it's a live perf regression against upstream, and it shows why copying upstream components keeps going wrong. The other findings keep logic in two places, or patch over a boundary that should be made explicit.

1. ForkQueuedRunsBanner is a hand copy of upstream's QueuedRunsControl, and the copy is already behind (perf regression)

This sync ported upstream's fresh-context steer rule and failure toast into the fork banner by copying them line for line. It missed two other upstream changes to the same file in the same window:

  • pingdotgg#24055 switched QueuedRunsControl to useQuietThreadProjection so it "no longer re-renders on every streamed token". The fork banner still calls useThreadProjection. It's the only fork component that does, so it re-renders on every token while a turn streams.
  • pingdotgg#37893 passes messages to deriveThreadQueueWorkflowState, so the labels follow the UI language. The fork calls it without messages, both at line 80 and at line 136.

The root problem is structural: the queue model (items, canSendRun, sendQueuedMessage and its toast, steerNext) lives in two component bodies, and every sync relies on someone noticing upstream changed. Gemini already had to find three of these drifts by hand for this PR.

Proposed fix: move the non-visual queue model into one fork hook whose only job is to track upstream's QueuedRunsControl (or upstream a useQueuedRunActions hook). Then the banner is presentation plus drag-reorder, and a sync diff lands in exactly one file.

Also, at apps/web/src/custom/ForkQueuedRunsBanner.tsx:623, canSendRun now also returns false for a /clear-armed message while a steerable run is active. In that case the tooltip says "There is no active run to steer", which isn't the reason. Upstream hides the button in this state.

Locations: apps/web/src/custom/ForkQueuedRunsBanner.tsx:108 (projection hook) and :136 (messages dropped). This file and botWork.ts are past GitHub's 3,000-file PR diff limit, so they can't take inline comments.

2. Bot resolution now runs twice per launch

The new forkBotIdFor repeats the forkBotActingShell → launcherBotId walk that linkForkBotWork already does. Both ThreadLaunchService.launch and MCP create_threads now run both, which means up to four getThreadShell reads. The botId that linkForkBotWork returns is now ignored at both call sites. ThreadLaunchService also checks launchedBy !== undefined && reuseExistingThread !== true twice.

Proposed fix: resolve once, then use that result for both the crew rules and the tag. Make linkForkBotWork take a resolved botId and return void. That removes the duplicate walk, the duplicated condition, and the dead return value.

3. canFollow adds a second copy of the follow-eligibility rule and splits upstream's finalize into two paths

canFollow copies part of followLocalCheckoutBranch's guard (worktreePath === null && branch !== null) in a second place, with a second shell read. Upstream's finalize now has an inline-or-background branch that depends on it. The inline arm also waits on the whole display refresh: workspaceEntries.refresh (the workspace rescan), identity probing, and the PR lookup that kicks off. But the follow only needs the refreshLocalStatus result. So every shared-checkout thread gets back the latency that upstream moved off the critical path.

Proposed fix: give the follower one way to decide, either a shared isSharedCheckoutThread(shell) predicate or a single followInline method, and wait only on status + follow. The workspace rescan stays on upstream's FiberSet. That deletes most of the fork's branching in finalize. The as unknown as VcsStatusLocalResult cast in the new test also hides which fields the follower actually reads.

4. BranchToolbar: the fix copies upstream's selector into the fork fence instead of narrowing the fence

The fork-composer-shell fence already covers upstream's environment selector, the WorktreeRepositoriesControl and the plain-folder copy. This fix pastes BranchToolbarEnvModeSelector's eight workspace-mode props into the fence, and the same eight props are passed again to ComposerWorkspaceFooter a few lines below.

Upstream already renders the selector under showGitControls. The smaller change is to keep upstream's render where it is and fence only its condition (showGitControls && !showBranchControls). Then shrink the fence to the branch-selector arm, the only place the fork actually differs, and bundle the workspace-mode props into one object used by both. Then the next upstream change to this block doesn't conflict with the fork.

5. botWork.isRunning (apps/web/src/custom/bots/botWork.ts:94) gets "is it working" by comparing translated strings

resolveWindowTitleThreadStatus(thread, m) === m(THREAD_STATUS_TEXT.working) translates a typed status into display text and compares the text to get the status back. The fix made both sides use the same language, but the coupling to the copy is still there. Switch on resolveSidebarThreadStatus({ ...thread, pendingGuestMessageCount: 0 }) directly (preparing | working, or waiting with runtime.status === "running"). That's the rule the window title uses, without going through copy.


No blocking issues in i18n-check.ts, the lint-ratchet deferral, ForkSubagentGroup's move to useLinkedThreadOpener, or the pending-input key guard. They're direct and scoped.

Reviewed commit: 8e8075d344804a16f30b016e3494e5ebe182ee9c (base 84afbb479a).


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

@@ -45,6 +45,18 @@ function launcherBotId(launcher: Pick<OrchestrationV2ThreadShell, "id" | "tags">
return forkBotWorkTag(launcher.id).length <= THREAD_TAG_MAX_LENGTH ? launcher.id : null;
}

/** The bot a thread launched by `launchedBy` will work for, before that thread exists. */
export const forkBotIdFor = Effect.fn("ThreadLaunchService.forkBotIdFor")(

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 repeats linkForkBotWork's forkBotActingShell → launcherBotId walk, and both launch paths now run both. Resolve once and make linkForkBotWork take the resolved botId. Its return value is already ignored at both call sites.

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 a8ed701. The bot is resolved once with forkBotIdFor. linkForkBotWork now takes that id, dispatches the tag and returns void.

@@ -1170,6 +1480,43 @@ const make = Effect.gen(function* () {
},
);
/* fork:end server-local-thread-branch */
/* fork:begin fork-bot-crew-rules — see .fork/customizations.yaml#fork-bot-crew-rules
The claim carries the first message, so its bot is resolved before the thread exists. */
const forkCrewBotId =

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.

launchedBy !== undefined && reuseExistingThread !== true is checked here and again at the linkForkBotWork call below (line 1578). With one forkBotId resolved up front, both fenced blocks just read it, and the second bot lookup goes away.

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 a8ed701. The condition is checked once, the result goes into forkBotId, and both fenced blocks read it.

: follower.follow({ cwd, threadId: input.threadId, runId: input.runId, local }),
),
);
if (yield* follower.canFollow(input.threadId)) yield* refresh;

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 branch makes shared-checkout threads wait on the whole observer.refresh: the workspace rescan, identity probing, and the PR lookup it starts. But follow only needs the local status. Wait only on status + follow and leave the rescan on refreshes. Then upstream's "next turn must not wait for the display refresh" holds for these threads 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.

Fixed in a8ed701. The observer now starts workspaceEntries.refresh on its own fiber, so the inline path waits only on the status read and the follow. The new test, "returns the post-turn status without waiting for the workspace rescan", fails on the old code.

@@ -119,6 +121,15 @@ export const layer = Layer.effect(
Effect.gen(function* () {
const threads = yield* ThreadManagement.ThreadManagementService;
return LocalCheckoutBranchFollower.of({
canFollow: Effect.fn("LocalCheckoutBranchFollower.canFollow")(

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 is a second copy of part of followLocalCheckoutBranch's guard (worktreePath === null && branch !== null), with its own shell read. Pull it into one isSharedCheckoutThread(shell) used by both, so the two can't drift apart.

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 a8ed701. One isSharedCheckoutThread rule now backs both the follow guard and canFollow.

<>
{/* A plain folder has no branch picker to carry the workspace modes, so upstream's
selector offers them. */}
<BranchToolbarEnvModeSelector

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 pastes upstream's selector into the fork-composer-shell fence, and the same eight props go to ComposerWorkspaceFooter again below. Upstream already renders this selector under showGitControls. Fence only that condition (&& !showBranchControls) and shrink the fence to the branch-selector arm. Then the next upstream change here doesn't conflict.

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.

Declining. The fork's fence also drops upstream's responsive wrapper (the hidden @xl:flex div, its separator, and the env-mode selector at wide widths), and that's what keeps the chips in one row. Bringing back upstream's render and fencing only the condition would bring the wrapper back and change the composer layout, which a sync shouldn't do. The eight repeated props are a small cost next to that.

@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 8e8075d344

This diff has 5,331 files, more than anyone can read line by line, so the review covered the parts written by hand: the conflict resolutions in 2cb821e2aa and 8e8075d344 (read with git show --remerge-diff) and the follow-up commits 72e6110c34 and b8bdf3421b. Upstream code that merged without conflicts was not reviewed. Each finding below was checked against the source. The findings are in the body because GitHub can't attach inline comments to most files in a diff this large.

1. Bug: the Scheduled editor locks the model picker for GitHub PR tasks

apps/web/src/custom/scheduled/ScheduledTaskEditor.tsx:249 (from b8bdf3421b)

disabled={props.disabled || draft.threadId !== ""} locks the picker for a GitHub PR automation that the server is about to unbind from its thread. For GitHub tasks, ScheduledTaskService.upsert sets threadMode to new_thread and stores a null threadId (ScheduledTaskService.ts:1658 and :1667). Every PR delivery then starts a new thread that runs on the task's own model. ScheduledTaskDetail.tsx:591 already allows for this with draft.threadId && !draft.githubPrOpened. Switching the trigger to GitHub PR doesn't clear draft.threadId.

To reproduce: open a thread-bound automation and switch its trigger to "GitHub PR opened". The model picker stays disabled, so the user can't choose the model the PR threads will run on.

Fix: disabled={props.disabled || (draft.threadId !== "" && !draft.githubPrOpened)}

2. Nit: the queued Send tooltip gives the wrong reason for /clear messages

apps/web/src/custom/ForkQueuedRunsBanner.tsx:622

canSendRun(item.freshContext) can now be false while a run is active. That happens for a message armed by /clear, which can't be steered into the running turn unless the workflow is skipping compaction. The tooltip still says "There is no active run to steer", but a turn is visibly running.

Fix: give the fresh-context case its own reason, or hide the button as upstream's QueuedRunsControl does.

3. Nit: two pieces of the composer usage tray are still untranslated

apps/web/src/custom/ComposerUsageLimitsReadout.tsx:143 and :200

This PR moves formatResetsIn to the translated helper, but cursorUsageWindowDetails and collectExternalUsageLinks still come from the untranslated @t3tools/shared/usageLimits. UsageLimitsPooled now gets both from usageLimitsCopy with m. With a non-English UI language, the tray shows the external-link labels and the Cursor window labels in English, while the Usage page translates them.

Fix: import both from @t3tools/shared/usageLimitsCopy and pass m.

4. Suggestion: a cheap fix for the "waits for the workspace rescan" follow-up

apps/server/src/orchestration-v2/RunFinalizationService.ts:131

This is not a regression: custom already ran the refresh inline for every thread, and the PR body lists it as a follow-up. canFollow is true for every non-worktree thread that has a branch, so most local threads still run the whole observer.refresh inline: the workspaceEntries.refresh(cwd) file-index rescan, refreshLocalStatus and the shell read. That happens even when the branch hasn't changed, and the comment above ("the thread's next turn must not wait for it") no longer holds on this path. The follow only needs the status result. Running workspaceEntries.refresh(cwd) in refreshes and awaiting only the status read and the follow would fix most of that follow-up.


🤖 Reviewed by Claude Opus 5.5 (claude-opus-5-5) via Claude Code /code-review

@github-actions

github-actions Bot commented Nov 22, 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 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 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 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 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

4 of 64 scenario measurements changed or failed.

Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB +20 B (+0.0%) 53.7 KiB ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB +20 B (+0.0%) 53.7 KiB ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB +20 B (+0.0%) 53.7 KiB ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB +20 B (+0.0%) 53.7 KiB ✅
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 +20 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 +20 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 +20 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 +20 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: 84afbb4 · PR result: 537b862 · 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.

xxxxxxxxxxxxx and others added 4 commits November 22, 2026 15:16
Ports upstream pingdotgg#29846 to the fork's draft project chip, which builds its
own project list: a manual sidebar order now orders the menu too.
Upstream's two new tests pin upstream DOM and its 640px chat reserve, so
their fork-specific lines are fenced and watched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Shared-checkout threads wait on the status read only at finalize; the
  workspace rescan runs on its own fiber. One isSharedCheckoutThread rule
  backs both the follow and canFollow.
- A launch resolves its bot once; linkForkBotWork takes that id.
- The queued-runs banner reads the quiet projection and passes messages,
  as upstream's control does, and hides send for a /clear message that
  cannot steer the running turn.
- The Scheduled editor no longer locks the model for GitHub PR tasks.
- The composer usage tray translates Cursor window and external link
  labels; bot working checks the thread status, not its text.

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

Copy link
Copy Markdown
Owner Author

Replies to the review findings that are only in the review bodies; the inline comments each have their own reply. The fixes are in a8ed701 and 537b862.

Fixed

  • The Scheduled editor locked the model for GitHub PR tasks. It now locks only when draft.threadId !== "" && !draft.githubPrOpened.
  • The queue banner was missing two upstream changes (fix(web): queued runs, relationships and changed files no longer re-render on every streamed token pingdotgg/t3code#24055, feat(web,mobile,desktop): translate the whole app into every supported language pingdotgg/t3code#37893). It now reads useQuietThreadProjection, so it no longer re-renders on every streamed token, and passes messages to deriveThreadQueueWorkflowState.
  • The send tooltip gave the wrong reason for /clear messages. A /clear message that can't steer the running turn now has no send button, as in upstream's QueuedRunsControl.
  • The usage tray had untranslated labels. It now gets cursorUsageWindowDetails and collectExternalUsageLinks from usageLimitsCopy, with m.
  • botWork.isRunning compared translated strings. It now switches on resolveSidebarThreadStatus, using the window title's rule.
  • The inline follow waited on the workspace rescan. Fixed as described in the inline reply. This also covers most of the rescan-wait follow-up.

Not in this PR

  • Moving the queue model into one hook shared with upstream's QueuedRunsControl. I agree this is the lasting fix for the drift, but it's a refactor, so it's a follow-up rather than part of a sync.
  • Narrowing the BranchToolbar fence. Declined; see the inline reply. The fence also removes upstream's responsive wrapper.
  • Petal ownership before the first turn. Needs thread.create to carry the tag, which is a contract change. It stays a follow-up for the maintainer to decide.
  • isNonGitProject. This is upstream's code, unchanged by the sync.

@NoahHendrickson
NoahHendrickson merged commit 2f9fdfd into custom Nov 23, 2026
35 checks passed
@NoahHendrickson
NoahHendrickson deleted the t3/upstream-sync-1 branch November 23, 2026 05:05
NoahHendrickson pushed a commit that referenced this pull request Nov 23, 2026
…406

Resolves the 17 files where the sync changed upstream mobile code that the
no3y redesign fences, and ports the redesign to what upstream moved:

- The composer editor and surface now live in ComposerSurface.tsx; the
  no3y card's full-width editor and glass surface hunks moved with them.
  Upstream's compact-before-send control stays off the card, which keeps
  its own "Resume with less context" banner.
- Upstream moved working, compacting, background work and snooze/settle out
  of its floating status into the feed, and syncing into the header. The
  no3y pill keeps them: fork/no3yPillStatus.ts rebuilds the pill's status in
  its old order from what upstream still computes, and the feed's closing
  status lines are hidden on iPhone so nothing shows twice.
- Follows upstream renames (THREAD_LIST_ROW_LAYOUT, usageLimitsCopy helpers,
  subagentThreadTarget's reach, describeSchedule's translator).
- Fork copy inside upstream files carries the fork-i18n-catalog disable.
- Upstream's new SettingsScheduledTasksRouteScreen test stubs the fork's
  Automations screens, which it does not cover.

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.