Skip to content

feat: upstream extras (background sync, run code blocks, Codex instructions, polish) - #245

Merged
TheDarkPhantom merged 9 commits into
mainfrom
feat/upstream-extras-2026-09-29
Sep 29, 2026
Merged

TheDarkPhantom merged 9 commits into
mainfrom
feat/upstream-extras-2026-09-29

Conversation

@TheDarkPhantom

Copy link
Copy Markdown
Owner

Seven upstream t3code changes ported onto the fork, one commit each.

Landed

  • feat(desktop): keep running threads synced in the background pingdotgg/t3code#13554 Running threads keep syncing in the background (desktop). RunningThreadKeepAlive is mounted in __root.tsx on Electron. It mounts the thread state atom only for threads whose session is starting or running, and keeps a stopped thread mounted until its own detail stream is live and shows the stop. The fork has no enabledEnvironmentIds, so the environment set comes from the connection catalog, the same set the shell atoms enumerate. Its identity only changes when an environment is added or removed. Test: apps/web/src/state/threads.test.ts.
  • feat(web): run shell commands from chat in the thread terminal pingdotgg/t3code#13060 Run button on shell code blocks. Shows on finished, single-line sh/bash/zsh/fish/shell/powershell/pwsh fences in assistant messages. It types the command into the thread terminal through runProjectScript, using a ref so the callback stays stable and memoized rows don't re-render. The detection is in chat/runnableCodeBlock.ts with a focused test. It rejects multi-line blocks, trailing backslashes, and control or bidi characters. On Windows the terminal is pwsh, so a bash block runs there exactly as if you had pasted it. This matches upstream: there's no shell translation.
  • fix(server): newer Codex models get T3 Code's instructions again pingdotgg/t3code#13547 Newer Codex models get Avi Code's instructions again. Runtime info and the collaborative browser guidance now go in turn/start.additionalContext (avi_code_runtime, avi_code_tools), which every model receives. The mode prompt stays in developer_instructions, so older models behave as before; upstream also sends both paths on every model. After a root thread compacts, the last context is re-injected with thread/inject_items. Child agent compactions are ignored. Not ported: upstream's device tool text, model display names, and RuntimeInstructions.ts.
  • fix(clients): sync status no longer flickers when opening running threads pingdotgg/t3code#13551 Sync status no longer flickers. Adds the pure client-runtime/delayed-status helper and upstream's test, plus a useDelayedStatus hook around the ThreadSyncStatusPill phase in ChatView. Logic that depends on the real phase still reads threadSyncPhase.
  • fix(web): sidebar Back always returns to the main app pingdotgg/t3code#13516 Back and Escape return to the main app. mainAppLocation.ts tracks the last main app URL. Settings, usage, the changelog route, and the settings sidebar Back button all go there.
  • fix(web): new worktree threads no longer say "checkout" during setup pingdotgg/t3code#13590 No "Local checkout" during worktree setup. resolveEffectiveEnvMode takes preparingWorktree, and resolveLockedWorkspaceLabel takes the env mode. ChatView always passes its env mode to BranchToolbar. Logic tests are updated.
  • fix(web): keep sidebar terminal pulses in sync pingdotgg/t3code#12962 Terminal pulses in sync. synchronizeTerminalPulse runs once when each animation starts (no timer, no frame loop). It's wired into SidebarV2, SidebarThreadRow, and ThreadStatusIndicators. The pulse is now motion-safe:.

Skipped

None.

Verification

No contract schema changes and no migrations.

🤖 Generated with Claude Code

TheDarkPhantom and others added 9 commits September 30, 2026 01:38
Ported from pingdotgg#13554

The fork has no per-environment enabled flag, so the keep-alive follows
every environment in the connection catalog, the same set the shell atoms
enumerate.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ported from pingdotgg#13060

A Run button appears on finished, single-line sh/bash/zsh/fish/shell/
powershell/pwsh blocks in assistant messages and types the command into
the thread terminal through runProjectScript. The command is sent as-is,
so on Windows a bash-labelled block runs in the terminal's PowerShell,
exactly as if the user had pasted it. The detection lives in
runnableCodeBlock.ts with a focused test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ported from pingdotgg#13547

Newer Codex models ship their own collaboration mode text in the model
catalog, and Codex then drops the client's developer_instructions. The
runtime info and the collaborative browser guidance now ride in
turn/start additionalContext, which every model receives; the mode
prompt stays in developer_instructions for models that still read it.
Compaction drops additionalContext messages and Codex only resends an
entry when its value changes, so a root thread compaction re-injects the
last turn's context via thread/inject_items.

Upstream's device tool text, model display names, and RuntimeInstructions
module are not ported.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ported from pingdotgg#13551

The thread sync pill now shows only once a sync lasts past a short
delay, and holds for a minimum time once shown. The timing logic is the
pure client-runtime delayed-status helper; ChatView wraps its phase in
useDelayedStatus keyed by the thread.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ported from pingdotgg#13516

A tracker in the app shell remembers the last main app URL. Back and
Escape on settings, usage, and the changelog navigate there instead of
stepping through browser history, which could land on another settings
or utility page.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ported from pingdotgg#13590

The thread exists while the server is still creating its worktree but
has no worktree path yet, so the locked toolbar label read as the local
checkout. ChatView now resolves worktree mode while a worktree is being
prepared and always hands its env mode to the branch toolbar, whose
locked label and icon show New worktree for that state.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ported from pingdotgg#12962

Each running-terminal pulse is pinned to the document timeline when it
starts, so the icons in SidebarV2, the sidebar thread rows, and the
trailing status share one cycle. The work happens once per animation
start, with no timer or frame loop, and the pulse now respects
prefers-reduced-motion.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Sep 29, 2026
@TheDarkPhantom
TheDarkPhantom merged commit 2644e30 into main Sep 29, 2026
12 checks passed
@TheDarkPhantom
TheDarkPhantom deleted the feat/upstream-extras-2026-09-29 branch September 29, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant