Skip to content

chore(upstream-sync): port 11 t3code commits - #752

Merged
trancong12102 merged 14 commits into
mainfrom
chore/upstream-sync-20261124-2014
Nov 24, 2026
Merged

trancong12102 merged 14 commits into
mainfrom
chore/upstream-sync-20261124-2014

Conversation

@trancong12102

Copy link
Copy Markdown
Contributor

Ports 11 t3code commits and skips 1: /clear now bounds merge-back and MCP app notes, a secret card closes on an early abort, steady terminals poll less, OpenCode steers keep $skill mentions, macOS preview stop no longer reads markers from arguments, plus small web, desktop and server fixes.

Risky commits:

  • 854f02bc2d fix(server): respect /clear context boundary in fork handoffs, merge-back, and MCP app context (#42114). CONFLICT in shared orchestration where Onicode diverged. Fork handoffs already stopped at a fresh run in Onicode through conversationRuns, which also keeps scheduled fresh sessions apart; kept that. Merge-back now bounds at the fork's latest /clear and keeps its scheduled sessions, as main and upstream did (a review-found regression in the first adaptation, fixed in a follow-up commit with a test that failed before). The MCP app note boundary SQL follows Onicode's startedFreshRun and first-prompt schedule rule and looks up the first prompt through the (run_id, ordinal) index; upstream's OR messageId join scanned every turn item of the thread per fresh run. Upstream's two ContextHandoffService cases are covered by extending the existing fork-history case.
  • fc92aefd26 fix(server): a secret card closes when its request is aborted right after it opens (#42135). CONFLICT. Adopted upstream (see below).
  • 849d19447f / 3b829b6aa6 Esc in Voice and text generator model search. CONFLICT with Onicode's shared helper. Kept the helper, folded upstream's guards into it (see below). Took upstream's browser tests, plus enterKeyHint="search".
  • 9bce8843de fix(desktop): SnapShot shortcut setup says why it couldn't prepare or save the changes (#42154). Desktop-only, local IPC message text. Taken as is.

Routine commits (taken as is unless noted):

  • 9842ca0c12 fix(web): an image no longer jumps while its pane is resized (#42120)
  • a1ed691d8a perf(server): terminals running a steady command stop polling the process table every second (#32354)
  • 354d9f1675 fix(server): keep discovered workspace folder labels valid when an emoji crosses the name limit (#42133)
  • 4f1dc5db12 fix(server): macOS preview stop reads command markers only from a process's environment, not its arguments (#42155). One extra ps per stop, not per scan.
  • 26c21a86cf fix(web): ODS previews hide values a merge covers (#42149). Test adapted: Onicode's openDocument takes a Map archive, not JSZip.
  • 94190c63f9 fix(server): OpenCode steers keep their $skill mentions (#42141). Steers without $ mentions skip the skill lookup.

Adopt-or-keep decisions:

  • Kept Onicode's clearSearchOnEscape over upstream's two inline handlers, and adopted upstream's guards into it: modified or already handled Esc passes through, and the Esc that cancels an IME composition stops propagation without clearing, so Settings stays open. One helper serves all six Settings search fields; upstream's two handlers differ from each other.
  • Kept Onicode's conversationRuns fork-history boundary over upstream's turnItemsSinceContextBoundary. It already bounded fork history and also handles scheduled fresh sessions.
  • Adopted upstream's acquireUseRelease over Onicode's onError plus explicit closeCard. Recording the pending card becomes uninterruptible, so an abort right after the card opens still closes it.
  • Kept Onicode's writeProjectSettings over upstream's onCommitted saveScripts (00070b8031 skipped). It writes before the commit, so a refused Settings write commits nothing and its retry writes again; upstream's leaves a committed command whose actions a replayed retry never saves. It also covers model, env mode and auto-pull.

Skipped: 00070b8031, see above.

E2E scenarios: none in this batch.

Follow-ups: queued in the follow-up queue for the next batch fix (Batch fix 1855 is running, so no new thread):

  • macOS preview stop: SIP-protected parent env and prefix check (upstream t3code@4f1dc5db12), see review round 2.
  • Merge-back reads pre-/clear turn items before bounding (pre-existing cost).
  • McpAppModelContext.forThread takes only the thread, so a scheduled fresh session still sees post-/clear main-conversation MCP app notes and vice versa (upstream design, MCP app notes only). Worth a run-aware boundary later.

Review (Antigravity gemini-4-neon xhigh):
Round 1 (first 8 commits):

  • Merge-back with latest_stable landing on a scheduled fresh run dropped the fork's main work. Real, port regression. Fixed; extended ThreadFork.execution test failed before.
  • McpAppModelContext per-turn scan on threads with thousands of scheduled runs. Dismissed after measuring (node:sqlite, 3,000 hourly scheduled fresh runs): a thread with no notes costs 0.02 ms because the boundary is never computed, and MAX(ordinal) already walks the (thread_id, ordinal) index backwards (0.026 ms with a recent /clear). The suggested ORDER BY DESC LIMIT 1 rewrite measured the same in every case.
  • clearSearchOnEscape lacked upstream's modifier, defaultPrevented and IME guards. Real; adopted (above), unit cases failed before.
  • Upstream's two dropped ContextHandoffService tests were only partly covered. The existing fork-history case now drops a same-thread run before /clear; steered schedule runs stay covered in contextBoundary.test.ts.
    Round 2 (fixes and the 4 new commits):
  • No production bugs in the ports or fixes; merge-back traced across run, checkpoint, latest_stable, scheduled sessions, v1 import and rolled-back fresh runs; Esc helper checked in all six callers.
  • An extra assertion I had added on scheduled runs used a fixture without provider threads and masked the real result. Removed it.
  • Upstream bugs in t3code@4f1dc5db12 (shared preview stop): a SIP-protected parent shell reads as an empty environment and falsely reports a command stopped; the ps -E minus ps prefix check has no token boundary. Queued for the next batch fix (Batch fix 1855 is running), with the pre-existing merge-back read cost and the MCP app note scope.
  • Left to upstream (OpenCode only): a steer naming ordinary $VARs does three sequential skill/model lookups before delivery (t3code@94190c63f9).

Gate: vp run check:changed passes (typecheck of 9 packages, 20 test files, React Compiler). Tests beside each change pass.

Done with Claude Opus 5.5 in Claude Code, reviewed by Antigravity gemini-4-neon (xhigh), two rounds.

🤖 Generated with Claude Code

Anton-M-R and others added 14 commits November 24, 2026 20:49
Ported from pingdotgg/t3code@9842ca0c12.

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

Ported from pingdotgg/t3code@849d19447f.

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…osing the dialog (#42130)

Ported from pingdotgg/t3code@3b829b6aa6.

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…back, and MCP app context (#42114)

Ported from pingdotgg/t3code@854f02bc2d.

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…cess table every second (#32354)

Ported from pingdotgg/t3code@a1ed691d8a.

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…oji crosses the name limit (#42133)

Ported from pingdotgg/t3code@354d9f1675.

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…fter it opens (#42135)

Ported from pingdotgg/t3code@fc92aefd26.

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Kept Onicode's writeProjectSettings over upstream's onCommitted saveScripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… run is a scheduled fresh session

Follow-up to the 854f02bc2d port. The merge-back delta bounded at the source run's own
conversation, so a latest_stable run that was a fresh-session schedule merged only that
schedule's output back. It now bounds at the fork's latest /clear and keeps scheduled sessions,
as main and upstream did. The existing fork-history case now also drops a same-thread run before
/clear (upstream's first dropped case); steered schedule runs stay covered in contextBoundary.test.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eeps IME Esc from closing

Follow-up to 7454b78ea6 / c319c44138 (ported 849d19447f, 3b829b6aa6). Adopts upstream's guards
into the shared clearSearchOnEscape: modified or already handled Esc passes through, and the Esc
that cancels an IME composition stops propagation so Settings stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from pingdotgg/t3code@26c21a86cf.

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Ported from pingdotgg/t3code@94190c63f9.

Co-authored-by: Julius Marminge <julius0216@outlook.com>
@trancong12102
trancong12102 merged commit ab1018b into main Nov 24, 2026
18 checks passed
@trancong12102
trancong12102 deleted the chore/upstream-sync-20261124-2014 branch November 24, 2026 14:16
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.

10 participants