Skip to content

chore: sync upstream pingdotgg/t3code (20260719)#209

Merged
adamfgr merged 22 commits into
mainfrom
chore/upstream-sync-20260719
Jul 19, 2026
Merged

chore: sync upstream pingdotgg/t3code (20260719)#209
adamfgr merged 22 commits into
mainfrom
chore/upstream-sync-20260719

Conversation

@wizzoapp

@wizzoapp wizzoapp Bot commented Jul 19, 2026

Copy link
Copy Markdown

Nightly sync of pingdotgg/t3code into this fork.

Range: fdca154..1735e27 (50 upstream commits). Because this fork squash-merges
to main, the sync cherry-picks the range rather than merging.

  • 21 commits applied
  • 29 commits were already present in the fork (cherry-pick reported them
    empty; spot-checked file-by-file against upstream before skipping)

Verification

gate result
vp run typecheck 0 errors (15 packages)
vp check 0 errors, 1 warning (pre-existing style warning in upstream's SidebarUpdatePill.tsx)
vp test run 6135 passed, 7 skipped, 0 failed (682 files)

Conflicted-file set

These are the only files where this merge's resolution could introduce a bug;
everything else is upstream applied cleanly.

package.json · apps/mobile/.../showcasePendingTasks.test.ts ·
apps/server/src/ws.ts · apps/server/src/server.test.ts ·
apps/desktop/src/electron/ElectronUpdater.ts ·
apps/desktop/src/updates/DesktopUpdates.test.ts ·
apps/server/src/vcs/GitVcsDriverCore.ts (+ test) ·
packages/shared/src/remote.test.ts ·
apps/server/src/provider/Layers/CursorAdapter.ts ·
apps/server/src/provider/acp/AcpSessionRuntime.ts ·
apps/web/src/components/chat/ChatComposer.tsx ·
apps/server/src/provider/CodexDeveloperInstructions.ts (+ CodexSessionRuntime.test.ts) ·
apps/web/src/components/ChatView.tsx ·
packages/client-runtime/src/state/threads.ts (+ threads-sync.test.ts) ·
apps/server/src/orchestration/Normalizer.ts ·
apps/desktop/src/wsl/DesktopWslEnvironment.ts ·
scripts/build-desktop-artifact.ts ·
apps/web/src/components/ThreadTerminalDrawer.tsx

Notable resolutions

Fork already implemented upstream's fix — kept the fork's superset:

  • ws.ts (Fix dropped events during initial thread snapshot pingdotgg/t3code#4079, dropped events during initial thread snapshot): the fork already
    attaches the live buffer before reading either the replay boundary or the
    snapshot, so every return path drains it. Taking upstream's side would have
    deleted the fork's audience guard, storage-epoch validation and tombstone
    recovery. Ported upstream's regression test verbatim — it passes against the
    fork's implementation.
  • GitVcsDriverCore.ts (fix(server): stabilize non-repository Git diagnostics pingdotgg/t3code#4077): all three of upstream's LC_ALL=C conversion
    sites are already converted, plus a fourth fork-local fallback. The fork's
    listRefs uses for-each-ref, so its test assertion (which still asserts
    lcAll: "C") was kept over upstream's branch --no-color expectation.

Preferred upstream:

Genuine merges (neither side alone was correct):

  • ChatView.tsx: took upstream's hero-landing structure but restored the
    required sessionOnlyDisconnectedSendReason prop that upstream's variant
    omits, and kept the fork's debounced environment-unavailable state.
  • Normalizer.ts: kept both sides (fork's attachment-cleanup helpers +
    upstream's timestamp canonicalizer) and retargeted the fork's receipt and
    attachment path at canonicalCommand, so canonicalized timestamps actually
    reach the persisted command.
  • build-desktop-artifact.ts: upstream's web brand assets applied before the
    fork's 3-arg validateBundledClientAssets (branding rewrites index.html).

Merge-introduced regressions found and fixed (9d89c08)

The full suite caught two real incompatibilities, both fixed rather than
papered over:

  1. Duplicate threads on bootstrap replay. Upstream's client-timestamp
    canonicalization ([codex] canonicalize client timestamps pingdotgg/t3code#4112) rewrote bootstrap.createThread.createdAt, but
    BootstrapTurnStartDispatcher fingerprints a replayed bootstrap turn
    against the thread it already created using exactly that field
    (BootstrapTurnStartDispatcher.ts:133). Every retry would miss the check and
    create a duplicate thread — a production bug, not just 3 red tests. Upstream
    has no such dedup, so this was not an intentional upstream behaviour change.
    Fixed by keeping the client's bootstrap timestamp as the stable replay
    identity while still canonicalizing the turn-level createdAt; upstream's
    canonicalizeClientCommandTimestamps and its tests are untouched.
  2. Type error in the terminal copy action. Upstream's new selection-copy
    path (Add terminal selection copy action pingdotgg/t3code#2904) passed a Terminal to writeSystemMessage, which this fork
    narrowed to TerminalWriteQueue. Switched to terminalWriterRef, matching
    every other call site.

🤖 Generated with Claude Code

D3OXY and others added 22 commits July 19, 2026 03:09
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…gdotgg#4054)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gg#3608)

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
…obe success (pingdotgg#3621)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Two merge-introduced incompatibilities from the 20260719 upstream sync:

- Normalizer: upstream's client-timestamp canonicalization (da3c203)
  rewrote bootstrap.createThread.createdAt, which BootstrapTurnStartDispatcher
  uses to fingerprint a replayed bootstrap turn against the thread it already
  created. Every retry would miss that check and create a duplicate thread.
  Keep the client's bootstrap timestamp as the stable identity; the turn-level
  createdAt is still canonicalized.

- ThreadTerminalDrawer: upstream's terminal selection copy action (1735e27)
  passed a Terminal to writeSystemMessage, which this fork narrowed to accept
  a TerminalWriteQueue. Use terminalWriterRef, matching the other call sites.

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

wizzoapp Bot commented Jul 19, 2026

Copy link
Copy Markdown
Author

@codex review

@adamfgr adamfgr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Auto-approved by wizzo-approve: all policy conditions verified against HEAD 9d89c08.

@adamfgr
adamfgr merged commit 8c13449 into main Jul 19, 2026
8 checks passed
@adamfgr
adamfgr deleted the chore/upstream-sync-20260719 branch July 19, 2026 02:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d89c08847

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +2545 to +2549
disabled={
isConnecting ||
isComposerApprovalState ||
projectSelectionRequired ||
(environmentUnavailable !== null && activePendingProgress === null)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the offline composer editable for queued sends

When an environment is unavailable and there is no pending question, this makes the Lexical editor non-editable, so users who lose connection before drafting cannot type a message to queue. The send path explicitly queues initial sends while activeEnvironmentUnavailable is true, and the primary action still advertises the disconnected queue action, so this state should not block composing the queued text; keep the editor editable and let the send path handle queuing/disablement.

Useful? React with 👍 / 👎.

const dockTransition = runMobileComposerTransition(() => {
flushSync(() => {
captureDraftHeroComposerRect();
setDockedDraftHeroThreadKey(activeThreadKey);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Reset draft hero docking after attachment read failures

For draft-hero sends with images, this docks the hero before turnAttachmentsPromise is awaited; if reading an attachment fails, the early return restores the draft and removes the optimistic message but never clears dockedDraftHeroThreadKey. The still-empty draft then stays in the docked layout until navigation instead of returning to the hero, so the attachment failure path should clear this state or docking should wait until attachments are readable.

Useful? React with 👍 / 👎.

Comment on lines +622 to +623
if (latestUserMessageChanged) {
return true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Match steering acknowledgements to the local send

When another client appends a steering/user message to the same running turn before this tab's send is projected, this condition treats that unrelated latest-user-message change as acknowledgement of the local dispatch. That clears the local "Sending" state for the wrong command, so the composer can stop showing that this tab's send is still pending; store/compare the submitted message id instead of accepting any latest user-message change.

Useful? React with 👍 / 👎.

if (
key === "Enter" &&
shouldSubmitComposerOnEnter({ hasCoarsePointer, shiftKey: event.shiftKey })
shouldSubmitComposerOnEnter({ isMobileViewport, shiftKey: event.shiftKey })

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Preserve coarse-pointer Enter behavior

On touch devices whose viewport is wider than the mobile breakpoint, such as tablets or Surface devices in landscape, this now passes only isMobileViewport to the Enter policy after removing the coarse-pointer guard. Plain Enter from the on-screen keyboard will submit instead of inserting a newline, regressing the previous coarse-pointer behavior; keep using pointer capability or include it in the shared helper.

Useful? React with 👍 / 👎.

Comment on lines +26 to +29
const catalog = AsyncResult.value(get(environmentCatalog.catalogAtom));
if (Option.isNone(catalog)) {
return false;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Wait for catalog readiness before settling landing

The catalog atom has an initial empty value with isReady: false, but AsyncResult.value(...) is already Some, so this atom skips the guard and returns true while the entries are still just the initial empty map. On a cold load of /, IndexDraftLanding can render the no-project hero before restored environments and shell snapshots arrive, causing a visible wrong landing state; check catalog.value.isReady before iterating or returning true.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.