chore(upstream): sync marcode through 2c4158f8 - #47

Closed
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d
Closed

chore(upstream): sync marcode through 2c4158f8#47
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d

Conversation

@maarco

@maarcomaarco commented Aug 22, 2026

Copy link
Copy Markdown
Owner

What Changed

Merges pingdotgg/t3code@2c4158f8 into Marcode — 92 upstream commits since the last sync point (82b8a938), as one two-parent merge commit. 25 paths conflicted and were resolved by hand.

This supersedes the three older stacked sync drafts (#41 through f2d5fc91, #43 through beab6886, #45 through be7d35aa); their ranges are all contained in this one. Close them if this lands.

CI is green on 480c621a — all four required checks (Check, Test, Mobile Native Static Analysis, Release Smoke) plus Rust, Test Server 1/2/3. The red checks on the two earlier commits are the three failures described below, each fixed in a follow-up commit.

GitHub still reports mergeable_state: unstable. That is the non-required Native fingerprint diff check, which GitHub cancelled after a 24-hour queue — a pre-existing fork issue this PR surfaced but did not cause; see Worth a maintainer decision below.

Fork-boundary breaks that merged cleanly — no conflict, silent regressions

These are the dangerous ones. Every item below produced zero conflict markers and would have shipped broken.

BreakFix
Upstream's new macOS launch agent (pingdotgg#6286) exports T3CODE_HOME into the plist. resolveLauncherBaseDir reads MARCODE_HOME and throws without it — the background service would never start on macOS.Renamed to MARCODE_HOME; pinned with a test asserting the plist names it and never T3CODE_HOME.
The launch-agent label was com.t3tools.t3code.service, so an upstream T3 Code install writes the same ~/Library/LaunchAgents/…plist path and the two overwrite each other.Derived from BOOT_SERVICE_NAMEcom.t3tools.marcode.service, matching the reason Marcode already renamed the systemd unit. Pinned with a test.
Upstream's new uninstall assertion hardcoded systemctl --user disable --now t3code.service.Now reads BOOT_SERVICE_UNIT_FILE so it can't drift from Marcode's unit name again.
The new t3 triage command (pingdotgg#6563) resolves its base dir from T3CODE_HOME, while its own comment claims parity with t3 pair — which reads MARCODE_HOME.Switched to MARCODE_HOME.
Upstream moved CI to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A blacksmith-* label matches no runner on this fork, so those jobs queue forever rather than failing.All CI jobs back on GitHub-hosted runners. Marcode's existing runner-pinning test caught this — it now also rejects any blacksmith label outright.
Second-order consequence of that runner change, and the one CI caught: upstream also moved the server suite into a new sharded test_server job (pingdotgg#7286), and Marcode's ripgrep install — needed only because of the runner conversion — stayed on the old test job. WorkspaceFileSystem search tests failed with spawn rg ENOENT. Upstream never hits this; their Blacksmith images ship ripgrep.Install step added to test_server. The parity test now derives the job list from whatever actually runs a test suite, so the next split or rename fails there instead of in CI.
Background-draft promotion (pingdotgg#7821) landed its usage of handleNewThread but not its declaration, which fell in a region Marcode had diverged.Restored useNewThreadHandler(); apps/web typechecks.
The new platform docs section named upstream's unit paths.Corrected to marcode.service / com.t3tools.marcode.service.plist.

Conflict decisions

Kept Marcode, ported the upstream fix inside the hunk

Took upstream's refactor, re-applied Marcode's behavior on top

  • WorkspacePageHeader — adopted upstream's shared header primitive on settings and usage, and added one sidebarless prop for SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's collapsed-sidebar selector never matches and the header would slide back under the native window controls.
  • UsagePage — took the redesign (feat(web): redesign usage insights pingdotgg/t3code#7147), re-applied Marcode's styled Tooltip on both refresh controls.
  • _chat.pull-requests / PullRequestListFilters — took upstream's shared PullRequestRefreshControl and Button-based filter trigger, moved Marcode's Tooltip onto them instead of keeping a third refresh button in the header.
  • RightPanelTabs — took tab mute (feat(desktop): mute a browser tab pingdotgg/t3code#7252) and surface-dropdown shortcuts (feat(web): add shortcuts to the surface dropdown pingdotgg/t3code#7318), minus copy-path and the Files entry, which address the retired right-panel file surface. Marcode's add-surface menu now renders from upstream's shared action list rather than duplicating it.
  • ChatComposer / ComposerPendingApprovalPanel — took upstream's composer state drawers (feat(web): attach composer state drawers pingdotgg/t3code#7150); Marcode's in-surface approval banner depended on a container upstream removed. The glass treatment lives on chat-composer-glass-shell in ChatView and is unaffected.

Where Marcode's implementation was superseded

  • threadSettled — retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in favour of upstream's event-ordering rule (fix(threads): a merged PR settles its thread only once pingdotgg/t3code#7454). Both fix the same bug (a merged PR burying a warm follow-up), but upstream's also covers the inherited-PR case — a thread opened on a branch whose PR already merged must never settle — which the time window would have regressed. Marcode's warm-window tests are replaced with tests for the combined rule, and the retirement is documented where the constant lived.

Other

  • Migrations — upstream's 041_AuthSessionClientConnection renumbered to 042. Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one id higher; renumbering an applied id would re-run or skip it on real installs.
  • .plans/** — took upstream's removal (chore: move implementation plans out of repository pingdotgg/t3code#7665). Marcode's only change there was a path rebrand inside a file the repo policy already says not to commit, and .plans/ is gitignored.
  • AGENTS.md — kept Marcode's structure and its own Verifying / Pull-requests sections; adopted upstream's new "Plans and work artifacts" policy and folded its PR-assets rule into Marcode's list.
  • cli/service.ts, cli/connect.ts — took upstream's macOS/launchd copy paths, kept Marcode's product name.
  • index.css, __root.tsx, Sidebar.logic.ts — additive on both sides; kept both.

Coupled changes:pnpm-workspace.yaml moved only Clerk versions, not the effect catalog, so no .repos/ subtree sync is required. infra/relay/package.json is unchanged.

Two fork pins this sync relocated

Both guard Marcode divergences the merge moved rather than removed, so both failed CI on content that is actually correct. Rewritten to assert the invariant where it now lives:

  • Migrations.test.ts pinned a fixed 9-entry tail, so adding migration 42 slid Marcode's own migration 33 out of the window — the diff read as "33 disappeared" rather than "42 is new". Now anchors on 33 by lookup.
  • workspaceTitlebar.fork.test.ts scanned settings/usage for a drag-region line beside SIDEBARLESS_TITLEBAR_INSET_CLASS; adopting WorkspacePageHeader moved both out of the call sites. The guarantee still has two independently regressible halves, each now asserted where it lives.

Why

The daily sync had stalled behind three unmerged drafts, so the fork was 92 commits behind and drifting. Merging the full range in one reviewed pass is cheaper than resolving three overlapping stacks, and it re-establishes a single merge base for the next run.

Every fix above is either an upstream correctness/security/operational change Marcode needs, or a Marcode product contract that upstream's rewrite would have quietly removed. Hotspot paths were treated as mandatory-review, not as automatic keep-Marcode.

UI Changes

Not captured — this ran headless with no browser or display available. This is the main reason the PR is still draft. The following surfaces changed and want a look:

  • Settings and Usage top bars, in Electron on macOS specifically — that's where the sidebarless inset matters (the header must clear the traffic lights).
  • The composer's new top drawer against Marcode's glass shell (approval, user-input, and plan-follow-up states).
  • Chat header, right-panel tabs (mute indicator, add-surface shortcuts), and the terminal drawer's close confirmation.
  • 390px and 820px viewports, per the sync runbook's UI-hotspot rule.

Checklist

  • This PR is small and focused — no. It is a 92-commit upstream sync; that scope is inherent to the task.
  • I explained what changed and why
  • I included before/after screenshots for any UI changes — not possible in this environment; see UI Changes above.
  • I included a video for animation/interaction changes — same.

Verification

CI green on 480c621a:Check, Test, Mobile Native Static Analysis, Release Smoke, Rust, Test Server 1/2/3, Mobile Native Changes. Thread-transfer bot reports the merge stays within every enforced ceiling (+6.7% total wire against a 15.1 KiB cap).

Locally:apps/web fully green (289 files, 2961 tests); typecheck clean for web, server, contracts, shared, client-runtime, mobile, desktop; fmt --check and lint clean on the changed scope.

Each rewritten pin was verified to still fail on the regression it guards — the ripgrep step removed from test_server, the header primitive reverted to the collapsed-only inset, and a route dropping the sidebarless prop — and to pass when restored.

Known-noisy locally, green in CI

The sync container is resource-constrained and shares its port space, which produced local-only failures that CI does not reproduce. Treat CI as authoritative for these:

  • packages/shared/src/Net.test.tsfindAvailablePort returns preferred when it is free. Both Net.ts and Net.test.ts are byte-identical to pre-merge main, and the test passes in CI.
  • A GrokAdapter drain-window test hit its 120s timeout locally under a concurrently running suite. All three CI server shards pass.

Not verified here

  • No live client verification (no browser or simulator available) — see UI Changes.

Worth a maintainer decision

  • Native fingerprint diff can never run on this fork, and this PR is the first to show it..github/workflows/mobile-fingerprint-check.yml still targets blacksmith-8vcpu-ubuntu-2404. That label matches no runner here, so the job queued from 16:02 on 22 Aug until GitHub cancelled it at the 24-hour timeout — which is what leaves this PR unstable. It is untouched by this merge and was already Blacksmith-bound on 5bcc188a; it only surfaced now because the workflow is paths-gated to mobile native files and this diff touches them. It is not a required check, so it does not block merging.

    Deliberately not fixed here — it is unrelated to the sync and this PR is already XXL. The patch is one line, and the same one applied to ci.yml:

    # .github/workflows/mobile-fingerprint-check.yml- runs-on: blacksmith-8vcpu-ubuntu-2404+ runs-on: ubuntu-24.04

    The same latent problem exists in release.yml, publish-aur.yml, web-preview.yml, mobile-eas-preview.yml, mobile-eas-production.yml, and mobile-showcase-screenshots.yml. Worth one small follow-up PR sweeping all of them, plus a parity test covering every workflow rather than just ci.yml.

  • t3 triage's playbook still points at pingdotgg/t3code — a Marcode user running it would be told to file issues upstream. Left as-is: that's a product decision, not a merge decision.

  • docs/internals/scripts.md still documents T3CODE_HOME and .t3/userdata. Pre-existing drift, not caused by this merge; left alone to keep the diff focused.

  • Mobile Native Static Analysis is now conditionally skipped (upstream ci: only boot the macOS native lint runner when native sources change pingdotgg/t3code#7283 gates it on native source changes) and is a required check. It ran on this PR because the diff touches native sources, so the skip path is unverified — worth confirming branch protection treats a skipped required check as passing.

aorightand others added 30 commits August 18, 2026 13:38
…in GitHubPullRequestCli (pingdotgg#7385)
Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…t full speed (pingdotgg#7460)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…nt (pingdotgg#6563)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…tgg#6286)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GPT-5.6 <noreply@openai.com>
t3dotggand others added 22 commits August 20, 2026 22:12
…pingdotgg#7283)
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…otgg#7809)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…gdotgg#7794)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…tgg#6633)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Brings 92 upstream commits (82b8a93..2c4158f) into Marcode. 25 paths
conflicted; each was resolved by combining upstream's intent with Marcode's,
never by taking a whole file from one side.
Fork-boundary breaks that merged cleanly (no conflict, silent regressions):
- bootService: upstream's new macOS launch agent (pingdotgg#6286) exported T3CODE_HOME
into the plist. The Marcode launcher reads MARCODE_HOME and exits without it,
so the background service would never have started. Renamed, and pinned with
a test asserting the plist names MARCODE_HOME and never T3CODE_HOME.
- bootService: the launch-agent label is now derived from BOOT_SERVICE_NAME
(com.t3tools.marcode.service), matching the reason Marcode already renamed the
systemd unit -- an upstream install writes com.t3tools.t3code.service.plist to
the same path and the two must not overwrite each other. Pinned with a test.
- bootService test: upstream's new uninstall assertion hardcoded
"systemctl --user disable --now t3code.service"; it now reads
BOOT_SERVICE_UNIT_FILE so it cannot drift from Marcode's unit name again.
- cli/triage: upstream's new `t3 triage` command (pingdotgg#6563) resolves its base dir
from T3CODE_HOME while its own comment claims parity with `t3 pair`, which
reads MARCODE_HOME. Switched to MARCODE_HOME.
- ci.yml: upstream moved every job to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A
blacksmith-* label matches no runner on this fork, so those jobs would queue
forever rather than fail. All CI jobs are back on GitHub-hosted runners, and
the existing runner-pinning test now also rejects any blacksmith label.
- ChatView: upstream's background-draft promotion (pingdotgg#7821) landed without its
`const handleNewThread = useNewThreadHandler()` declaration, which fell in a
region Marcode had diverged. Restored; the file now typechecks.
- docs/user/background-service.md: the new platform section named upstream's
unit paths; corrected to marcode.service and com.t3tools.marcode.service.plist.
Conflict decisions:
- .plans/**: took upstream's removal (pingdotgg#7665). Marcode's only change there was a
path rebrand inside a file the repo policy already says not to commit, and
.plans/ is gitignored.
- apps/web/src/components/files/{FileBrowserPanel,FilePreviewPanel}.tsx: kept
Marcode's deletion. Upstream's change (pingdotgg#7490) is a refresh affordance confined
to the retired right-panel file surfaces and has no floating-editor analogue.
The removal stays pinned by rightPanelStore.test.ts.
- Migrations: upstream's 041_AuthSessionClientConnection renumbered to 042.
Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one
id higher; renumbering an applied id would re-run or skip it on real installs.
- cli/service.ts, cli/connect.ts: took upstream's macOS/launchd copy paths, kept
Marcode's product name.
- SidebarChrome: kept Marcode's footer. Upstream's SidebarUtilityMenu adds
Settings, Usage, Pull Requests, and Back to a footer Marcode emptied because
FloatingPillNav owns those; SidebarChrome.fork.test.tsx already pins this.
- SettingsSidebarNav: same call, same reason -- upstream swapped the single Back
row for SidebarUtilityMenu. Kept Marcode's Back row and added a test so the
swap fails loudly instead of merging silently next time.
- WorkspacePageHeader: adopted upstream's shared header primitive on settings
and usage, and added a `sidebarless` prop for Marcode's
SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's
collapsed-sidebar selector never matches and the header would slide back under
the native window controls.
- UsagePage: took upstream's redesign (pingdotgg#7147) and re-applied Marcode's styled
Tooltip on both refresh controls.
- _chat.pull-requests / PullRequestListFilters: took upstream's shared
PullRequestRefreshControl and Button-based filter trigger, and moved Marcode's
Tooltip onto them rather than keeping a third refresh button in the header.
- threadSettled: retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in
favour of upstream's event-ordering rule (pingdotgg#7454). Both fix the same bug -- a
merged PR burying a warm follow-up -- but upstream's also covers the inherited
PR case (a thread opened on a branch whose PR already merged must never
settle), which the time window would have regressed. Marcode's warm-window
tests are replaced with tests for the combined rule, and the retirement is
documented where the constant used to live.
- ChatComposer / ComposerPendingApprovalPanel: took upstream's composer state
drawers (pingdotgg#7150). Marcode's in-surface approval banner depended on a container
upstream removed; the glass treatment lives on chat-composer-glass-shell in
ChatView and is unaffected.
- ChatView: kept Marcode's ChatHeader call and its ThreadActionsCluster portal
inside upstream's WorkspacePageHeader, and kept the single container-level
panelLayoutControls render so it is not drawn twice. Kept
chat-composer-glass-shell-transparent and took upstream's -attached modifier.
- ChatHeader: kept Marcode's title-only header. Upstream's inline rename and
title action menu (pingdotgg#7817, pingdotgg#7476) duplicate entry points Marcode already
provides from the sidebar row and pill nav.
- RightPanelTabs: took upstream's tab mute feature (pingdotgg#7252) and surface-dropdown
shortcuts (pingdotgg#7318), minus copy-path and the Files entry, which address the
right-panel file surface Marcode retired. Marcode's existing add-surface menu
now renders from upstream's shared action list rather than duplicating it.
- ThreadTerminalDrawer: kept Marcode's terminal chrome and its FitAddon padding,
took upstream's themed terminal background and routed every close through
upstream's close confirmation (pingdotgg#7592).
- Sidebar.tsx: kept Marcode's 12px empty-state type, took upstream's
cursor-pointer fix (pingdotgg#5545).
- MessagesTimeline: kept Marcode's text-sm, took upstream's -mx-1 removal.
- AGENTS.md: kept Marcode's structure and its own Verifying/Pull-requests
sections, adopted upstream's new "Plans and work artifacts" policy and folded
its PR-assets rule into Marcode's list.
- index.css, __root.tsx, Sidebar.logic.ts: additive on both sides; kept both.
Coupled changes: pnpm-workspace.yaml moved only Clerk versions, not the effect
catalog, so no .repos/ subtree sync is required. infra/relay/package.json is
unchanged.
Verified: focused tests for threadSettled, bootService, service, serviceLauncher,
migration 042, upstream-sync workflow, dev-runner, Sidebar.logic, contracts
settings, shared git, RightPanelTabs, SidebarChrome fork pins, threadSidebarWidth,
rightPanelStore, ThreadStatusIndicators, desktopUpdate, editor-surface. Typecheck
clean for web, server, contracts, shared, client-runtime, mobile, desktop.
Targeted fmt --check and lint clean on the changed scope.
Not verified here: tests that import @aliimam/icons fail to resolve in this
container because that package declares main: dist/index.cjs and ships
dist/index.js. Both the dependency and the importing files are untouched by this
merge.
@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Aug 22, 2026
@github-actions

github-actionsBot commented Aug 22, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB13.4 KiB+856 B (+6.6%)15.1 KiB
CodexThread snapshot wire6.3 KiB6.9 KiB+625 B (+9.7%)7.3 KiB
CodexLive turn WebSocket wire6.3 KiB6.5 KiB+231 B (+3.6%)7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB55.0 KiB+3.2 KiB (+6.1%)66.4 KiB
CodexLive turn messages16160 (0.0%)21
ClaudeTotal thread wire12.6 KiB13.4 KiB+878 B (+6.8%)15.1 KiB
ClaudeThread snapshot wire6.3 KiB6.9 KiB+631 B (+9.8%)7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB6.5 KiB+247 B (+3.8%)7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB55.8 KiB+3.2 KiB (+6.0%)66.4 KiB
ClaudeLive turn messages16160 (0.0%)21

Baseline: 5bcc188 · PR result: 480c621 · 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: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

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

`Test Server 3` failed with `spawn rg ENOENT` on three
WorkspaceFileSystem searchContent tests. WorkspaceFileSystem calls
execFile("rg", ...), a bare PATH lookup.
Upstream never installs ripgrep -- their Blacksmith images ship it.
GitHub-hosted ubuntu-24.04 does not, so Marcode carries an install step,
and this sync converted every CI job back to GitHub-hosted runners.
pingdotgg/t3code@d7b9a689 then moved the `t3` suite into a new sharded
`test_server` job, and the Marcode-only step did not follow it there.
The existing parity test only inspected `ci.jobs.test`, so the move was
invisible to it. It now derives the job list from whatever actually runs
a Test step and asserts the install for each, so a future split, rename,
or new test job fails there instead of in CI.
Verified: WorkspaceFileSystem.test.ts passes locally with rg present
(31 tests); the broadened parity test fails with `job "test_server" must
install ripgrep` when the step is removed and passes when restored.
Both tests guard Marcode divergences the merge relocated rather than
removed, so both failed on content that is actually correct.
Migrations.test.ts pinned a fixed 9-entry tail. Adding upstream's
AuthSessionClientConnection as 042 slid Marcode's own migration 33 out of
that window, so the diff read as "33 disappeared" rather than "42 is
new". It now anchors on 33 by lookup and asserts the sequence from there,
which keeps the pin's intent and reports the real change next time.
workspaceTitlebar.fork.test.ts scanned settings.tsx and UsagePage.tsx for
a `drag-region` line next to SIDEBARLESS_TITLEBAR_INSET_CLASS. Adopting
upstream's shared WorkspacePageHeader moved both out of the call sites,
so neither string remained. The guarantee still has two independently
regressible halves, and each is now asserted where it lives: the
primitive maps `sidebarless` to the unconditional inset and carries the
drag region, and both routes pass the prop.
Verified: each rewritten pin fails when its regression is reintroduced
(the primitive reverted to the collapsed-only inset, and a route dropping
the prop) and passes when restored. Full apps/web suite green
(289 files, 2961 tests).
@maarcoChatGPT Codex Connector

Copy link
Copy Markdown
OwnerAuthor

Superseded by PR #51, the newer upstream sync through f035a0f4, which has now merged to main. Closing this older draft to keep the sync queue clean.

@maarcomaarco closed this Aug 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXLvouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@maarco@aoright@gbarros-dev@Bil0000@Rishet11@StiensWout@AugusDogus@tarik02@gsimone@t3dotgg@chrisdeeming@inayayousfi@RakshithBhat03@dbalders@maria-rcks@UtkarshUsername@SunkenInTime@lgwacker@jakeleventhal@sethwebster
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

chore(upstream): sync marcode through 2c4158f8 - #47

Closed
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d
Closed

chore(upstream): sync marcode through 2c4158f8#47
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d

Conversation

@maarco

@maarcomaarco commented Aug 22, 2026

Copy link
Copy Markdown
Owner

What Changed

Merges pingdotgg/t3code@2c4158f8 into Marcode — 92 upstream commits since the last sync point (82b8a938), as one two-parent merge commit. 25 paths conflicted and were resolved by hand.

This supersedes the three older stacked sync drafts (#41 through f2d5fc91, #43 through beab6886, #45 through be7d35aa); their ranges are all contained in this one. Close them if this lands.

CI is green on 480c621a — all four required checks (Check, Test, Mobile Native Static Analysis, Release Smoke) plus Rust, Test Server 1/2/3. The red checks on the two earlier commits are the three failures described below, each fixed in a follow-up commit.

GitHub still reports mergeable_state: unstable. That is the non-required Native fingerprint diff check, which GitHub cancelled after a 24-hour queue — a pre-existing fork issue this PR surfaced but did not cause; see Worth a maintainer decision below.

Fork-boundary breaks that merged cleanly — no conflict, silent regressions

These are the dangerous ones. Every item below produced zero conflict markers and would have shipped broken.

BreakFix
Upstream's new macOS launch agent (pingdotgg#6286) exports T3CODE_HOME into the plist. resolveLauncherBaseDir reads MARCODE_HOME and throws without it — the background service would never start on macOS.Renamed to MARCODE_HOME; pinned with a test asserting the plist names it and never T3CODE_HOME.
The launch-agent label was com.t3tools.t3code.service, so an upstream T3 Code install writes the same ~/Library/LaunchAgents/…plist path and the two overwrite each other.Derived from BOOT_SERVICE_NAMEcom.t3tools.marcode.service, matching the reason Marcode already renamed the systemd unit. Pinned with a test.
Upstream's new uninstall assertion hardcoded systemctl --user disable --now t3code.service.Now reads BOOT_SERVICE_UNIT_FILE so it can't drift from Marcode's unit name again.
The new t3 triage command (pingdotgg#6563) resolves its base dir from T3CODE_HOME, while its own comment claims parity with t3 pair — which reads MARCODE_HOME.Switched to MARCODE_HOME.
Upstream moved CI to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A blacksmith-* label matches no runner on this fork, so those jobs queue forever rather than failing.All CI jobs back on GitHub-hosted runners. Marcode's existing runner-pinning test caught this — it now also rejects any blacksmith label outright.
Second-order consequence of that runner change, and the one CI caught: upstream also moved the server suite into a new sharded test_server job (pingdotgg#7286), and Marcode's ripgrep install — needed only because of the runner conversion — stayed on the old test job. WorkspaceFileSystem search tests failed with spawn rg ENOENT. Upstream never hits this; their Blacksmith images ship ripgrep.Install step added to test_server. The parity test now derives the job list from whatever actually runs a test suite, so the next split or rename fails there instead of in CI.
Background-draft promotion (pingdotgg#7821) landed its usage of handleNewThread but not its declaration, which fell in a region Marcode had diverged.Restored useNewThreadHandler(); apps/web typechecks.
The new platform docs section named upstream's unit paths.Corrected to marcode.service / com.t3tools.marcode.service.plist.

Conflict decisions

Kept Marcode, ported the upstream fix inside the hunk

Took upstream's refactor, re-applied Marcode's behavior on top

  • WorkspacePageHeader — adopted upstream's shared header primitive on settings and usage, and added one sidebarless prop for SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's collapsed-sidebar selector never matches and the header would slide back under the native window controls.
  • UsagePage — took the redesign (feat(web): redesign usage insights pingdotgg/t3code#7147), re-applied Marcode's styled Tooltip on both refresh controls.
  • _chat.pull-requests / PullRequestListFilters — took upstream's shared PullRequestRefreshControl and Button-based filter trigger, moved Marcode's Tooltip onto them instead of keeping a third refresh button in the header.
  • RightPanelTabs — took tab mute (feat(desktop): mute a browser tab pingdotgg/t3code#7252) and surface-dropdown shortcuts (feat(web): add shortcuts to the surface dropdown pingdotgg/t3code#7318), minus copy-path and the Files entry, which address the retired right-panel file surface. Marcode's add-surface menu now renders from upstream's shared action list rather than duplicating it.
  • ChatComposer / ComposerPendingApprovalPanel — took upstream's composer state drawers (feat(web): attach composer state drawers pingdotgg/t3code#7150); Marcode's in-surface approval banner depended on a container upstream removed. The glass treatment lives on chat-composer-glass-shell in ChatView and is unaffected.

Where Marcode's implementation was superseded

  • threadSettled — retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in favour of upstream's event-ordering rule (fix(threads): a merged PR settles its thread only once pingdotgg/t3code#7454). Both fix the same bug (a merged PR burying a warm follow-up), but upstream's also covers the inherited-PR case — a thread opened on a branch whose PR already merged must never settle — which the time window would have regressed. Marcode's warm-window tests are replaced with tests for the combined rule, and the retirement is documented where the constant lived.

Other

  • Migrations — upstream's 041_AuthSessionClientConnection renumbered to 042. Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one id higher; renumbering an applied id would re-run or skip it on real installs.
  • .plans/** — took upstream's removal (chore: move implementation plans out of repository pingdotgg/t3code#7665). Marcode's only change there was a path rebrand inside a file the repo policy already says not to commit, and .plans/ is gitignored.
  • AGENTS.md — kept Marcode's structure and its own Verifying / Pull-requests sections; adopted upstream's new "Plans and work artifacts" policy and folded its PR-assets rule into Marcode's list.
  • cli/service.ts, cli/connect.ts — took upstream's macOS/launchd copy paths, kept Marcode's product name.
  • index.css, __root.tsx, Sidebar.logic.ts — additive on both sides; kept both.

Coupled changes:pnpm-workspace.yaml moved only Clerk versions, not the effect catalog, so no .repos/ subtree sync is required. infra/relay/package.json is unchanged.

Two fork pins this sync relocated

Both guard Marcode divergences the merge moved rather than removed, so both failed CI on content that is actually correct. Rewritten to assert the invariant where it now lives:

  • Migrations.test.ts pinned a fixed 9-entry tail, so adding migration 42 slid Marcode's own migration 33 out of the window — the diff read as "33 disappeared" rather than "42 is new". Now anchors on 33 by lookup.
  • workspaceTitlebar.fork.test.ts scanned settings/usage for a drag-region line beside SIDEBARLESS_TITLEBAR_INSET_CLASS; adopting WorkspacePageHeader moved both out of the call sites. The guarantee still has two independently regressible halves, each now asserted where it lives.

Why

The daily sync had stalled behind three unmerged drafts, so the fork was 92 commits behind and drifting. Merging the full range in one reviewed pass is cheaper than resolving three overlapping stacks, and it re-establishes a single merge base for the next run.

Every fix above is either an upstream correctness/security/operational change Marcode needs, or a Marcode product contract that upstream's rewrite would have quietly removed. Hotspot paths were treated as mandatory-review, not as automatic keep-Marcode.

UI Changes

Not captured — this ran headless with no browser or display available. This is the main reason the PR is still draft. The following surfaces changed and want a look:

  • Settings and Usage top bars, in Electron on macOS specifically — that's where the sidebarless inset matters (the header must clear the traffic lights).
  • The composer's new top drawer against Marcode's glass shell (approval, user-input, and plan-follow-up states).
  • Chat header, right-panel tabs (mute indicator, add-surface shortcuts), and the terminal drawer's close confirmation.
  • 390px and 820px viewports, per the sync runbook's UI-hotspot rule.

Checklist

  • This PR is small and focused — no. It is a 92-commit upstream sync; that scope is inherent to the task.
  • I explained what changed and why
  • I included before/after screenshots for any UI changes — not possible in this environment; see UI Changes above.
  • I included a video for animation/interaction changes — same.

Verification

CI green on 480c621a:Check, Test, Mobile Native Static Analysis, Release Smoke, Rust, Test Server 1/2/3, Mobile Native Changes. Thread-transfer bot reports the merge stays within every enforced ceiling (+6.7% total wire against a 15.1 KiB cap).

Locally:apps/web fully green (289 files, 2961 tests); typecheck clean for web, server, contracts, shared, client-runtime, mobile, desktop; fmt --check and lint clean on the changed scope.

Each rewritten pin was verified to still fail on the regression it guards — the ripgrep step removed from test_server, the header primitive reverted to the collapsed-only inset, and a route dropping the sidebarless prop — and to pass when restored.

Known-noisy locally, green in CI

The sync container is resource-constrained and shares its port space, which produced local-only failures that CI does not reproduce. Treat CI as authoritative for these:

  • packages/shared/src/Net.test.tsfindAvailablePort returns preferred when it is free. Both Net.ts and Net.test.ts are byte-identical to pre-merge main, and the test passes in CI.
  • A GrokAdapter drain-window test hit its 120s timeout locally under a concurrently running suite. All three CI server shards pass.

Not verified here

  • No live client verification (no browser or simulator available) — see UI Changes.

Worth a maintainer decision

  • Native fingerprint diff can never run on this fork, and this PR is the first to show it..github/workflows/mobile-fingerprint-check.yml still targets blacksmith-8vcpu-ubuntu-2404. That label matches no runner here, so the job queued from 16:02 on 22 Aug until GitHub cancelled it at the 24-hour timeout — which is what leaves this PR unstable. It is untouched by this merge and was already Blacksmith-bound on 5bcc188a; it only surfaced now because the workflow is paths-gated to mobile native files and this diff touches them. It is not a required check, so it does not block merging.

    Deliberately not fixed here — it is unrelated to the sync and this PR is already XXL. The patch is one line, and the same one applied to ci.yml:

    # .github/workflows/mobile-fingerprint-check.yml- runs-on: blacksmith-8vcpu-ubuntu-2404+ runs-on: ubuntu-24.04

    The same latent problem exists in release.yml, publish-aur.yml, web-preview.yml, mobile-eas-preview.yml, mobile-eas-production.yml, and mobile-showcase-screenshots.yml. Worth one small follow-up PR sweeping all of them, plus a parity test covering every workflow rather than just ci.yml.

  • t3 triage's playbook still points at pingdotgg/t3code — a Marcode user running it would be told to file issues upstream. Left as-is: that's a product decision, not a merge decision.

  • docs/internals/scripts.md still documents T3CODE_HOME and .t3/userdata. Pre-existing drift, not caused by this merge; left alone to keep the diff focused.

  • Mobile Native Static Analysis is now conditionally skipped (upstream ci: only boot the macOS native lint runner when native sources change pingdotgg/t3code#7283 gates it on native source changes) and is a required check. It ran on this PR because the diff touches native sources, so the skip path is unverified — worth confirming branch protection treats a skipped required check as passing.

aorightand others added 30 commits August 18, 2026 13:38
…in GitHubPullRequestCli (pingdotgg#7385)
Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…t full speed (pingdotgg#7460)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…nt (pingdotgg#6563)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…tgg#6286)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GPT-5.6 <noreply@openai.com>
t3dotggand others added 22 commits August 20, 2026 22:12
…pingdotgg#7283)
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…otgg#7809)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…gdotgg#7794)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…tgg#6633)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Brings 92 upstream commits (82b8a93..2c4158f) into Marcode. 25 paths
conflicted; each was resolved by combining upstream's intent with Marcode's,
never by taking a whole file from one side.
Fork-boundary breaks that merged cleanly (no conflict, silent regressions):
- bootService: upstream's new macOS launch agent (pingdotgg#6286) exported T3CODE_HOME
into the plist. The Marcode launcher reads MARCODE_HOME and exits without it,
so the background service would never have started. Renamed, and pinned with
a test asserting the plist names MARCODE_HOME and never T3CODE_HOME.
- bootService: the launch-agent label is now derived from BOOT_SERVICE_NAME
(com.t3tools.marcode.service), matching the reason Marcode already renamed the
systemd unit -- an upstream install writes com.t3tools.t3code.service.plist to
the same path and the two must not overwrite each other. Pinned with a test.
- bootService test: upstream's new uninstall assertion hardcoded
"systemctl --user disable --now t3code.service"; it now reads
BOOT_SERVICE_UNIT_FILE so it cannot drift from Marcode's unit name again.
- cli/triage: upstream's new `t3 triage` command (pingdotgg#6563) resolves its base dir
from T3CODE_HOME while its own comment claims parity with `t3 pair`, which
reads MARCODE_HOME. Switched to MARCODE_HOME.
- ci.yml: upstream moved every job to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A
blacksmith-* label matches no runner on this fork, so those jobs would queue
forever rather than fail. All CI jobs are back on GitHub-hosted runners, and
the existing runner-pinning test now also rejects any blacksmith label.
- ChatView: upstream's background-draft promotion (pingdotgg#7821) landed without its
`const handleNewThread = useNewThreadHandler()` declaration, which fell in a
region Marcode had diverged. Restored; the file now typechecks.
- docs/user/background-service.md: the new platform section named upstream's
unit paths; corrected to marcode.service and com.t3tools.marcode.service.plist.
Conflict decisions:
- .plans/**: took upstream's removal (pingdotgg#7665). Marcode's only change there was a
path rebrand inside a file the repo policy already says not to commit, and
.plans/ is gitignored.
- apps/web/src/components/files/{FileBrowserPanel,FilePreviewPanel}.tsx: kept
Marcode's deletion. Upstream's change (pingdotgg#7490) is a refresh affordance confined
to the retired right-panel file surfaces and has no floating-editor analogue.
The removal stays pinned by rightPanelStore.test.ts.
- Migrations: upstream's 041_AuthSessionClientConnection renumbered to 042.
Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one
id higher; renumbering an applied id would re-run or skip it on real installs.
- cli/service.ts, cli/connect.ts: took upstream's macOS/launchd copy paths, kept
Marcode's product name.
- SidebarChrome: kept Marcode's footer. Upstream's SidebarUtilityMenu adds
Settings, Usage, Pull Requests, and Back to a footer Marcode emptied because
FloatingPillNav owns those; SidebarChrome.fork.test.tsx already pins this.
- SettingsSidebarNav: same call, same reason -- upstream swapped the single Back
row for SidebarUtilityMenu. Kept Marcode's Back row and added a test so the
swap fails loudly instead of merging silently next time.
- WorkspacePageHeader: adopted upstream's shared header primitive on settings
and usage, and added a `sidebarless` prop for Marcode's
SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's
collapsed-sidebar selector never matches and the header would slide back under
the native window controls.
- UsagePage: took upstream's redesign (pingdotgg#7147) and re-applied Marcode's styled
Tooltip on both refresh controls.
- _chat.pull-requests / PullRequestListFilters: took upstream's shared
PullRequestRefreshControl and Button-based filter trigger, and moved Marcode's
Tooltip onto them rather than keeping a third refresh button in the header.
- threadSettled: retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in
favour of upstream's event-ordering rule (pingdotgg#7454). Both fix the same bug -- a
merged PR burying a warm follow-up -- but upstream's also covers the inherited
PR case (a thread opened on a branch whose PR already merged must never
settle), which the time window would have regressed. Marcode's warm-window
tests are replaced with tests for the combined rule, and the retirement is
documented where the constant used to live.
- ChatComposer / ComposerPendingApprovalPanel: took upstream's composer state
drawers (pingdotgg#7150). Marcode's in-surface approval banner depended on a container
upstream removed; the glass treatment lives on chat-composer-glass-shell in
ChatView and is unaffected.
- ChatView: kept Marcode's ChatHeader call and its ThreadActionsCluster portal
inside upstream's WorkspacePageHeader, and kept the single container-level
panelLayoutControls render so it is not drawn twice. Kept
chat-composer-glass-shell-transparent and took upstream's -attached modifier.
- ChatHeader: kept Marcode's title-only header. Upstream's inline rename and
title action menu (pingdotgg#7817, pingdotgg#7476) duplicate entry points Marcode already
provides from the sidebar row and pill nav.
- RightPanelTabs: took upstream's tab mute feature (pingdotgg#7252) and surface-dropdown
shortcuts (pingdotgg#7318), minus copy-path and the Files entry, which address the
right-panel file surface Marcode retired. Marcode's existing add-surface menu
now renders from upstream's shared action list rather than duplicating it.
- ThreadTerminalDrawer: kept Marcode's terminal chrome and its FitAddon padding,
took upstream's themed terminal background and routed every close through
upstream's close confirmation (pingdotgg#7592).
- Sidebar.tsx: kept Marcode's 12px empty-state type, took upstream's
cursor-pointer fix (pingdotgg#5545).
- MessagesTimeline: kept Marcode's text-sm, took upstream's -mx-1 removal.
- AGENTS.md: kept Marcode's structure and its own Verifying/Pull-requests
sections, adopted upstream's new "Plans and work artifacts" policy and folded
its PR-assets rule into Marcode's list.
- index.css, __root.tsx, Sidebar.logic.ts: additive on both sides; kept both.
Coupled changes: pnpm-workspace.yaml moved only Clerk versions, not the effect
catalog, so no .repos/ subtree sync is required. infra/relay/package.json is
unchanged.
Verified: focused tests for threadSettled, bootService, service, serviceLauncher,
migration 042, upstream-sync workflow, dev-runner, Sidebar.logic, contracts
settings, shared git, RightPanelTabs, SidebarChrome fork pins, threadSidebarWidth,
rightPanelStore, ThreadStatusIndicators, desktopUpdate, editor-surface. Typecheck
clean for web, server, contracts, shared, client-runtime, mobile, desktop.
Targeted fmt --check and lint clean on the changed scope.
Not verified here: tests that import @aliimam/icons fail to resolve in this
container because that package declares main: dist/index.cjs and ships
dist/index.js. Both the dependency and the importing files are untouched by this
merge.
@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Aug 22, 2026
@github-actions

github-actionsBot commented Aug 22, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB13.4 KiB+856 B (+6.6%)15.1 KiB
CodexThread snapshot wire6.3 KiB6.9 KiB+625 B (+9.7%)7.3 KiB
CodexLive turn WebSocket wire6.3 KiB6.5 KiB+231 B (+3.6%)7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB55.0 KiB+3.2 KiB (+6.1%)66.4 KiB
CodexLive turn messages16160 (0.0%)21
ClaudeTotal thread wire12.6 KiB13.4 KiB+878 B (+6.8%)15.1 KiB
ClaudeThread snapshot wire6.3 KiB6.9 KiB+631 B (+9.8%)7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB6.5 KiB+247 B (+3.8%)7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB55.8 KiB+3.2 KiB (+6.0%)66.4 KiB
ClaudeLive turn messages16160 (0.0%)21

Baseline: 5bcc188 · PR result: 480c621 · 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: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

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

`Test Server 3` failed with `spawn rg ENOENT` on three
WorkspaceFileSystem searchContent tests. WorkspaceFileSystem calls
execFile("rg", ...), a bare PATH lookup.
Upstream never installs ripgrep -- their Blacksmith images ship it.
GitHub-hosted ubuntu-24.04 does not, so Marcode carries an install step,
and this sync converted every CI job back to GitHub-hosted runners.
pingdotgg/t3code@d7b9a689 then moved the `t3` suite into a new sharded
`test_server` job, and the Marcode-only step did not follow it there.
The existing parity test only inspected `ci.jobs.test`, so the move was
invisible to it. It now derives the job list from whatever actually runs
a Test step and asserts the install for each, so a future split, rename,
or new test job fails there instead of in CI.
Verified: WorkspaceFileSystem.test.ts passes locally with rg present
(31 tests); the broadened parity test fails with `job "test_server" must
install ripgrep` when the step is removed and passes when restored.
Both tests guard Marcode divergences the merge relocated rather than
removed, so both failed on content that is actually correct.
Migrations.test.ts pinned a fixed 9-entry tail. Adding upstream's
AuthSessionClientConnection as 042 slid Marcode's own migration 33 out of
that window, so the diff read as "33 disappeared" rather than "42 is
new". It now anchors on 33 by lookup and asserts the sequence from there,
which keeps the pin's intent and reports the real change next time.
workspaceTitlebar.fork.test.ts scanned settings.tsx and UsagePage.tsx for
a `drag-region` line next to SIDEBARLESS_TITLEBAR_INSET_CLASS. Adopting
upstream's shared WorkspacePageHeader moved both out of the call sites,
so neither string remained. The guarantee still has two independently
regressible halves, and each is now asserted where it lives: the
primitive maps `sidebarless` to the unconditional inset and carries the
drag region, and both routes pass the prop.
Verified: each rewritten pin fails when its regression is reintroduced
(the primitive reverted to the collapsed-only inset, and a route dropping
the prop) and passes when restored. Full apps/web suite green
(289 files, 2961 tests).
@maarcoChatGPT Codex Connector

Copy link
Copy Markdown
OwnerAuthor

Superseded by PR #51, the newer upstream sync through f035a0f4, which has now merged to main. Closing this older draft to keep the sync queue clean.

@maarcomaarco closed this Aug 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXLvouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@maarco@aoright@gbarros-dev@Bil0000@Rishet11@StiensWout@AugusDogus@tarik02@gsimone@t3dotgg@chrisdeeming@inayayousfi@RakshithBhat03@dbalders@maria-rcks@UtkarshUsername@SunkenInTime@lgwacker@jakeleventhal@sethwebster
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore(upstream): sync marcode through 2c4158f8 - #47

Closed
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d
Closed

chore(upstream): sync marcode through 2c4158f8#47
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d

Conversation

@maarco

@maarcomaarco commented Aug 22, 2026

Copy link
Copy Markdown
Owner

What Changed

Merges pingdotgg/t3code@2c4158f8 into Marcode — 92 upstream commits since the last sync point (82b8a938), as one two-parent merge commit. 25 paths conflicted and were resolved by hand.

This supersedes the three older stacked sync drafts (#41 through f2d5fc91, #43 through beab6886, #45 through be7d35aa); their ranges are all contained in this one. Close them if this lands.

CI is green on 480c621a — all four required checks (Check, Test, Mobile Native Static Analysis, Release Smoke) plus Rust, Test Server 1/2/3. The red checks on the two earlier commits are the three failures described below, each fixed in a follow-up commit.

GitHub still reports mergeable_state: unstable. That is the non-required Native fingerprint diff check, which GitHub cancelled after a 24-hour queue — a pre-existing fork issue this PR surfaced but did not cause; see Worth a maintainer decision below.

Fork-boundary breaks that merged cleanly — no conflict, silent regressions

These are the dangerous ones. Every item below produced zero conflict markers and would have shipped broken.

BreakFix
Upstream's new macOS launch agent (pingdotgg#6286) exports T3CODE_HOME into the plist. resolveLauncherBaseDir reads MARCODE_HOME and throws without it — the background service would never start on macOS.Renamed to MARCODE_HOME; pinned with a test asserting the plist names it and never T3CODE_HOME.
The launch-agent label was com.t3tools.t3code.service, so an upstream T3 Code install writes the same ~/Library/LaunchAgents/…plist path and the two overwrite each other.Derived from BOOT_SERVICE_NAMEcom.t3tools.marcode.service, matching the reason Marcode already renamed the systemd unit. Pinned with a test.
Upstream's new uninstall assertion hardcoded systemctl --user disable --now t3code.service.Now reads BOOT_SERVICE_UNIT_FILE so it can't drift from Marcode's unit name again.
The new t3 triage command (pingdotgg#6563) resolves its base dir from T3CODE_HOME, while its own comment claims parity with t3 pair — which reads MARCODE_HOME.Switched to MARCODE_HOME.
Upstream moved CI to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A blacksmith-* label matches no runner on this fork, so those jobs queue forever rather than failing.All CI jobs back on GitHub-hosted runners. Marcode's existing runner-pinning test caught this — it now also rejects any blacksmith label outright.
Second-order consequence of that runner change, and the one CI caught: upstream also moved the server suite into a new sharded test_server job (pingdotgg#7286), and Marcode's ripgrep install — needed only because of the runner conversion — stayed on the old test job. WorkspaceFileSystem search tests failed with spawn rg ENOENT. Upstream never hits this; their Blacksmith images ship ripgrep.Install step added to test_server. The parity test now derives the job list from whatever actually runs a test suite, so the next split or rename fails there instead of in CI.
Background-draft promotion (pingdotgg#7821) landed its usage of handleNewThread but not its declaration, which fell in a region Marcode had diverged.Restored useNewThreadHandler(); apps/web typechecks.
The new platform docs section named upstream's unit paths.Corrected to marcode.service / com.t3tools.marcode.service.plist.

Conflict decisions

Kept Marcode, ported the upstream fix inside the hunk

Took upstream's refactor, re-applied Marcode's behavior on top

  • WorkspacePageHeader — adopted upstream's shared header primitive on settings and usage, and added one sidebarless prop for SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's collapsed-sidebar selector never matches and the header would slide back under the native window controls.
  • UsagePage — took the redesign (feat(web): redesign usage insights pingdotgg/t3code#7147), re-applied Marcode's styled Tooltip on both refresh controls.
  • _chat.pull-requests / PullRequestListFilters — took upstream's shared PullRequestRefreshControl and Button-based filter trigger, moved Marcode's Tooltip onto them instead of keeping a third refresh button in the header.
  • RightPanelTabs — took tab mute (feat(desktop): mute a browser tab pingdotgg/t3code#7252) and surface-dropdown shortcuts (feat(web): add shortcuts to the surface dropdown pingdotgg/t3code#7318), minus copy-path and the Files entry, which address the retired right-panel file surface. Marcode's add-surface menu now renders from upstream's shared action list rather than duplicating it.
  • ChatComposer / ComposerPendingApprovalPanel — took upstream's composer state drawers (feat(web): attach composer state drawers pingdotgg/t3code#7150); Marcode's in-surface approval banner depended on a container upstream removed. The glass treatment lives on chat-composer-glass-shell in ChatView and is unaffected.

Where Marcode's implementation was superseded

  • threadSettled — retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in favour of upstream's event-ordering rule (fix(threads): a merged PR settles its thread only once pingdotgg/t3code#7454). Both fix the same bug (a merged PR burying a warm follow-up), but upstream's also covers the inherited-PR case — a thread opened on a branch whose PR already merged must never settle — which the time window would have regressed. Marcode's warm-window tests are replaced with tests for the combined rule, and the retirement is documented where the constant lived.

Other

  • Migrations — upstream's 041_AuthSessionClientConnection renumbered to 042. Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one id higher; renumbering an applied id would re-run or skip it on real installs.
  • .plans/** — took upstream's removal (chore: move implementation plans out of repository pingdotgg/t3code#7665). Marcode's only change there was a path rebrand inside a file the repo policy already says not to commit, and .plans/ is gitignored.
  • AGENTS.md — kept Marcode's structure and its own Verifying / Pull-requests sections; adopted upstream's new "Plans and work artifacts" policy and folded its PR-assets rule into Marcode's list.
  • cli/service.ts, cli/connect.ts — took upstream's macOS/launchd copy paths, kept Marcode's product name.
  • index.css, __root.tsx, Sidebar.logic.ts — additive on both sides; kept both.

Coupled changes:pnpm-workspace.yaml moved only Clerk versions, not the effect catalog, so no .repos/ subtree sync is required. infra/relay/package.json is unchanged.

Two fork pins this sync relocated

Both guard Marcode divergences the merge moved rather than removed, so both failed CI on content that is actually correct. Rewritten to assert the invariant where it now lives:

  • Migrations.test.ts pinned a fixed 9-entry tail, so adding migration 42 slid Marcode's own migration 33 out of the window — the diff read as "33 disappeared" rather than "42 is new". Now anchors on 33 by lookup.
  • workspaceTitlebar.fork.test.ts scanned settings/usage for a drag-region line beside SIDEBARLESS_TITLEBAR_INSET_CLASS; adopting WorkspacePageHeader moved both out of the call sites. The guarantee still has two independently regressible halves, each now asserted where it lives.

Why

The daily sync had stalled behind three unmerged drafts, so the fork was 92 commits behind and drifting. Merging the full range in one reviewed pass is cheaper than resolving three overlapping stacks, and it re-establishes a single merge base for the next run.

Every fix above is either an upstream correctness/security/operational change Marcode needs, or a Marcode product contract that upstream's rewrite would have quietly removed. Hotspot paths were treated as mandatory-review, not as automatic keep-Marcode.

UI Changes

Not captured — this ran headless with no browser or display available. This is the main reason the PR is still draft. The following surfaces changed and want a look:

  • Settings and Usage top bars, in Electron on macOS specifically — that's where the sidebarless inset matters (the header must clear the traffic lights).
  • The composer's new top drawer against Marcode's glass shell (approval, user-input, and plan-follow-up states).
  • Chat header, right-panel tabs (mute indicator, add-surface shortcuts), and the terminal drawer's close confirmation.
  • 390px and 820px viewports, per the sync runbook's UI-hotspot rule.

Checklist

  • This PR is small and focused — no. It is a 92-commit upstream sync; that scope is inherent to the task.
  • I explained what changed and why
  • I included before/after screenshots for any UI changes — not possible in this environment; see UI Changes above.
  • I included a video for animation/interaction changes — same.

Verification

CI green on 480c621a:Check, Test, Mobile Native Static Analysis, Release Smoke, Rust, Test Server 1/2/3, Mobile Native Changes. Thread-transfer bot reports the merge stays within every enforced ceiling (+6.7% total wire against a 15.1 KiB cap).

Locally:apps/web fully green (289 files, 2961 tests); typecheck clean for web, server, contracts, shared, client-runtime, mobile, desktop; fmt --check and lint clean on the changed scope.

Each rewritten pin was verified to still fail on the regression it guards — the ripgrep step removed from test_server, the header primitive reverted to the collapsed-only inset, and a route dropping the sidebarless prop — and to pass when restored.

Known-noisy locally, green in CI

The sync container is resource-constrained and shares its port space, which produced local-only failures that CI does not reproduce. Treat CI as authoritative for these:

  • packages/shared/src/Net.test.tsfindAvailablePort returns preferred when it is free. Both Net.ts and Net.test.ts are byte-identical to pre-merge main, and the test passes in CI.
  • A GrokAdapter drain-window test hit its 120s timeout locally under a concurrently running suite. All three CI server shards pass.

Not verified here

  • No live client verification (no browser or simulator available) — see UI Changes.

Worth a maintainer decision

  • Native fingerprint diff can never run on this fork, and this PR is the first to show it..github/workflows/mobile-fingerprint-check.yml still targets blacksmith-8vcpu-ubuntu-2404. That label matches no runner here, so the job queued from 16:02 on 22 Aug until GitHub cancelled it at the 24-hour timeout — which is what leaves this PR unstable. It is untouched by this merge and was already Blacksmith-bound on 5bcc188a; it only surfaced now because the workflow is paths-gated to mobile native files and this diff touches them. It is not a required check, so it does not block merging.

    Deliberately not fixed here — it is unrelated to the sync and this PR is already XXL. The patch is one line, and the same one applied to ci.yml:

    # .github/workflows/mobile-fingerprint-check.yml- runs-on: blacksmith-8vcpu-ubuntu-2404+ runs-on: ubuntu-24.04

    The same latent problem exists in release.yml, publish-aur.yml, web-preview.yml, mobile-eas-preview.yml, mobile-eas-production.yml, and mobile-showcase-screenshots.yml. Worth one small follow-up PR sweeping all of them, plus a parity test covering every workflow rather than just ci.yml.

  • t3 triage's playbook still points at pingdotgg/t3code — a Marcode user running it would be told to file issues upstream. Left as-is: that's a product decision, not a merge decision.

  • docs/internals/scripts.md still documents T3CODE_HOME and .t3/userdata. Pre-existing drift, not caused by this merge; left alone to keep the diff focused.

  • Mobile Native Static Analysis is now conditionally skipped (upstream ci: only boot the macOS native lint runner when native sources change pingdotgg/t3code#7283 gates it on native source changes) and is a required check. It ran on this PR because the diff touches native sources, so the skip path is unverified — worth confirming branch protection treats a skipped required check as passing.

aorightand others added 30 commits August 18, 2026 13:38
…in GitHubPullRequestCli (pingdotgg#7385)
Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…t full speed (pingdotgg#7460)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…nt (pingdotgg#6563)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…tgg#6286)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GPT-5.6 <noreply@openai.com>
t3dotggand others added 22 commits August 20, 2026 22:12
…pingdotgg#7283)
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…otgg#7809)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…gdotgg#7794)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…tgg#6633)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Brings 92 upstream commits (82b8a93..2c4158f) into Marcode. 25 paths
conflicted; each was resolved by combining upstream's intent with Marcode's,
never by taking a whole file from one side.
Fork-boundary breaks that merged cleanly (no conflict, silent regressions):
- bootService: upstream's new macOS launch agent (pingdotgg#6286) exported T3CODE_HOME
into the plist. The Marcode launcher reads MARCODE_HOME and exits without it,
so the background service would never have started. Renamed, and pinned with
a test asserting the plist names MARCODE_HOME and never T3CODE_HOME.
- bootService: the launch-agent label is now derived from BOOT_SERVICE_NAME
(com.t3tools.marcode.service), matching the reason Marcode already renamed the
systemd unit -- an upstream install writes com.t3tools.t3code.service.plist to
the same path and the two must not overwrite each other. Pinned with a test.
- bootService test: upstream's new uninstall assertion hardcoded
"systemctl --user disable --now t3code.service"; it now reads
BOOT_SERVICE_UNIT_FILE so it cannot drift from Marcode's unit name again.
- cli/triage: upstream's new `t3 triage` command (pingdotgg#6563) resolves its base dir
from T3CODE_HOME while its own comment claims parity with `t3 pair`, which
reads MARCODE_HOME. Switched to MARCODE_HOME.
- ci.yml: upstream moved every job to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A
blacksmith-* label matches no runner on this fork, so those jobs would queue
forever rather than fail. All CI jobs are back on GitHub-hosted runners, and
the existing runner-pinning test now also rejects any blacksmith label.
- ChatView: upstream's background-draft promotion (pingdotgg#7821) landed without its
`const handleNewThread = useNewThreadHandler()` declaration, which fell in a
region Marcode had diverged. Restored; the file now typechecks.
- docs/user/background-service.md: the new platform section named upstream's
unit paths; corrected to marcode.service and com.t3tools.marcode.service.plist.
Conflict decisions:
- .plans/**: took upstream's removal (pingdotgg#7665). Marcode's only change there was a
path rebrand inside a file the repo policy already says not to commit, and
.plans/ is gitignored.
- apps/web/src/components/files/{FileBrowserPanel,FilePreviewPanel}.tsx: kept
Marcode's deletion. Upstream's change (pingdotgg#7490) is a refresh affordance confined
to the retired right-panel file surfaces and has no floating-editor analogue.
The removal stays pinned by rightPanelStore.test.ts.
- Migrations: upstream's 041_AuthSessionClientConnection renumbered to 042.
Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one
id higher; renumbering an applied id would re-run or skip it on real installs.
- cli/service.ts, cli/connect.ts: took upstream's macOS/launchd copy paths, kept
Marcode's product name.
- SidebarChrome: kept Marcode's footer. Upstream's SidebarUtilityMenu adds
Settings, Usage, Pull Requests, and Back to a footer Marcode emptied because
FloatingPillNav owns those; SidebarChrome.fork.test.tsx already pins this.
- SettingsSidebarNav: same call, same reason -- upstream swapped the single Back
row for SidebarUtilityMenu. Kept Marcode's Back row and added a test so the
swap fails loudly instead of merging silently next time.
- WorkspacePageHeader: adopted upstream's shared header primitive on settings
and usage, and added a `sidebarless` prop for Marcode's
SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's
collapsed-sidebar selector never matches and the header would slide back under
the native window controls.
- UsagePage: took upstream's redesign (pingdotgg#7147) and re-applied Marcode's styled
Tooltip on both refresh controls.
- _chat.pull-requests / PullRequestListFilters: took upstream's shared
PullRequestRefreshControl and Button-based filter trigger, and moved Marcode's
Tooltip onto them rather than keeping a third refresh button in the header.
- threadSettled: retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in
favour of upstream's event-ordering rule (pingdotgg#7454). Both fix the same bug -- a
merged PR burying a warm follow-up -- but upstream's also covers the inherited
PR case (a thread opened on a branch whose PR already merged must never
settle), which the time window would have regressed. Marcode's warm-window
tests are replaced with tests for the combined rule, and the retirement is
documented where the constant used to live.
- ChatComposer / ComposerPendingApprovalPanel: took upstream's composer state
drawers (pingdotgg#7150). Marcode's in-surface approval banner depended on a container
upstream removed; the glass treatment lives on chat-composer-glass-shell in
ChatView and is unaffected.
- ChatView: kept Marcode's ChatHeader call and its ThreadActionsCluster portal
inside upstream's WorkspacePageHeader, and kept the single container-level
panelLayoutControls render so it is not drawn twice. Kept
chat-composer-glass-shell-transparent and took upstream's -attached modifier.
- ChatHeader: kept Marcode's title-only header. Upstream's inline rename and
title action menu (pingdotgg#7817, pingdotgg#7476) duplicate entry points Marcode already
provides from the sidebar row and pill nav.
- RightPanelTabs: took upstream's tab mute feature (pingdotgg#7252) and surface-dropdown
shortcuts (pingdotgg#7318), minus copy-path and the Files entry, which address the
right-panel file surface Marcode retired. Marcode's existing add-surface menu
now renders from upstream's shared action list rather than duplicating it.
- ThreadTerminalDrawer: kept Marcode's terminal chrome and its FitAddon padding,
took upstream's themed terminal background and routed every close through
upstream's close confirmation (pingdotgg#7592).
- Sidebar.tsx: kept Marcode's 12px empty-state type, took upstream's
cursor-pointer fix (pingdotgg#5545).
- MessagesTimeline: kept Marcode's text-sm, took upstream's -mx-1 removal.
- AGENTS.md: kept Marcode's structure and its own Verifying/Pull-requests
sections, adopted upstream's new "Plans and work artifacts" policy and folded
its PR-assets rule into Marcode's list.
- index.css, __root.tsx, Sidebar.logic.ts: additive on both sides; kept both.
Coupled changes: pnpm-workspace.yaml moved only Clerk versions, not the effect
catalog, so no .repos/ subtree sync is required. infra/relay/package.json is
unchanged.
Verified: focused tests for threadSettled, bootService, service, serviceLauncher,
migration 042, upstream-sync workflow, dev-runner, Sidebar.logic, contracts
settings, shared git, RightPanelTabs, SidebarChrome fork pins, threadSidebarWidth,
rightPanelStore, ThreadStatusIndicators, desktopUpdate, editor-surface. Typecheck
clean for web, server, contracts, shared, client-runtime, mobile, desktop.
Targeted fmt --check and lint clean on the changed scope.
Not verified here: tests that import @aliimam/icons fail to resolve in this
container because that package declares main: dist/index.cjs and ships
dist/index.js. Both the dependency and the importing files are untouched by this
merge.
@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Aug 22, 2026
@github-actions

github-actionsBot commented Aug 22, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB13.4 KiB+856 B (+6.6%)15.1 KiB
CodexThread snapshot wire6.3 KiB6.9 KiB+625 B (+9.7%)7.3 KiB
CodexLive turn WebSocket wire6.3 KiB6.5 KiB+231 B (+3.6%)7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB55.0 KiB+3.2 KiB (+6.1%)66.4 KiB
CodexLive turn messages16160 (0.0%)21
ClaudeTotal thread wire12.6 KiB13.4 KiB+878 B (+6.8%)15.1 KiB
ClaudeThread snapshot wire6.3 KiB6.9 KiB+631 B (+9.8%)7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB6.5 KiB+247 B (+3.8%)7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB55.8 KiB+3.2 KiB (+6.0%)66.4 KiB
ClaudeLive turn messages16160 (0.0%)21

Baseline: 5bcc188 · PR result: 480c621 · 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: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

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

`Test Server 3` failed with `spawn rg ENOENT` on three
WorkspaceFileSystem searchContent tests. WorkspaceFileSystem calls
execFile("rg", ...), a bare PATH lookup.
Upstream never installs ripgrep -- their Blacksmith images ship it.
GitHub-hosted ubuntu-24.04 does not, so Marcode carries an install step,
and this sync converted every CI job back to GitHub-hosted runners.
pingdotgg/t3code@d7b9a689 then moved the `t3` suite into a new sharded
`test_server` job, and the Marcode-only step did not follow it there.
The existing parity test only inspected `ci.jobs.test`, so the move was
invisible to it. It now derives the job list from whatever actually runs
a Test step and asserts the install for each, so a future split, rename,
or new test job fails there instead of in CI.
Verified: WorkspaceFileSystem.test.ts passes locally with rg present
(31 tests); the broadened parity test fails with `job "test_server" must
install ripgrep` when the step is removed and passes when restored.
Both tests guard Marcode divergences the merge relocated rather than
removed, so both failed on content that is actually correct.
Migrations.test.ts pinned a fixed 9-entry tail. Adding upstream's
AuthSessionClientConnection as 042 slid Marcode's own migration 33 out of
that window, so the diff read as "33 disappeared" rather than "42 is
new". It now anchors on 33 by lookup and asserts the sequence from there,
which keeps the pin's intent and reports the real change next time.
workspaceTitlebar.fork.test.ts scanned settings.tsx and UsagePage.tsx for
a `drag-region` line next to SIDEBARLESS_TITLEBAR_INSET_CLASS. Adopting
upstream's shared WorkspacePageHeader moved both out of the call sites,
so neither string remained. The guarantee still has two independently
regressible halves, and each is now asserted where it lives: the
primitive maps `sidebarless` to the unconditional inset and carries the
drag region, and both routes pass the prop.
Verified: each rewritten pin fails when its regression is reintroduced
(the primitive reverted to the collapsed-only inset, and a route dropping
the prop) and passes when restored. Full apps/web suite green
(289 files, 2961 tests).
@maarcoChatGPT Codex Connector

Copy link
Copy Markdown
OwnerAuthor

Superseded by PR #51, the newer upstream sync through f035a0f4, which has now merged to main. Closing this older draft to keep the sync queue clean.

@maarcomaarco closed this Aug 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXLvouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@maarco@aoright@gbarros-dev@Bil0000@Rishet11@StiensWout@AugusDogus@tarik02@gsimone@t3dotgg@chrisdeeming@inayayousfi@RakshithBhat03@dbalders@maria-rcks@UtkarshUsername@SunkenInTime@lgwacker@jakeleventhal@sethwebster
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore(upstream): sync marcode through 2c4158f8 - #47

Closed
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d
Closed

chore(upstream): sync marcode through 2c4158f8#47
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d

Conversation

@maarco

@maarcomaarco commented Aug 22, 2026

Copy link
Copy Markdown
Owner

What Changed

Merges pingdotgg/t3code@2c4158f8 into Marcode — 92 upstream commits since the last sync point (82b8a938), as one two-parent merge commit. 25 paths conflicted and were resolved by hand.

This supersedes the three older stacked sync drafts (#41 through f2d5fc91, #43 through beab6886, #45 through be7d35aa); their ranges are all contained in this one. Close them if this lands.

CI is green on 480c621a — all four required checks (Check, Test, Mobile Native Static Analysis, Release Smoke) plus Rust, Test Server 1/2/3. The red checks on the two earlier commits are the three failures described below, each fixed in a follow-up commit.

GitHub still reports mergeable_state: unstable. That is the non-required Native fingerprint diff check, which GitHub cancelled after a 24-hour queue — a pre-existing fork issue this PR surfaced but did not cause; see Worth a maintainer decision below.

Fork-boundary breaks that merged cleanly — no conflict, silent regressions

These are the dangerous ones. Every item below produced zero conflict markers and would have shipped broken.

BreakFix
Upstream's new macOS launch agent (pingdotgg#6286) exports T3CODE_HOME into the plist. resolveLauncherBaseDir reads MARCODE_HOME and throws without it — the background service would never start on macOS.Renamed to MARCODE_HOME; pinned with a test asserting the plist names it and never T3CODE_HOME.
The launch-agent label was com.t3tools.t3code.service, so an upstream T3 Code install writes the same ~/Library/LaunchAgents/…plist path and the two overwrite each other.Derived from BOOT_SERVICE_NAMEcom.t3tools.marcode.service, matching the reason Marcode already renamed the systemd unit. Pinned with a test.
Upstream's new uninstall assertion hardcoded systemctl --user disable --now t3code.service.Now reads BOOT_SERVICE_UNIT_FILE so it can't drift from Marcode's unit name again.
The new t3 triage command (pingdotgg#6563) resolves its base dir from T3CODE_HOME, while its own comment claims parity with t3 pair — which reads MARCODE_HOME.Switched to MARCODE_HOME.
Upstream moved CI to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A blacksmith-* label matches no runner on this fork, so those jobs queue forever rather than failing.All CI jobs back on GitHub-hosted runners. Marcode's existing runner-pinning test caught this — it now also rejects any blacksmith label outright.
Second-order consequence of that runner change, and the one CI caught: upstream also moved the server suite into a new sharded test_server job (pingdotgg#7286), and Marcode's ripgrep install — needed only because of the runner conversion — stayed on the old test job. WorkspaceFileSystem search tests failed with spawn rg ENOENT. Upstream never hits this; their Blacksmith images ship ripgrep.Install step added to test_server. The parity test now derives the job list from whatever actually runs a test suite, so the next split or rename fails there instead of in CI.
Background-draft promotion (pingdotgg#7821) landed its usage of handleNewThread but not its declaration, which fell in a region Marcode had diverged.Restored useNewThreadHandler(); apps/web typechecks.
The new platform docs section named upstream's unit paths.Corrected to marcode.service / com.t3tools.marcode.service.plist.

Conflict decisions

Kept Marcode, ported the upstream fix inside the hunk

Took upstream's refactor, re-applied Marcode's behavior on top

  • WorkspacePageHeader — adopted upstream's shared header primitive on settings and usage, and added one sidebarless prop for SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's collapsed-sidebar selector never matches and the header would slide back under the native window controls.
  • UsagePage — took the redesign (feat(web): redesign usage insights pingdotgg/t3code#7147), re-applied Marcode's styled Tooltip on both refresh controls.
  • _chat.pull-requests / PullRequestListFilters — took upstream's shared PullRequestRefreshControl and Button-based filter trigger, moved Marcode's Tooltip onto them instead of keeping a third refresh button in the header.
  • RightPanelTabs — took tab mute (feat(desktop): mute a browser tab pingdotgg/t3code#7252) and surface-dropdown shortcuts (feat(web): add shortcuts to the surface dropdown pingdotgg/t3code#7318), minus copy-path and the Files entry, which address the retired right-panel file surface. Marcode's add-surface menu now renders from upstream's shared action list rather than duplicating it.
  • ChatComposer / ComposerPendingApprovalPanel — took upstream's composer state drawers (feat(web): attach composer state drawers pingdotgg/t3code#7150); Marcode's in-surface approval banner depended on a container upstream removed. The glass treatment lives on chat-composer-glass-shell in ChatView and is unaffected.

Where Marcode's implementation was superseded

  • threadSettled — retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in favour of upstream's event-ordering rule (fix(threads): a merged PR settles its thread only once pingdotgg/t3code#7454). Both fix the same bug (a merged PR burying a warm follow-up), but upstream's also covers the inherited-PR case — a thread opened on a branch whose PR already merged must never settle — which the time window would have regressed. Marcode's warm-window tests are replaced with tests for the combined rule, and the retirement is documented where the constant lived.

Other

  • Migrations — upstream's 041_AuthSessionClientConnection renumbered to 042. Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one id higher; renumbering an applied id would re-run or skip it on real installs.
  • .plans/** — took upstream's removal (chore: move implementation plans out of repository pingdotgg/t3code#7665). Marcode's only change there was a path rebrand inside a file the repo policy already says not to commit, and .plans/ is gitignored.
  • AGENTS.md — kept Marcode's structure and its own Verifying / Pull-requests sections; adopted upstream's new "Plans and work artifacts" policy and folded its PR-assets rule into Marcode's list.
  • cli/service.ts, cli/connect.ts — took upstream's macOS/launchd copy paths, kept Marcode's product name.
  • index.css, __root.tsx, Sidebar.logic.ts — additive on both sides; kept both.

Coupled changes:pnpm-workspace.yaml moved only Clerk versions, not the effect catalog, so no .repos/ subtree sync is required. infra/relay/package.json is unchanged.

Two fork pins this sync relocated

Both guard Marcode divergences the merge moved rather than removed, so both failed CI on content that is actually correct. Rewritten to assert the invariant where it now lives:

  • Migrations.test.ts pinned a fixed 9-entry tail, so adding migration 42 slid Marcode's own migration 33 out of the window — the diff read as "33 disappeared" rather than "42 is new". Now anchors on 33 by lookup.
  • workspaceTitlebar.fork.test.ts scanned settings/usage for a drag-region line beside SIDEBARLESS_TITLEBAR_INSET_CLASS; adopting WorkspacePageHeader moved both out of the call sites. The guarantee still has two independently regressible halves, each now asserted where it lives.

Why

The daily sync had stalled behind three unmerged drafts, so the fork was 92 commits behind and drifting. Merging the full range in one reviewed pass is cheaper than resolving three overlapping stacks, and it re-establishes a single merge base for the next run.

Every fix above is either an upstream correctness/security/operational change Marcode needs, or a Marcode product contract that upstream's rewrite would have quietly removed. Hotspot paths were treated as mandatory-review, not as automatic keep-Marcode.

UI Changes

Not captured — this ran headless with no browser or display available. This is the main reason the PR is still draft. The following surfaces changed and want a look:

  • Settings and Usage top bars, in Electron on macOS specifically — that's where the sidebarless inset matters (the header must clear the traffic lights).
  • The composer's new top drawer against Marcode's glass shell (approval, user-input, and plan-follow-up states).
  • Chat header, right-panel tabs (mute indicator, add-surface shortcuts), and the terminal drawer's close confirmation.
  • 390px and 820px viewports, per the sync runbook's UI-hotspot rule.

Checklist

  • This PR is small and focused — no. It is a 92-commit upstream sync; that scope is inherent to the task.
  • I explained what changed and why
  • I included before/after screenshots for any UI changes — not possible in this environment; see UI Changes above.
  • I included a video for animation/interaction changes — same.

Verification

CI green on 480c621a:Check, Test, Mobile Native Static Analysis, Release Smoke, Rust, Test Server 1/2/3, Mobile Native Changes. Thread-transfer bot reports the merge stays within every enforced ceiling (+6.7% total wire against a 15.1 KiB cap).

Locally:apps/web fully green (289 files, 2961 tests); typecheck clean for web, server, contracts, shared, client-runtime, mobile, desktop; fmt --check and lint clean on the changed scope.

Each rewritten pin was verified to still fail on the regression it guards — the ripgrep step removed from test_server, the header primitive reverted to the collapsed-only inset, and a route dropping the sidebarless prop — and to pass when restored.

Known-noisy locally, green in CI

The sync container is resource-constrained and shares its port space, which produced local-only failures that CI does not reproduce. Treat CI as authoritative for these:

  • packages/shared/src/Net.test.tsfindAvailablePort returns preferred when it is free. Both Net.ts and Net.test.ts are byte-identical to pre-merge main, and the test passes in CI.
  • A GrokAdapter drain-window test hit its 120s timeout locally under a concurrently running suite. All three CI server shards pass.

Not verified here

  • No live client verification (no browser or simulator available) — see UI Changes.

Worth a maintainer decision

  • Native fingerprint diff can never run on this fork, and this PR is the first to show it..github/workflows/mobile-fingerprint-check.yml still targets blacksmith-8vcpu-ubuntu-2404. That label matches no runner here, so the job queued from 16:02 on 22 Aug until GitHub cancelled it at the 24-hour timeout — which is what leaves this PR unstable. It is untouched by this merge and was already Blacksmith-bound on 5bcc188a; it only surfaced now because the workflow is paths-gated to mobile native files and this diff touches them. It is not a required check, so it does not block merging.

    Deliberately not fixed here — it is unrelated to the sync and this PR is already XXL. The patch is one line, and the same one applied to ci.yml:

    # .github/workflows/mobile-fingerprint-check.yml- runs-on: blacksmith-8vcpu-ubuntu-2404+ runs-on: ubuntu-24.04

    The same latent problem exists in release.yml, publish-aur.yml, web-preview.yml, mobile-eas-preview.yml, mobile-eas-production.yml, and mobile-showcase-screenshots.yml. Worth one small follow-up PR sweeping all of them, plus a parity test covering every workflow rather than just ci.yml.

  • t3 triage's playbook still points at pingdotgg/t3code — a Marcode user running it would be told to file issues upstream. Left as-is: that's a product decision, not a merge decision.

  • docs/internals/scripts.md still documents T3CODE_HOME and .t3/userdata. Pre-existing drift, not caused by this merge; left alone to keep the diff focused.

  • Mobile Native Static Analysis is now conditionally skipped (upstream ci: only boot the macOS native lint runner when native sources change pingdotgg/t3code#7283 gates it on native source changes) and is a required check. It ran on this PR because the diff touches native sources, so the skip path is unverified — worth confirming branch protection treats a skipped required check as passing.

aorightand others added 30 commits August 18, 2026 13:38
…in GitHubPullRequestCli (pingdotgg#7385)
Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…t full speed (pingdotgg#7460)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…nt (pingdotgg#6563)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…tgg#6286)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GPT-5.6 <noreply@openai.com>
t3dotggand others added 22 commits August 20, 2026 22:12
…pingdotgg#7283)
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…otgg#7809)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…gdotgg#7794)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…tgg#6633)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Brings 92 upstream commits (82b8a93..2c4158f) into Marcode. 25 paths
conflicted; each was resolved by combining upstream's intent with Marcode's,
never by taking a whole file from one side.
Fork-boundary breaks that merged cleanly (no conflict, silent regressions):
- bootService: upstream's new macOS launch agent (pingdotgg#6286) exported T3CODE_HOME
into the plist. The Marcode launcher reads MARCODE_HOME and exits without it,
so the background service would never have started. Renamed, and pinned with
a test asserting the plist names MARCODE_HOME and never T3CODE_HOME.
- bootService: the launch-agent label is now derived from BOOT_SERVICE_NAME
(com.t3tools.marcode.service), matching the reason Marcode already renamed the
systemd unit -- an upstream install writes com.t3tools.t3code.service.plist to
the same path and the two must not overwrite each other. Pinned with a test.
- bootService test: upstream's new uninstall assertion hardcoded
"systemctl --user disable --now t3code.service"; it now reads
BOOT_SERVICE_UNIT_FILE so it cannot drift from Marcode's unit name again.
- cli/triage: upstream's new `t3 triage` command (pingdotgg#6563) resolves its base dir
from T3CODE_HOME while its own comment claims parity with `t3 pair`, which
reads MARCODE_HOME. Switched to MARCODE_HOME.
- ci.yml: upstream moved every job to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A
blacksmith-* label matches no runner on this fork, so those jobs would queue
forever rather than fail. All CI jobs are back on GitHub-hosted runners, and
the existing runner-pinning test now also rejects any blacksmith label.
- ChatView: upstream's background-draft promotion (pingdotgg#7821) landed without its
`const handleNewThread = useNewThreadHandler()` declaration, which fell in a
region Marcode had diverged. Restored; the file now typechecks.
- docs/user/background-service.md: the new platform section named upstream's
unit paths; corrected to marcode.service and com.t3tools.marcode.service.plist.
Conflict decisions:
- .plans/**: took upstream's removal (pingdotgg#7665). Marcode's only change there was a
path rebrand inside a file the repo policy already says not to commit, and
.plans/ is gitignored.
- apps/web/src/components/files/{FileBrowserPanel,FilePreviewPanel}.tsx: kept
Marcode's deletion. Upstream's change (pingdotgg#7490) is a refresh affordance confined
to the retired right-panel file surfaces and has no floating-editor analogue.
The removal stays pinned by rightPanelStore.test.ts.
- Migrations: upstream's 041_AuthSessionClientConnection renumbered to 042.
Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one
id higher; renumbering an applied id would re-run or skip it on real installs.
- cli/service.ts, cli/connect.ts: took upstream's macOS/launchd copy paths, kept
Marcode's product name.
- SidebarChrome: kept Marcode's footer. Upstream's SidebarUtilityMenu adds
Settings, Usage, Pull Requests, and Back to a footer Marcode emptied because
FloatingPillNav owns those; SidebarChrome.fork.test.tsx already pins this.
- SettingsSidebarNav: same call, same reason -- upstream swapped the single Back
row for SidebarUtilityMenu. Kept Marcode's Back row and added a test so the
swap fails loudly instead of merging silently next time.
- WorkspacePageHeader: adopted upstream's shared header primitive on settings
and usage, and added a `sidebarless` prop for Marcode's
SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's
collapsed-sidebar selector never matches and the header would slide back under
the native window controls.
- UsagePage: took upstream's redesign (pingdotgg#7147) and re-applied Marcode's styled
Tooltip on both refresh controls.
- _chat.pull-requests / PullRequestListFilters: took upstream's shared
PullRequestRefreshControl and Button-based filter trigger, and moved Marcode's
Tooltip onto them rather than keeping a third refresh button in the header.
- threadSettled: retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in
favour of upstream's event-ordering rule (pingdotgg#7454). Both fix the same bug -- a
merged PR burying a warm follow-up -- but upstream's also covers the inherited
PR case (a thread opened on a branch whose PR already merged must never
settle), which the time window would have regressed. Marcode's warm-window
tests are replaced with tests for the combined rule, and the retirement is
documented where the constant used to live.
- ChatComposer / ComposerPendingApprovalPanel: took upstream's composer state
drawers (pingdotgg#7150). Marcode's in-surface approval banner depended on a container
upstream removed; the glass treatment lives on chat-composer-glass-shell in
ChatView and is unaffected.
- ChatView: kept Marcode's ChatHeader call and its ThreadActionsCluster portal
inside upstream's WorkspacePageHeader, and kept the single container-level
panelLayoutControls render so it is not drawn twice. Kept
chat-composer-glass-shell-transparent and took upstream's -attached modifier.
- ChatHeader: kept Marcode's title-only header. Upstream's inline rename and
title action menu (pingdotgg#7817, pingdotgg#7476) duplicate entry points Marcode already
provides from the sidebar row and pill nav.
- RightPanelTabs: took upstream's tab mute feature (pingdotgg#7252) and surface-dropdown
shortcuts (pingdotgg#7318), minus copy-path and the Files entry, which address the
right-panel file surface Marcode retired. Marcode's existing add-surface menu
now renders from upstream's shared action list rather than duplicating it.
- ThreadTerminalDrawer: kept Marcode's terminal chrome and its FitAddon padding,
took upstream's themed terminal background and routed every close through
upstream's close confirmation (pingdotgg#7592).
- Sidebar.tsx: kept Marcode's 12px empty-state type, took upstream's
cursor-pointer fix (pingdotgg#5545).
- MessagesTimeline: kept Marcode's text-sm, took upstream's -mx-1 removal.
- AGENTS.md: kept Marcode's structure and its own Verifying/Pull-requests
sections, adopted upstream's new "Plans and work artifacts" policy and folded
its PR-assets rule into Marcode's list.
- index.css, __root.tsx, Sidebar.logic.ts: additive on both sides; kept both.
Coupled changes: pnpm-workspace.yaml moved only Clerk versions, not the effect
catalog, so no .repos/ subtree sync is required. infra/relay/package.json is
unchanged.
Verified: focused tests for threadSettled, bootService, service, serviceLauncher,
migration 042, upstream-sync workflow, dev-runner, Sidebar.logic, contracts
settings, shared git, RightPanelTabs, SidebarChrome fork pins, threadSidebarWidth,
rightPanelStore, ThreadStatusIndicators, desktopUpdate, editor-surface. Typecheck
clean for web, server, contracts, shared, client-runtime, mobile, desktop.
Targeted fmt --check and lint clean on the changed scope.
Not verified here: tests that import @aliimam/icons fail to resolve in this
container because that package declares main: dist/index.cjs and ships
dist/index.js. Both the dependency and the importing files are untouched by this
merge.
@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Aug 22, 2026
@github-actions

github-actionsBot commented Aug 22, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB13.4 KiB+856 B (+6.6%)15.1 KiB
CodexThread snapshot wire6.3 KiB6.9 KiB+625 B (+9.7%)7.3 KiB
CodexLive turn WebSocket wire6.3 KiB6.5 KiB+231 B (+3.6%)7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB55.0 KiB+3.2 KiB (+6.1%)66.4 KiB
CodexLive turn messages16160 (0.0%)21
ClaudeTotal thread wire12.6 KiB13.4 KiB+878 B (+6.8%)15.1 KiB
ClaudeThread snapshot wire6.3 KiB6.9 KiB+631 B (+9.8%)7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB6.5 KiB+247 B (+3.8%)7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB55.8 KiB+3.2 KiB (+6.0%)66.4 KiB
ClaudeLive turn messages16160 (0.0%)21

Baseline: 5bcc188 · PR result: 480c621 · 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: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

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

`Test Server 3` failed with `spawn rg ENOENT` on three
WorkspaceFileSystem searchContent tests. WorkspaceFileSystem calls
execFile("rg", ...), a bare PATH lookup.
Upstream never installs ripgrep -- their Blacksmith images ship it.
GitHub-hosted ubuntu-24.04 does not, so Marcode carries an install step,
and this sync converted every CI job back to GitHub-hosted runners.
pingdotgg/t3code@d7b9a689 then moved the `t3` suite into a new sharded
`test_server` job, and the Marcode-only step did not follow it there.
The existing parity test only inspected `ci.jobs.test`, so the move was
invisible to it. It now derives the job list from whatever actually runs
a Test step and asserts the install for each, so a future split, rename,
or new test job fails there instead of in CI.
Verified: WorkspaceFileSystem.test.ts passes locally with rg present
(31 tests); the broadened parity test fails with `job "test_server" must
install ripgrep` when the step is removed and passes when restored.
Both tests guard Marcode divergences the merge relocated rather than
removed, so both failed on content that is actually correct.
Migrations.test.ts pinned a fixed 9-entry tail. Adding upstream's
AuthSessionClientConnection as 042 slid Marcode's own migration 33 out of
that window, so the diff read as "33 disappeared" rather than "42 is
new". It now anchors on 33 by lookup and asserts the sequence from there,
which keeps the pin's intent and reports the real change next time.
workspaceTitlebar.fork.test.ts scanned settings.tsx and UsagePage.tsx for
a `drag-region` line next to SIDEBARLESS_TITLEBAR_INSET_CLASS. Adopting
upstream's shared WorkspacePageHeader moved both out of the call sites,
so neither string remained. The guarantee still has two independently
regressible halves, and each is now asserted where it lives: the
primitive maps `sidebarless` to the unconditional inset and carries the
drag region, and both routes pass the prop.
Verified: each rewritten pin fails when its regression is reintroduced
(the primitive reverted to the collapsed-only inset, and a route dropping
the prop) and passes when restored. Full apps/web suite green
(289 files, 2961 tests).
@maarcoChatGPT Codex Connector

Copy link
Copy Markdown
OwnerAuthor

Superseded by PR #51, the newer upstream sync through f035a0f4, which has now merged to main. Closing this older draft to keep the sync queue clean.

@maarcomaarco closed this Aug 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXLvouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@maarco@aoright@gbarros-dev@Bil0000@Rishet11@StiensWout@AugusDogus@tarik02@gsimone@t3dotgg@chrisdeeming@inayayousfi@RakshithBhat03@dbalders@maria-rcks@UtkarshUsername@SunkenInTime@lgwacker@jakeleventhal@sethwebster
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

chore(upstream): sync marcode through 2c4158f8 - #47

Closed
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d
Closed

chore(upstream): sync marcode through 2c4158f8#47
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d

Conversation

@maarco

@maarcomaarco commented Aug 22, 2026

Copy link
Copy Markdown
Owner

What Changed

Merges pingdotgg/t3code@2c4158f8 into Marcode — 92 upstream commits since the last sync point (82b8a938), as one two-parent merge commit. 25 paths conflicted and were resolved by hand.

This supersedes the three older stacked sync drafts (#41 through f2d5fc91, #43 through beab6886, #45 through be7d35aa); their ranges are all contained in this one. Close them if this lands.

CI is green on 480c621a — all four required checks (Check, Test, Mobile Native Static Analysis, Release Smoke) plus Rust, Test Server 1/2/3. The red checks on the two earlier commits are the three failures described below, each fixed in a follow-up commit.

GitHub still reports mergeable_state: unstable. That is the non-required Native fingerprint diff check, which GitHub cancelled after a 24-hour queue — a pre-existing fork issue this PR surfaced but did not cause; see Worth a maintainer decision below.

Fork-boundary breaks that merged cleanly — no conflict, silent regressions

These are the dangerous ones. Every item below produced zero conflict markers and would have shipped broken.

BreakFix
Upstream's new macOS launch agent (pingdotgg#6286) exports T3CODE_HOME into the plist. resolveLauncherBaseDir reads MARCODE_HOME and throws without it — the background service would never start on macOS.Renamed to MARCODE_HOME; pinned with a test asserting the plist names it and never T3CODE_HOME.
The launch-agent label was com.t3tools.t3code.service, so an upstream T3 Code install writes the same ~/Library/LaunchAgents/…plist path and the two overwrite each other.Derived from BOOT_SERVICE_NAMEcom.t3tools.marcode.service, matching the reason Marcode already renamed the systemd unit. Pinned with a test.
Upstream's new uninstall assertion hardcoded systemctl --user disable --now t3code.service.Now reads BOOT_SERVICE_UNIT_FILE so it can't drift from Marcode's unit name again.
The new t3 triage command (pingdotgg#6563) resolves its base dir from T3CODE_HOME, while its own comment claims parity with t3 pair — which reads MARCODE_HOME.Switched to MARCODE_HOME.
Upstream moved CI to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A blacksmith-* label matches no runner on this fork, so those jobs queue forever rather than failing.All CI jobs back on GitHub-hosted runners. Marcode's existing runner-pinning test caught this — it now also rejects any blacksmith label outright.
Second-order consequence of that runner change, and the one CI caught: upstream also moved the server suite into a new sharded test_server job (pingdotgg#7286), and Marcode's ripgrep install — needed only because of the runner conversion — stayed on the old test job. WorkspaceFileSystem search tests failed with spawn rg ENOENT. Upstream never hits this; their Blacksmith images ship ripgrep.Install step added to test_server. The parity test now derives the job list from whatever actually runs a test suite, so the next split or rename fails there instead of in CI.
Background-draft promotion (pingdotgg#7821) landed its usage of handleNewThread but not its declaration, which fell in a region Marcode had diverged.Restored useNewThreadHandler(); apps/web typechecks.
The new platform docs section named upstream's unit paths.Corrected to marcode.service / com.t3tools.marcode.service.plist.

Conflict decisions

Kept Marcode, ported the upstream fix inside the hunk

Took upstream's refactor, re-applied Marcode's behavior on top

  • WorkspacePageHeader — adopted upstream's shared header primitive on settings and usage, and added one sidebarless prop for SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's collapsed-sidebar selector never matches and the header would slide back under the native window controls.
  • UsagePage — took the redesign (feat(web): redesign usage insights pingdotgg/t3code#7147), re-applied Marcode's styled Tooltip on both refresh controls.
  • _chat.pull-requests / PullRequestListFilters — took upstream's shared PullRequestRefreshControl and Button-based filter trigger, moved Marcode's Tooltip onto them instead of keeping a third refresh button in the header.
  • RightPanelTabs — took tab mute (feat(desktop): mute a browser tab pingdotgg/t3code#7252) and surface-dropdown shortcuts (feat(web): add shortcuts to the surface dropdown pingdotgg/t3code#7318), minus copy-path and the Files entry, which address the retired right-panel file surface. Marcode's add-surface menu now renders from upstream's shared action list rather than duplicating it.
  • ChatComposer / ComposerPendingApprovalPanel — took upstream's composer state drawers (feat(web): attach composer state drawers pingdotgg/t3code#7150); Marcode's in-surface approval banner depended on a container upstream removed. The glass treatment lives on chat-composer-glass-shell in ChatView and is unaffected.

Where Marcode's implementation was superseded

  • threadSettled — retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in favour of upstream's event-ordering rule (fix(threads): a merged PR settles its thread only once pingdotgg/t3code#7454). Both fix the same bug (a merged PR burying a warm follow-up), but upstream's also covers the inherited-PR case — a thread opened on a branch whose PR already merged must never settle — which the time window would have regressed. Marcode's warm-window tests are replaced with tests for the combined rule, and the retirement is documented where the constant lived.

Other

  • Migrations — upstream's 041_AuthSessionClientConnection renumbered to 042. Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one id higher; renumbering an applied id would re-run or skip it on real installs.
  • .plans/** — took upstream's removal (chore: move implementation plans out of repository pingdotgg/t3code#7665). Marcode's only change there was a path rebrand inside a file the repo policy already says not to commit, and .plans/ is gitignored.
  • AGENTS.md — kept Marcode's structure and its own Verifying / Pull-requests sections; adopted upstream's new "Plans and work artifacts" policy and folded its PR-assets rule into Marcode's list.
  • cli/service.ts, cli/connect.ts — took upstream's macOS/launchd copy paths, kept Marcode's product name.
  • index.css, __root.tsx, Sidebar.logic.ts — additive on both sides; kept both.

Coupled changes:pnpm-workspace.yaml moved only Clerk versions, not the effect catalog, so no .repos/ subtree sync is required. infra/relay/package.json is unchanged.

Two fork pins this sync relocated

Both guard Marcode divergences the merge moved rather than removed, so both failed CI on content that is actually correct. Rewritten to assert the invariant where it now lives:

  • Migrations.test.ts pinned a fixed 9-entry tail, so adding migration 42 slid Marcode's own migration 33 out of the window — the diff read as "33 disappeared" rather than "42 is new". Now anchors on 33 by lookup.
  • workspaceTitlebar.fork.test.ts scanned settings/usage for a drag-region line beside SIDEBARLESS_TITLEBAR_INSET_CLASS; adopting WorkspacePageHeader moved both out of the call sites. The guarantee still has two independently regressible halves, each now asserted where it lives.

Why

The daily sync had stalled behind three unmerged drafts, so the fork was 92 commits behind and drifting. Merging the full range in one reviewed pass is cheaper than resolving three overlapping stacks, and it re-establishes a single merge base for the next run.

Every fix above is either an upstream correctness/security/operational change Marcode needs, or a Marcode product contract that upstream's rewrite would have quietly removed. Hotspot paths were treated as mandatory-review, not as automatic keep-Marcode.

UI Changes

Not captured — this ran headless with no browser or display available. This is the main reason the PR is still draft. The following surfaces changed and want a look:

  • Settings and Usage top bars, in Electron on macOS specifically — that's where the sidebarless inset matters (the header must clear the traffic lights).
  • The composer's new top drawer against Marcode's glass shell (approval, user-input, and plan-follow-up states).
  • Chat header, right-panel tabs (mute indicator, add-surface shortcuts), and the terminal drawer's close confirmation.
  • 390px and 820px viewports, per the sync runbook's UI-hotspot rule.

Checklist

  • This PR is small and focused — no. It is a 92-commit upstream sync; that scope is inherent to the task.
  • I explained what changed and why
  • I included before/after screenshots for any UI changes — not possible in this environment; see UI Changes above.
  • I included a video for animation/interaction changes — same.

Verification

CI green on 480c621a:Check, Test, Mobile Native Static Analysis, Release Smoke, Rust, Test Server 1/2/3, Mobile Native Changes. Thread-transfer bot reports the merge stays within every enforced ceiling (+6.7% total wire against a 15.1 KiB cap).

Locally:apps/web fully green (289 files, 2961 tests); typecheck clean for web, server, contracts, shared, client-runtime, mobile, desktop; fmt --check and lint clean on the changed scope.

Each rewritten pin was verified to still fail on the regression it guards — the ripgrep step removed from test_server, the header primitive reverted to the collapsed-only inset, and a route dropping the sidebarless prop — and to pass when restored.

Known-noisy locally, green in CI

The sync container is resource-constrained and shares its port space, which produced local-only failures that CI does not reproduce. Treat CI as authoritative for these:

  • packages/shared/src/Net.test.tsfindAvailablePort returns preferred when it is free. Both Net.ts and Net.test.ts are byte-identical to pre-merge main, and the test passes in CI.
  • A GrokAdapter drain-window test hit its 120s timeout locally under a concurrently running suite. All three CI server shards pass.

Not verified here

  • No live client verification (no browser or simulator available) — see UI Changes.

Worth a maintainer decision

  • Native fingerprint diff can never run on this fork, and this PR is the first to show it..github/workflows/mobile-fingerprint-check.yml still targets blacksmith-8vcpu-ubuntu-2404. That label matches no runner here, so the job queued from 16:02 on 22 Aug until GitHub cancelled it at the 24-hour timeout — which is what leaves this PR unstable. It is untouched by this merge and was already Blacksmith-bound on 5bcc188a; it only surfaced now because the workflow is paths-gated to mobile native files and this diff touches them. It is not a required check, so it does not block merging.

    Deliberately not fixed here — it is unrelated to the sync and this PR is already XXL. The patch is one line, and the same one applied to ci.yml:

    # .github/workflows/mobile-fingerprint-check.yml- runs-on: blacksmith-8vcpu-ubuntu-2404+ runs-on: ubuntu-24.04

    The same latent problem exists in release.yml, publish-aur.yml, web-preview.yml, mobile-eas-preview.yml, mobile-eas-production.yml, and mobile-showcase-screenshots.yml. Worth one small follow-up PR sweeping all of them, plus a parity test covering every workflow rather than just ci.yml.

  • t3 triage's playbook still points at pingdotgg/t3code — a Marcode user running it would be told to file issues upstream. Left as-is: that's a product decision, not a merge decision.

  • docs/internals/scripts.md still documents T3CODE_HOME and .t3/userdata. Pre-existing drift, not caused by this merge; left alone to keep the diff focused.

  • Mobile Native Static Analysis is now conditionally skipped (upstream ci: only boot the macOS native lint runner when native sources change pingdotgg/t3code#7283 gates it on native source changes) and is a required check. It ran on this PR because the diff touches native sources, so the skip path is unverified — worth confirming branch protection treats a skipped required check as passing.

aorightand others added 30 commits August 18, 2026 13:38
…in GitHubPullRequestCli (pingdotgg#7385)
Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…t full speed (pingdotgg#7460)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…nt (pingdotgg#6563)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…tgg#6286)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GPT-5.6 <noreply@openai.com>
t3dotggand others added 22 commits August 20, 2026 22:12
…pingdotgg#7283)
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…otgg#7809)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…gdotgg#7794)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…tgg#6633)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Brings 92 upstream commits (82b8a93..2c4158f) into Marcode. 25 paths
conflicted; each was resolved by combining upstream's intent with Marcode's,
never by taking a whole file from one side.
Fork-boundary breaks that merged cleanly (no conflict, silent regressions):
- bootService: upstream's new macOS launch agent (pingdotgg#6286) exported T3CODE_HOME
into the plist. The Marcode launcher reads MARCODE_HOME and exits without it,
so the background service would never have started. Renamed, and pinned with
a test asserting the plist names MARCODE_HOME and never T3CODE_HOME.
- bootService: the launch-agent label is now derived from BOOT_SERVICE_NAME
(com.t3tools.marcode.service), matching the reason Marcode already renamed the
systemd unit -- an upstream install writes com.t3tools.t3code.service.plist to
the same path and the two must not overwrite each other. Pinned with a test.
- bootService test: upstream's new uninstall assertion hardcoded
"systemctl --user disable --now t3code.service"; it now reads
BOOT_SERVICE_UNIT_FILE so it cannot drift from Marcode's unit name again.
- cli/triage: upstream's new `t3 triage` command (pingdotgg#6563) resolves its base dir
from T3CODE_HOME while its own comment claims parity with `t3 pair`, which
reads MARCODE_HOME. Switched to MARCODE_HOME.
- ci.yml: upstream moved every job to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A
blacksmith-* label matches no runner on this fork, so those jobs would queue
forever rather than fail. All CI jobs are back on GitHub-hosted runners, and
the existing runner-pinning test now also rejects any blacksmith label.
- ChatView: upstream's background-draft promotion (pingdotgg#7821) landed without its
`const handleNewThread = useNewThreadHandler()` declaration, which fell in a
region Marcode had diverged. Restored; the file now typechecks.
- docs/user/background-service.md: the new platform section named upstream's
unit paths; corrected to marcode.service and com.t3tools.marcode.service.plist.
Conflict decisions:
- .plans/**: took upstream's removal (pingdotgg#7665). Marcode's only change there was a
path rebrand inside a file the repo policy already says not to commit, and
.plans/ is gitignored.
- apps/web/src/components/files/{FileBrowserPanel,FilePreviewPanel}.tsx: kept
Marcode's deletion. Upstream's change (pingdotgg#7490) is a refresh affordance confined
to the retired right-panel file surfaces and has no floating-editor analogue.
The removal stays pinned by rightPanelStore.test.ts.
- Migrations: upstream's 041_AuthSessionClientConnection renumbered to 042.
Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one
id higher; renumbering an applied id would re-run or skip it on real installs.
- cli/service.ts, cli/connect.ts: took upstream's macOS/launchd copy paths, kept
Marcode's product name.
- SidebarChrome: kept Marcode's footer. Upstream's SidebarUtilityMenu adds
Settings, Usage, Pull Requests, and Back to a footer Marcode emptied because
FloatingPillNav owns those; SidebarChrome.fork.test.tsx already pins this.
- SettingsSidebarNav: same call, same reason -- upstream swapped the single Back
row for SidebarUtilityMenu. Kept Marcode's Back row and added a test so the
swap fails loudly instead of merging silently next time.
- WorkspacePageHeader: adopted upstream's shared header primitive on settings
and usage, and added a `sidebarless` prop for Marcode's
SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's
collapsed-sidebar selector never matches and the header would slide back under
the native window controls.
- UsagePage: took upstream's redesign (pingdotgg#7147) and re-applied Marcode's styled
Tooltip on both refresh controls.
- _chat.pull-requests / PullRequestListFilters: took upstream's shared
PullRequestRefreshControl and Button-based filter trigger, and moved Marcode's
Tooltip onto them rather than keeping a third refresh button in the header.
- threadSettled: retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in
favour of upstream's event-ordering rule (pingdotgg#7454). Both fix the same bug -- a
merged PR burying a warm follow-up -- but upstream's also covers the inherited
PR case (a thread opened on a branch whose PR already merged must never
settle), which the time window would have regressed. Marcode's warm-window
tests are replaced with tests for the combined rule, and the retirement is
documented where the constant used to live.
- ChatComposer / ComposerPendingApprovalPanel: took upstream's composer state
drawers (pingdotgg#7150). Marcode's in-surface approval banner depended on a container
upstream removed; the glass treatment lives on chat-composer-glass-shell in
ChatView and is unaffected.
- ChatView: kept Marcode's ChatHeader call and its ThreadActionsCluster portal
inside upstream's WorkspacePageHeader, and kept the single container-level
panelLayoutControls render so it is not drawn twice. Kept
chat-composer-glass-shell-transparent and took upstream's -attached modifier.
- ChatHeader: kept Marcode's title-only header. Upstream's inline rename and
title action menu (pingdotgg#7817, pingdotgg#7476) duplicate entry points Marcode already
provides from the sidebar row and pill nav.
- RightPanelTabs: took upstream's tab mute feature (pingdotgg#7252) and surface-dropdown
shortcuts (pingdotgg#7318), minus copy-path and the Files entry, which address the
right-panel file surface Marcode retired. Marcode's existing add-surface menu
now renders from upstream's shared action list rather than duplicating it.
- ThreadTerminalDrawer: kept Marcode's terminal chrome and its FitAddon padding,
took upstream's themed terminal background and routed every close through
upstream's close confirmation (pingdotgg#7592).
- Sidebar.tsx: kept Marcode's 12px empty-state type, took upstream's
cursor-pointer fix (pingdotgg#5545).
- MessagesTimeline: kept Marcode's text-sm, took upstream's -mx-1 removal.
- AGENTS.md: kept Marcode's structure and its own Verifying/Pull-requests
sections, adopted upstream's new "Plans and work artifacts" policy and folded
its PR-assets rule into Marcode's list.
- index.css, __root.tsx, Sidebar.logic.ts: additive on both sides; kept both.
Coupled changes: pnpm-workspace.yaml moved only Clerk versions, not the effect
catalog, so no .repos/ subtree sync is required. infra/relay/package.json is
unchanged.
Verified: focused tests for threadSettled, bootService, service, serviceLauncher,
migration 042, upstream-sync workflow, dev-runner, Sidebar.logic, contracts
settings, shared git, RightPanelTabs, SidebarChrome fork pins, threadSidebarWidth,
rightPanelStore, ThreadStatusIndicators, desktopUpdate, editor-surface. Typecheck
clean for web, server, contracts, shared, client-runtime, mobile, desktop.
Targeted fmt --check and lint clean on the changed scope.
Not verified here: tests that import @aliimam/icons fail to resolve in this
container because that package declares main: dist/index.cjs and ships
dist/index.js. Both the dependency and the importing files are untouched by this
merge.
@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Aug 22, 2026
@github-actions

github-actionsBot commented Aug 22, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB13.4 KiB+856 B (+6.6%)15.1 KiB
CodexThread snapshot wire6.3 KiB6.9 KiB+625 B (+9.7%)7.3 KiB
CodexLive turn WebSocket wire6.3 KiB6.5 KiB+231 B (+3.6%)7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB55.0 KiB+3.2 KiB (+6.1%)66.4 KiB
CodexLive turn messages16160 (0.0%)21
ClaudeTotal thread wire12.6 KiB13.4 KiB+878 B (+6.8%)15.1 KiB
ClaudeThread snapshot wire6.3 KiB6.9 KiB+631 B (+9.8%)7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB6.5 KiB+247 B (+3.8%)7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB55.8 KiB+3.2 KiB (+6.0%)66.4 KiB
ClaudeLive turn messages16160 (0.0%)21

Baseline: 5bcc188 · PR result: 480c621 · 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: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

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

`Test Server 3` failed with `spawn rg ENOENT` on three
WorkspaceFileSystem searchContent tests. WorkspaceFileSystem calls
execFile("rg", ...), a bare PATH lookup.
Upstream never installs ripgrep -- their Blacksmith images ship it.
GitHub-hosted ubuntu-24.04 does not, so Marcode carries an install step,
and this sync converted every CI job back to GitHub-hosted runners.
pingdotgg/t3code@d7b9a689 then moved the `t3` suite into a new sharded
`test_server` job, and the Marcode-only step did not follow it there.
The existing parity test only inspected `ci.jobs.test`, so the move was
invisible to it. It now derives the job list from whatever actually runs
a Test step and asserts the install for each, so a future split, rename,
or new test job fails there instead of in CI.
Verified: WorkspaceFileSystem.test.ts passes locally with rg present
(31 tests); the broadened parity test fails with `job "test_server" must
install ripgrep` when the step is removed and passes when restored.
Both tests guard Marcode divergences the merge relocated rather than
removed, so both failed on content that is actually correct.
Migrations.test.ts pinned a fixed 9-entry tail. Adding upstream's
AuthSessionClientConnection as 042 slid Marcode's own migration 33 out of
that window, so the diff read as "33 disappeared" rather than "42 is
new". It now anchors on 33 by lookup and asserts the sequence from there,
which keeps the pin's intent and reports the real change next time.
workspaceTitlebar.fork.test.ts scanned settings.tsx and UsagePage.tsx for
a `drag-region` line next to SIDEBARLESS_TITLEBAR_INSET_CLASS. Adopting
upstream's shared WorkspacePageHeader moved both out of the call sites,
so neither string remained. The guarantee still has two independently
regressible halves, and each is now asserted where it lives: the
primitive maps `sidebarless` to the unconditional inset and carries the
drag region, and both routes pass the prop.
Verified: each rewritten pin fails when its regression is reintroduced
(the primitive reverted to the collapsed-only inset, and a route dropping
the prop) and passes when restored. Full apps/web suite green
(289 files, 2961 tests).
@maarcoChatGPT Codex Connector

Copy link
Copy Markdown
OwnerAuthor

Superseded by PR #51, the newer upstream sync through f035a0f4, which has now merged to main. Closing this older draft to keep the sync queue clean.

@maarcomaarco closed this Aug 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXLvouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@maarco@aoright@gbarros-dev@Bil0000@Rishet11@StiensWout@AugusDogus@tarik02@gsimone@t3dotgg@chrisdeeming@inayayousfi@RakshithBhat03@dbalders@maria-rcks@UtkarshUsername@SunkenInTime@lgwacker@jakeleventhal@sethwebster
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore(upstream): sync marcode through 2c4158f8 - #47

Closed
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d
Closed

chore(upstream): sync marcode through 2c4158f8#47
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d

Conversation

@maarco

@maarcomaarco commented Aug 22, 2026

Copy link
Copy Markdown
Owner

What Changed

Merges pingdotgg/t3code@2c4158f8 into Marcode — 92 upstream commits since the last sync point (82b8a938), as one two-parent merge commit. 25 paths conflicted and were resolved by hand.

This supersedes the three older stacked sync drafts (#41 through f2d5fc91, #43 through beab6886, #45 through be7d35aa); their ranges are all contained in this one. Close them if this lands.

CI is green on 480c621a — all four required checks (Check, Test, Mobile Native Static Analysis, Release Smoke) plus Rust, Test Server 1/2/3. The red checks on the two earlier commits are the three failures described below, each fixed in a follow-up commit.

GitHub still reports mergeable_state: unstable. That is the non-required Native fingerprint diff check, which GitHub cancelled after a 24-hour queue — a pre-existing fork issue this PR surfaced but did not cause; see Worth a maintainer decision below.

Fork-boundary breaks that merged cleanly — no conflict, silent regressions

These are the dangerous ones. Every item below produced zero conflict markers and would have shipped broken.

BreakFix
Upstream's new macOS launch agent (pingdotgg#6286) exports T3CODE_HOME into the plist. resolveLauncherBaseDir reads MARCODE_HOME and throws without it — the background service would never start on macOS.Renamed to MARCODE_HOME; pinned with a test asserting the plist names it and never T3CODE_HOME.
The launch-agent label was com.t3tools.t3code.service, so an upstream T3 Code install writes the same ~/Library/LaunchAgents/…plist path and the two overwrite each other.Derived from BOOT_SERVICE_NAMEcom.t3tools.marcode.service, matching the reason Marcode already renamed the systemd unit. Pinned with a test.
Upstream's new uninstall assertion hardcoded systemctl --user disable --now t3code.service.Now reads BOOT_SERVICE_UNIT_FILE so it can't drift from Marcode's unit name again.
The new t3 triage command (pingdotgg#6563) resolves its base dir from T3CODE_HOME, while its own comment claims parity with t3 pair — which reads MARCODE_HOME.Switched to MARCODE_HOME.
Upstream moved CI to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A blacksmith-* label matches no runner on this fork, so those jobs queue forever rather than failing.All CI jobs back on GitHub-hosted runners. Marcode's existing runner-pinning test caught this — it now also rejects any blacksmith label outright.
Second-order consequence of that runner change, and the one CI caught: upstream also moved the server suite into a new sharded test_server job (pingdotgg#7286), and Marcode's ripgrep install — needed only because of the runner conversion — stayed on the old test job. WorkspaceFileSystem search tests failed with spawn rg ENOENT. Upstream never hits this; their Blacksmith images ship ripgrep.Install step added to test_server. The parity test now derives the job list from whatever actually runs a test suite, so the next split or rename fails there instead of in CI.
Background-draft promotion (pingdotgg#7821) landed its usage of handleNewThread but not its declaration, which fell in a region Marcode had diverged.Restored useNewThreadHandler(); apps/web typechecks.
The new platform docs section named upstream's unit paths.Corrected to marcode.service / com.t3tools.marcode.service.plist.

Conflict decisions

Kept Marcode, ported the upstream fix inside the hunk

Took upstream's refactor, re-applied Marcode's behavior on top

  • WorkspacePageHeader — adopted upstream's shared header primitive on settings and usage, and added one sidebarless prop for SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's collapsed-sidebar selector never matches and the header would slide back under the native window controls.
  • UsagePage — took the redesign (feat(web): redesign usage insights pingdotgg/t3code#7147), re-applied Marcode's styled Tooltip on both refresh controls.
  • _chat.pull-requests / PullRequestListFilters — took upstream's shared PullRequestRefreshControl and Button-based filter trigger, moved Marcode's Tooltip onto them instead of keeping a third refresh button in the header.
  • RightPanelTabs — took tab mute (feat(desktop): mute a browser tab pingdotgg/t3code#7252) and surface-dropdown shortcuts (feat(web): add shortcuts to the surface dropdown pingdotgg/t3code#7318), minus copy-path and the Files entry, which address the retired right-panel file surface. Marcode's add-surface menu now renders from upstream's shared action list rather than duplicating it.
  • ChatComposer / ComposerPendingApprovalPanel — took upstream's composer state drawers (feat(web): attach composer state drawers pingdotgg/t3code#7150); Marcode's in-surface approval banner depended on a container upstream removed. The glass treatment lives on chat-composer-glass-shell in ChatView and is unaffected.

Where Marcode's implementation was superseded

  • threadSettled — retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in favour of upstream's event-ordering rule (fix(threads): a merged PR settles its thread only once pingdotgg/t3code#7454). Both fix the same bug (a merged PR burying a warm follow-up), but upstream's also covers the inherited-PR case — a thread opened on a branch whose PR already merged must never settle — which the time window would have regressed. Marcode's warm-window tests are replaced with tests for the combined rule, and the retirement is documented where the constant lived.

Other

  • Migrations — upstream's 041_AuthSessionClientConnection renumbered to 042. Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one id higher; renumbering an applied id would re-run or skip it on real installs.
  • .plans/** — took upstream's removal (chore: move implementation plans out of repository pingdotgg/t3code#7665). Marcode's only change there was a path rebrand inside a file the repo policy already says not to commit, and .plans/ is gitignored.
  • AGENTS.md — kept Marcode's structure and its own Verifying / Pull-requests sections; adopted upstream's new "Plans and work artifacts" policy and folded its PR-assets rule into Marcode's list.
  • cli/service.ts, cli/connect.ts — took upstream's macOS/launchd copy paths, kept Marcode's product name.
  • index.css, __root.tsx, Sidebar.logic.ts — additive on both sides; kept both.

Coupled changes:pnpm-workspace.yaml moved only Clerk versions, not the effect catalog, so no .repos/ subtree sync is required. infra/relay/package.json is unchanged.

Two fork pins this sync relocated

Both guard Marcode divergences the merge moved rather than removed, so both failed CI on content that is actually correct. Rewritten to assert the invariant where it now lives:

  • Migrations.test.ts pinned a fixed 9-entry tail, so adding migration 42 slid Marcode's own migration 33 out of the window — the diff read as "33 disappeared" rather than "42 is new". Now anchors on 33 by lookup.
  • workspaceTitlebar.fork.test.ts scanned settings/usage for a drag-region line beside SIDEBARLESS_TITLEBAR_INSET_CLASS; adopting WorkspacePageHeader moved both out of the call sites. The guarantee still has two independently regressible halves, each now asserted where it lives.

Why

The daily sync had stalled behind three unmerged drafts, so the fork was 92 commits behind and drifting. Merging the full range in one reviewed pass is cheaper than resolving three overlapping stacks, and it re-establishes a single merge base for the next run.

Every fix above is either an upstream correctness/security/operational change Marcode needs, or a Marcode product contract that upstream's rewrite would have quietly removed. Hotspot paths were treated as mandatory-review, not as automatic keep-Marcode.

UI Changes

Not captured — this ran headless with no browser or display available. This is the main reason the PR is still draft. The following surfaces changed and want a look:

  • Settings and Usage top bars, in Electron on macOS specifically — that's where the sidebarless inset matters (the header must clear the traffic lights).
  • The composer's new top drawer against Marcode's glass shell (approval, user-input, and plan-follow-up states).
  • Chat header, right-panel tabs (mute indicator, add-surface shortcuts), and the terminal drawer's close confirmation.
  • 390px and 820px viewports, per the sync runbook's UI-hotspot rule.

Checklist

  • This PR is small and focused — no. It is a 92-commit upstream sync; that scope is inherent to the task.
  • I explained what changed and why
  • I included before/after screenshots for any UI changes — not possible in this environment; see UI Changes above.
  • I included a video for animation/interaction changes — same.

Verification

CI green on 480c621a:Check, Test, Mobile Native Static Analysis, Release Smoke, Rust, Test Server 1/2/3, Mobile Native Changes. Thread-transfer bot reports the merge stays within every enforced ceiling (+6.7% total wire against a 15.1 KiB cap).

Locally:apps/web fully green (289 files, 2961 tests); typecheck clean for web, server, contracts, shared, client-runtime, mobile, desktop; fmt --check and lint clean on the changed scope.

Each rewritten pin was verified to still fail on the regression it guards — the ripgrep step removed from test_server, the header primitive reverted to the collapsed-only inset, and a route dropping the sidebarless prop — and to pass when restored.

Known-noisy locally, green in CI

The sync container is resource-constrained and shares its port space, which produced local-only failures that CI does not reproduce. Treat CI as authoritative for these:

  • packages/shared/src/Net.test.tsfindAvailablePort returns preferred when it is free. Both Net.ts and Net.test.ts are byte-identical to pre-merge main, and the test passes in CI.
  • A GrokAdapter drain-window test hit its 120s timeout locally under a concurrently running suite. All three CI server shards pass.

Not verified here

  • No live client verification (no browser or simulator available) — see UI Changes.

Worth a maintainer decision

  • Native fingerprint diff can never run on this fork, and this PR is the first to show it..github/workflows/mobile-fingerprint-check.yml still targets blacksmith-8vcpu-ubuntu-2404. That label matches no runner here, so the job queued from 16:02 on 22 Aug until GitHub cancelled it at the 24-hour timeout — which is what leaves this PR unstable. It is untouched by this merge and was already Blacksmith-bound on 5bcc188a; it only surfaced now because the workflow is paths-gated to mobile native files and this diff touches them. It is not a required check, so it does not block merging.

    Deliberately not fixed here — it is unrelated to the sync and this PR is already XXL. The patch is one line, and the same one applied to ci.yml:

    # .github/workflows/mobile-fingerprint-check.yml- runs-on: blacksmith-8vcpu-ubuntu-2404+ runs-on: ubuntu-24.04

    The same latent problem exists in release.yml, publish-aur.yml, web-preview.yml, mobile-eas-preview.yml, mobile-eas-production.yml, and mobile-showcase-screenshots.yml. Worth one small follow-up PR sweeping all of them, plus a parity test covering every workflow rather than just ci.yml.

  • t3 triage's playbook still points at pingdotgg/t3code — a Marcode user running it would be told to file issues upstream. Left as-is: that's a product decision, not a merge decision.

  • docs/internals/scripts.md still documents T3CODE_HOME and .t3/userdata. Pre-existing drift, not caused by this merge; left alone to keep the diff focused.

  • Mobile Native Static Analysis is now conditionally skipped (upstream ci: only boot the macOS native lint runner when native sources change pingdotgg/t3code#7283 gates it on native source changes) and is a required check. It ran on this PR because the diff touches native sources, so the skip path is unverified — worth confirming branch protection treats a skipped required check as passing.

aorightand others added 30 commits August 18, 2026 13:38
…in GitHubPullRequestCli (pingdotgg#7385)
Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…t full speed (pingdotgg#7460)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…nt (pingdotgg#6563)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…tgg#6286)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GPT-5.6 <noreply@openai.com>
t3dotggand others added 22 commits August 20, 2026 22:12
…pingdotgg#7283)
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…otgg#7809)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…gdotgg#7794)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…tgg#6633)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Brings 92 upstream commits (82b8a93..2c4158f) into Marcode. 25 paths
conflicted; each was resolved by combining upstream's intent with Marcode's,
never by taking a whole file from one side.
Fork-boundary breaks that merged cleanly (no conflict, silent regressions):
- bootService: upstream's new macOS launch agent (pingdotgg#6286) exported T3CODE_HOME
into the plist. The Marcode launcher reads MARCODE_HOME and exits without it,
so the background service would never have started. Renamed, and pinned with
a test asserting the plist names MARCODE_HOME and never T3CODE_HOME.
- bootService: the launch-agent label is now derived from BOOT_SERVICE_NAME
(com.t3tools.marcode.service), matching the reason Marcode already renamed the
systemd unit -- an upstream install writes com.t3tools.t3code.service.plist to
the same path and the two must not overwrite each other. Pinned with a test.
- bootService test: upstream's new uninstall assertion hardcoded
"systemctl --user disable --now t3code.service"; it now reads
BOOT_SERVICE_UNIT_FILE so it cannot drift from Marcode's unit name again.
- cli/triage: upstream's new `t3 triage` command (pingdotgg#6563) resolves its base dir
from T3CODE_HOME while its own comment claims parity with `t3 pair`, which
reads MARCODE_HOME. Switched to MARCODE_HOME.
- ci.yml: upstream moved every job to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A
blacksmith-* label matches no runner on this fork, so those jobs would queue
forever rather than fail. All CI jobs are back on GitHub-hosted runners, and
the existing runner-pinning test now also rejects any blacksmith label.
- ChatView: upstream's background-draft promotion (pingdotgg#7821) landed without its
`const handleNewThread = useNewThreadHandler()` declaration, which fell in a
region Marcode had diverged. Restored; the file now typechecks.
- docs/user/background-service.md: the new platform section named upstream's
unit paths; corrected to marcode.service and com.t3tools.marcode.service.plist.
Conflict decisions:
- .plans/**: took upstream's removal (pingdotgg#7665). Marcode's only change there was a
path rebrand inside a file the repo policy already says not to commit, and
.plans/ is gitignored.
- apps/web/src/components/files/{FileBrowserPanel,FilePreviewPanel}.tsx: kept
Marcode's deletion. Upstream's change (pingdotgg#7490) is a refresh affordance confined
to the retired right-panel file surfaces and has no floating-editor analogue.
The removal stays pinned by rightPanelStore.test.ts.
- Migrations: upstream's 041_AuthSessionClientConnection renumbered to 042.
Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one
id higher; renumbering an applied id would re-run or skip it on real installs.
- cli/service.ts, cli/connect.ts: took upstream's macOS/launchd copy paths, kept
Marcode's product name.
- SidebarChrome: kept Marcode's footer. Upstream's SidebarUtilityMenu adds
Settings, Usage, Pull Requests, and Back to a footer Marcode emptied because
FloatingPillNav owns those; SidebarChrome.fork.test.tsx already pins this.
- SettingsSidebarNav: same call, same reason -- upstream swapped the single Back
row for SidebarUtilityMenu. Kept Marcode's Back row and added a test so the
swap fails loudly instead of merging silently next time.
- WorkspacePageHeader: adopted upstream's shared header primitive on settings
and usage, and added a `sidebarless` prop for Marcode's
SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's
collapsed-sidebar selector never matches and the header would slide back under
the native window controls.
- UsagePage: took upstream's redesign (pingdotgg#7147) and re-applied Marcode's styled
Tooltip on both refresh controls.
- _chat.pull-requests / PullRequestListFilters: took upstream's shared
PullRequestRefreshControl and Button-based filter trigger, and moved Marcode's
Tooltip onto them rather than keeping a third refresh button in the header.
- threadSettled: retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in
favour of upstream's event-ordering rule (pingdotgg#7454). Both fix the same bug -- a
merged PR burying a warm follow-up -- but upstream's also covers the inherited
PR case (a thread opened on a branch whose PR already merged must never
settle), which the time window would have regressed. Marcode's warm-window
tests are replaced with tests for the combined rule, and the retirement is
documented where the constant used to live.
- ChatComposer / ComposerPendingApprovalPanel: took upstream's composer state
drawers (pingdotgg#7150). Marcode's in-surface approval banner depended on a container
upstream removed; the glass treatment lives on chat-composer-glass-shell in
ChatView and is unaffected.
- ChatView: kept Marcode's ChatHeader call and its ThreadActionsCluster portal
inside upstream's WorkspacePageHeader, and kept the single container-level
panelLayoutControls render so it is not drawn twice. Kept
chat-composer-glass-shell-transparent and took upstream's -attached modifier.
- ChatHeader: kept Marcode's title-only header. Upstream's inline rename and
title action menu (pingdotgg#7817, pingdotgg#7476) duplicate entry points Marcode already
provides from the sidebar row and pill nav.
- RightPanelTabs: took upstream's tab mute feature (pingdotgg#7252) and surface-dropdown
shortcuts (pingdotgg#7318), minus copy-path and the Files entry, which address the
right-panel file surface Marcode retired. Marcode's existing add-surface menu
now renders from upstream's shared action list rather than duplicating it.
- ThreadTerminalDrawer: kept Marcode's terminal chrome and its FitAddon padding,
took upstream's themed terminal background and routed every close through
upstream's close confirmation (pingdotgg#7592).
- Sidebar.tsx: kept Marcode's 12px empty-state type, took upstream's
cursor-pointer fix (pingdotgg#5545).
- MessagesTimeline: kept Marcode's text-sm, took upstream's -mx-1 removal.
- AGENTS.md: kept Marcode's structure and its own Verifying/Pull-requests
sections, adopted upstream's new "Plans and work artifacts" policy and folded
its PR-assets rule into Marcode's list.
- index.css, __root.tsx, Sidebar.logic.ts: additive on both sides; kept both.
Coupled changes: pnpm-workspace.yaml moved only Clerk versions, not the effect
catalog, so no .repos/ subtree sync is required. infra/relay/package.json is
unchanged.
Verified: focused tests for threadSettled, bootService, service, serviceLauncher,
migration 042, upstream-sync workflow, dev-runner, Sidebar.logic, contracts
settings, shared git, RightPanelTabs, SidebarChrome fork pins, threadSidebarWidth,
rightPanelStore, ThreadStatusIndicators, desktopUpdate, editor-surface. Typecheck
clean for web, server, contracts, shared, client-runtime, mobile, desktop.
Targeted fmt --check and lint clean on the changed scope.
Not verified here: tests that import @aliimam/icons fail to resolve in this
container because that package declares main: dist/index.cjs and ships
dist/index.js. Both the dependency and the importing files are untouched by this
merge.
@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Aug 22, 2026
@github-actions

github-actionsBot commented Aug 22, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB13.4 KiB+856 B (+6.6%)15.1 KiB
CodexThread snapshot wire6.3 KiB6.9 KiB+625 B (+9.7%)7.3 KiB
CodexLive turn WebSocket wire6.3 KiB6.5 KiB+231 B (+3.6%)7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB55.0 KiB+3.2 KiB (+6.1%)66.4 KiB
CodexLive turn messages16160 (0.0%)21
ClaudeTotal thread wire12.6 KiB13.4 KiB+878 B (+6.8%)15.1 KiB
ClaudeThread snapshot wire6.3 KiB6.9 KiB+631 B (+9.8%)7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB6.5 KiB+247 B (+3.8%)7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB55.8 KiB+3.2 KiB (+6.0%)66.4 KiB
ClaudeLive turn messages16160 (0.0%)21

Baseline: 5bcc188 · PR result: 480c621 · 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: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

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

`Test Server 3` failed with `spawn rg ENOENT` on three
WorkspaceFileSystem searchContent tests. WorkspaceFileSystem calls
execFile("rg", ...), a bare PATH lookup.
Upstream never installs ripgrep -- their Blacksmith images ship it.
GitHub-hosted ubuntu-24.04 does not, so Marcode carries an install step,
and this sync converted every CI job back to GitHub-hosted runners.
pingdotgg/t3code@d7b9a689 then moved the `t3` suite into a new sharded
`test_server` job, and the Marcode-only step did not follow it there.
The existing parity test only inspected `ci.jobs.test`, so the move was
invisible to it. It now derives the job list from whatever actually runs
a Test step and asserts the install for each, so a future split, rename,
or new test job fails there instead of in CI.
Verified: WorkspaceFileSystem.test.ts passes locally with rg present
(31 tests); the broadened parity test fails with `job "test_server" must
install ripgrep` when the step is removed and passes when restored.
Both tests guard Marcode divergences the merge relocated rather than
removed, so both failed on content that is actually correct.
Migrations.test.ts pinned a fixed 9-entry tail. Adding upstream's
AuthSessionClientConnection as 042 slid Marcode's own migration 33 out of
that window, so the diff read as "33 disappeared" rather than "42 is
new". It now anchors on 33 by lookup and asserts the sequence from there,
which keeps the pin's intent and reports the real change next time.
workspaceTitlebar.fork.test.ts scanned settings.tsx and UsagePage.tsx for
a `drag-region` line next to SIDEBARLESS_TITLEBAR_INSET_CLASS. Adopting
upstream's shared WorkspacePageHeader moved both out of the call sites,
so neither string remained. The guarantee still has two independently
regressible halves, and each is now asserted where it lives: the
primitive maps `sidebarless` to the unconditional inset and carries the
drag region, and both routes pass the prop.
Verified: each rewritten pin fails when its regression is reintroduced
(the primitive reverted to the collapsed-only inset, and a route dropping
the prop) and passes when restored. Full apps/web suite green
(289 files, 2961 tests).
@maarcoChatGPT Codex Connector

Copy link
Copy Markdown
OwnerAuthor

Superseded by PR #51, the newer upstream sync through f035a0f4, which has now merged to main. Closing this older draft to keep the sync queue clean.

@maarcomaarco closed this Aug 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXLvouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@maarco@aoright@gbarros-dev@Bil0000@Rishet11@StiensWout@AugusDogus@tarik02@gsimone@t3dotgg@chrisdeeming@inayayousfi@RakshithBhat03@dbalders@maria-rcks@UtkarshUsername@SunkenInTime@lgwacker@jakeleventhal@sethwebster
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore(upstream): sync marcode through 2c4158f8 - #47

Closed
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d
Closed

chore(upstream): sync marcode through 2c4158f8#47
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d

Conversation

@maarco

@maarcomaarco commented Aug 22, 2026

Copy link
Copy Markdown
Owner

What Changed

Merges pingdotgg/t3code@2c4158f8 into Marcode — 92 upstream commits since the last sync point (82b8a938), as one two-parent merge commit. 25 paths conflicted and were resolved by hand.

This supersedes the three older stacked sync drafts (#41 through f2d5fc91, #43 through beab6886, #45 through be7d35aa); their ranges are all contained in this one. Close them if this lands.

CI is green on 480c621a — all four required checks (Check, Test, Mobile Native Static Analysis, Release Smoke) plus Rust, Test Server 1/2/3. The red checks on the two earlier commits are the three failures described below, each fixed in a follow-up commit.

GitHub still reports mergeable_state: unstable. That is the non-required Native fingerprint diff check, which GitHub cancelled after a 24-hour queue — a pre-existing fork issue this PR surfaced but did not cause; see Worth a maintainer decision below.

Fork-boundary breaks that merged cleanly — no conflict, silent regressions

These are the dangerous ones. Every item below produced zero conflict markers and would have shipped broken.

BreakFix
Upstream's new macOS launch agent (pingdotgg#6286) exports T3CODE_HOME into the plist. resolveLauncherBaseDir reads MARCODE_HOME and throws without it — the background service would never start on macOS.Renamed to MARCODE_HOME; pinned with a test asserting the plist names it and never T3CODE_HOME.
The launch-agent label was com.t3tools.t3code.service, so an upstream T3 Code install writes the same ~/Library/LaunchAgents/…plist path and the two overwrite each other.Derived from BOOT_SERVICE_NAMEcom.t3tools.marcode.service, matching the reason Marcode already renamed the systemd unit. Pinned with a test.
Upstream's new uninstall assertion hardcoded systemctl --user disable --now t3code.service.Now reads BOOT_SERVICE_UNIT_FILE so it can't drift from Marcode's unit name again.
The new t3 triage command (pingdotgg#6563) resolves its base dir from T3CODE_HOME, while its own comment claims parity with t3 pair — which reads MARCODE_HOME.Switched to MARCODE_HOME.
Upstream moved CI to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A blacksmith-* label matches no runner on this fork, so those jobs queue forever rather than failing.All CI jobs back on GitHub-hosted runners. Marcode's existing runner-pinning test caught this — it now also rejects any blacksmith label outright.
Second-order consequence of that runner change, and the one CI caught: upstream also moved the server suite into a new sharded test_server job (pingdotgg#7286), and Marcode's ripgrep install — needed only because of the runner conversion — stayed on the old test job. WorkspaceFileSystem search tests failed with spawn rg ENOENT. Upstream never hits this; their Blacksmith images ship ripgrep.Install step added to test_server. The parity test now derives the job list from whatever actually runs a test suite, so the next split or rename fails there instead of in CI.
Background-draft promotion (pingdotgg#7821) landed its usage of handleNewThread but not its declaration, which fell in a region Marcode had diverged.Restored useNewThreadHandler(); apps/web typechecks.
The new platform docs section named upstream's unit paths.Corrected to marcode.service / com.t3tools.marcode.service.plist.

Conflict decisions

Kept Marcode, ported the upstream fix inside the hunk

Took upstream's refactor, re-applied Marcode's behavior on top

  • WorkspacePageHeader — adopted upstream's shared header primitive on settings and usage, and added one sidebarless prop for SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's collapsed-sidebar selector never matches and the header would slide back under the native window controls.
  • UsagePage — took the redesign (feat(web): redesign usage insights pingdotgg/t3code#7147), re-applied Marcode's styled Tooltip on both refresh controls.
  • _chat.pull-requests / PullRequestListFilters — took upstream's shared PullRequestRefreshControl and Button-based filter trigger, moved Marcode's Tooltip onto them instead of keeping a third refresh button in the header.
  • RightPanelTabs — took tab mute (feat(desktop): mute a browser tab pingdotgg/t3code#7252) and surface-dropdown shortcuts (feat(web): add shortcuts to the surface dropdown pingdotgg/t3code#7318), minus copy-path and the Files entry, which address the retired right-panel file surface. Marcode's add-surface menu now renders from upstream's shared action list rather than duplicating it.
  • ChatComposer / ComposerPendingApprovalPanel — took upstream's composer state drawers (feat(web): attach composer state drawers pingdotgg/t3code#7150); Marcode's in-surface approval banner depended on a container upstream removed. The glass treatment lives on chat-composer-glass-shell in ChatView and is unaffected.

Where Marcode's implementation was superseded

  • threadSettled — retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in favour of upstream's event-ordering rule (fix(threads): a merged PR settles its thread only once pingdotgg/t3code#7454). Both fix the same bug (a merged PR burying a warm follow-up), but upstream's also covers the inherited-PR case — a thread opened on a branch whose PR already merged must never settle — which the time window would have regressed. Marcode's warm-window tests are replaced with tests for the combined rule, and the retirement is documented where the constant lived.

Other

  • Migrations — upstream's 041_AuthSessionClientConnection renumbered to 042. Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one id higher; renumbering an applied id would re-run or skip it on real installs.
  • .plans/** — took upstream's removal (chore: move implementation plans out of repository pingdotgg/t3code#7665). Marcode's only change there was a path rebrand inside a file the repo policy already says not to commit, and .plans/ is gitignored.
  • AGENTS.md — kept Marcode's structure and its own Verifying / Pull-requests sections; adopted upstream's new "Plans and work artifacts" policy and folded its PR-assets rule into Marcode's list.
  • cli/service.ts, cli/connect.ts — took upstream's macOS/launchd copy paths, kept Marcode's product name.
  • index.css, __root.tsx, Sidebar.logic.ts — additive on both sides; kept both.

Coupled changes:pnpm-workspace.yaml moved only Clerk versions, not the effect catalog, so no .repos/ subtree sync is required. infra/relay/package.json is unchanged.

Two fork pins this sync relocated

Both guard Marcode divergences the merge moved rather than removed, so both failed CI on content that is actually correct. Rewritten to assert the invariant where it now lives:

  • Migrations.test.ts pinned a fixed 9-entry tail, so adding migration 42 slid Marcode's own migration 33 out of the window — the diff read as "33 disappeared" rather than "42 is new". Now anchors on 33 by lookup.
  • workspaceTitlebar.fork.test.ts scanned settings/usage for a drag-region line beside SIDEBARLESS_TITLEBAR_INSET_CLASS; adopting WorkspacePageHeader moved both out of the call sites. The guarantee still has two independently regressible halves, each now asserted where it lives.

Why

The daily sync had stalled behind three unmerged drafts, so the fork was 92 commits behind and drifting. Merging the full range in one reviewed pass is cheaper than resolving three overlapping stacks, and it re-establishes a single merge base for the next run.

Every fix above is either an upstream correctness/security/operational change Marcode needs, or a Marcode product contract that upstream's rewrite would have quietly removed. Hotspot paths were treated as mandatory-review, not as automatic keep-Marcode.

UI Changes

Not captured — this ran headless with no browser or display available. This is the main reason the PR is still draft. The following surfaces changed and want a look:

  • Settings and Usage top bars, in Electron on macOS specifically — that's where the sidebarless inset matters (the header must clear the traffic lights).
  • The composer's new top drawer against Marcode's glass shell (approval, user-input, and plan-follow-up states).
  • Chat header, right-panel tabs (mute indicator, add-surface shortcuts), and the terminal drawer's close confirmation.
  • 390px and 820px viewports, per the sync runbook's UI-hotspot rule.

Checklist

  • This PR is small and focused — no. It is a 92-commit upstream sync; that scope is inherent to the task.
  • I explained what changed and why
  • I included before/after screenshots for any UI changes — not possible in this environment; see UI Changes above.
  • I included a video for animation/interaction changes — same.

Verification

CI green on 480c621a:Check, Test, Mobile Native Static Analysis, Release Smoke, Rust, Test Server 1/2/3, Mobile Native Changes. Thread-transfer bot reports the merge stays within every enforced ceiling (+6.7% total wire against a 15.1 KiB cap).

Locally:apps/web fully green (289 files, 2961 tests); typecheck clean for web, server, contracts, shared, client-runtime, mobile, desktop; fmt --check and lint clean on the changed scope.

Each rewritten pin was verified to still fail on the regression it guards — the ripgrep step removed from test_server, the header primitive reverted to the collapsed-only inset, and a route dropping the sidebarless prop — and to pass when restored.

Known-noisy locally, green in CI

The sync container is resource-constrained and shares its port space, which produced local-only failures that CI does not reproduce. Treat CI as authoritative for these:

  • packages/shared/src/Net.test.tsfindAvailablePort returns preferred when it is free. Both Net.ts and Net.test.ts are byte-identical to pre-merge main, and the test passes in CI.
  • A GrokAdapter drain-window test hit its 120s timeout locally under a concurrently running suite. All three CI server shards pass.

Not verified here

  • No live client verification (no browser or simulator available) — see UI Changes.

Worth a maintainer decision

  • Native fingerprint diff can never run on this fork, and this PR is the first to show it..github/workflows/mobile-fingerprint-check.yml still targets blacksmith-8vcpu-ubuntu-2404. That label matches no runner here, so the job queued from 16:02 on 22 Aug until GitHub cancelled it at the 24-hour timeout — which is what leaves this PR unstable. It is untouched by this merge and was already Blacksmith-bound on 5bcc188a; it only surfaced now because the workflow is paths-gated to mobile native files and this diff touches them. It is not a required check, so it does not block merging.

    Deliberately not fixed here — it is unrelated to the sync and this PR is already XXL. The patch is one line, and the same one applied to ci.yml:

    # .github/workflows/mobile-fingerprint-check.yml- runs-on: blacksmith-8vcpu-ubuntu-2404+ runs-on: ubuntu-24.04

    The same latent problem exists in release.yml, publish-aur.yml, web-preview.yml, mobile-eas-preview.yml, mobile-eas-production.yml, and mobile-showcase-screenshots.yml. Worth one small follow-up PR sweeping all of them, plus a parity test covering every workflow rather than just ci.yml.

  • t3 triage's playbook still points at pingdotgg/t3code — a Marcode user running it would be told to file issues upstream. Left as-is: that's a product decision, not a merge decision.

  • docs/internals/scripts.md still documents T3CODE_HOME and .t3/userdata. Pre-existing drift, not caused by this merge; left alone to keep the diff focused.

  • Mobile Native Static Analysis is now conditionally skipped (upstream ci: only boot the macOS native lint runner when native sources change pingdotgg/t3code#7283 gates it on native source changes) and is a required check. It ran on this PR because the diff touches native sources, so the skip path is unverified — worth confirming branch protection treats a skipped required check as passing.

aorightand others added 30 commits August 18, 2026 13:38
…in GitHubPullRequestCli (pingdotgg#7385)
Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…t full speed (pingdotgg#7460)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…nt (pingdotgg#6563)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…tgg#6286)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GPT-5.6 <noreply@openai.com>
t3dotggand others added 22 commits August 20, 2026 22:12
…pingdotgg#7283)
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…otgg#7809)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…gdotgg#7794)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…tgg#6633)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Brings 92 upstream commits (82b8a93..2c4158f) into Marcode. 25 paths
conflicted; each was resolved by combining upstream's intent with Marcode's,
never by taking a whole file from one side.
Fork-boundary breaks that merged cleanly (no conflict, silent regressions):
- bootService: upstream's new macOS launch agent (pingdotgg#6286) exported T3CODE_HOME
into the plist. The Marcode launcher reads MARCODE_HOME and exits without it,
so the background service would never have started. Renamed, and pinned with
a test asserting the plist names MARCODE_HOME and never T3CODE_HOME.
- bootService: the launch-agent label is now derived from BOOT_SERVICE_NAME
(com.t3tools.marcode.service), matching the reason Marcode already renamed the
systemd unit -- an upstream install writes com.t3tools.t3code.service.plist to
the same path and the two must not overwrite each other. Pinned with a test.
- bootService test: upstream's new uninstall assertion hardcoded
"systemctl --user disable --now t3code.service"; it now reads
BOOT_SERVICE_UNIT_FILE so it cannot drift from Marcode's unit name again.
- cli/triage: upstream's new `t3 triage` command (pingdotgg#6563) resolves its base dir
from T3CODE_HOME while its own comment claims parity with `t3 pair`, which
reads MARCODE_HOME. Switched to MARCODE_HOME.
- ci.yml: upstream moved every job to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A
blacksmith-* label matches no runner on this fork, so those jobs would queue
forever rather than fail. All CI jobs are back on GitHub-hosted runners, and
the existing runner-pinning test now also rejects any blacksmith label.
- ChatView: upstream's background-draft promotion (pingdotgg#7821) landed without its
`const handleNewThread = useNewThreadHandler()` declaration, which fell in a
region Marcode had diverged. Restored; the file now typechecks.
- docs/user/background-service.md: the new platform section named upstream's
unit paths; corrected to marcode.service and com.t3tools.marcode.service.plist.
Conflict decisions:
- .plans/**: took upstream's removal (pingdotgg#7665). Marcode's only change there was a
path rebrand inside a file the repo policy already says not to commit, and
.plans/ is gitignored.
- apps/web/src/components/files/{FileBrowserPanel,FilePreviewPanel}.tsx: kept
Marcode's deletion. Upstream's change (pingdotgg#7490) is a refresh affordance confined
to the retired right-panel file surfaces and has no floating-editor analogue.
The removal stays pinned by rightPanelStore.test.ts.
- Migrations: upstream's 041_AuthSessionClientConnection renumbered to 042.
Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one
id higher; renumbering an applied id would re-run or skip it on real installs.
- cli/service.ts, cli/connect.ts: took upstream's macOS/launchd copy paths, kept
Marcode's product name.
- SidebarChrome: kept Marcode's footer. Upstream's SidebarUtilityMenu adds
Settings, Usage, Pull Requests, and Back to a footer Marcode emptied because
FloatingPillNav owns those; SidebarChrome.fork.test.tsx already pins this.
- SettingsSidebarNav: same call, same reason -- upstream swapped the single Back
row for SidebarUtilityMenu. Kept Marcode's Back row and added a test so the
swap fails loudly instead of merging silently next time.
- WorkspacePageHeader: adopted upstream's shared header primitive on settings
and usage, and added a `sidebarless` prop for Marcode's
SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's
collapsed-sidebar selector never matches and the header would slide back under
the native window controls.
- UsagePage: took upstream's redesign (pingdotgg#7147) and re-applied Marcode's styled
Tooltip on both refresh controls.
- _chat.pull-requests / PullRequestListFilters: took upstream's shared
PullRequestRefreshControl and Button-based filter trigger, and moved Marcode's
Tooltip onto them rather than keeping a third refresh button in the header.
- threadSettled: retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in
favour of upstream's event-ordering rule (pingdotgg#7454). Both fix the same bug -- a
merged PR burying a warm follow-up -- but upstream's also covers the inherited
PR case (a thread opened on a branch whose PR already merged must never
settle), which the time window would have regressed. Marcode's warm-window
tests are replaced with tests for the combined rule, and the retirement is
documented where the constant used to live.
- ChatComposer / ComposerPendingApprovalPanel: took upstream's composer state
drawers (pingdotgg#7150). Marcode's in-surface approval banner depended on a container
upstream removed; the glass treatment lives on chat-composer-glass-shell in
ChatView and is unaffected.
- ChatView: kept Marcode's ChatHeader call and its ThreadActionsCluster portal
inside upstream's WorkspacePageHeader, and kept the single container-level
panelLayoutControls render so it is not drawn twice. Kept
chat-composer-glass-shell-transparent and took upstream's -attached modifier.
- ChatHeader: kept Marcode's title-only header. Upstream's inline rename and
title action menu (pingdotgg#7817, pingdotgg#7476) duplicate entry points Marcode already
provides from the sidebar row and pill nav.
- RightPanelTabs: took upstream's tab mute feature (pingdotgg#7252) and surface-dropdown
shortcuts (pingdotgg#7318), minus copy-path and the Files entry, which address the
right-panel file surface Marcode retired. Marcode's existing add-surface menu
now renders from upstream's shared action list rather than duplicating it.
- ThreadTerminalDrawer: kept Marcode's terminal chrome and its FitAddon padding,
took upstream's themed terminal background and routed every close through
upstream's close confirmation (pingdotgg#7592).
- Sidebar.tsx: kept Marcode's 12px empty-state type, took upstream's
cursor-pointer fix (pingdotgg#5545).
- MessagesTimeline: kept Marcode's text-sm, took upstream's -mx-1 removal.
- AGENTS.md: kept Marcode's structure and its own Verifying/Pull-requests
sections, adopted upstream's new "Plans and work artifacts" policy and folded
its PR-assets rule into Marcode's list.
- index.css, __root.tsx, Sidebar.logic.ts: additive on both sides; kept both.
Coupled changes: pnpm-workspace.yaml moved only Clerk versions, not the effect
catalog, so no .repos/ subtree sync is required. infra/relay/package.json is
unchanged.
Verified: focused tests for threadSettled, bootService, service, serviceLauncher,
migration 042, upstream-sync workflow, dev-runner, Sidebar.logic, contracts
settings, shared git, RightPanelTabs, SidebarChrome fork pins, threadSidebarWidth,
rightPanelStore, ThreadStatusIndicators, desktopUpdate, editor-surface. Typecheck
clean for web, server, contracts, shared, client-runtime, mobile, desktop.
Targeted fmt --check and lint clean on the changed scope.
Not verified here: tests that import @aliimam/icons fail to resolve in this
container because that package declares main: dist/index.cjs and ships
dist/index.js. Both the dependency and the importing files are untouched by this
merge.
@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Aug 22, 2026
@github-actions

github-actionsBot commented Aug 22, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB13.4 KiB+856 B (+6.6%)15.1 KiB
CodexThread snapshot wire6.3 KiB6.9 KiB+625 B (+9.7%)7.3 KiB
CodexLive turn WebSocket wire6.3 KiB6.5 KiB+231 B (+3.6%)7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB55.0 KiB+3.2 KiB (+6.1%)66.4 KiB
CodexLive turn messages16160 (0.0%)21
ClaudeTotal thread wire12.6 KiB13.4 KiB+878 B (+6.8%)15.1 KiB
ClaudeThread snapshot wire6.3 KiB6.9 KiB+631 B (+9.8%)7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB6.5 KiB+247 B (+3.8%)7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB55.8 KiB+3.2 KiB (+6.0%)66.4 KiB
ClaudeLive turn messages16160 (0.0%)21

Baseline: 5bcc188 · PR result: 480c621 · 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: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

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

`Test Server 3` failed with `spawn rg ENOENT` on three
WorkspaceFileSystem searchContent tests. WorkspaceFileSystem calls
execFile("rg", ...), a bare PATH lookup.
Upstream never installs ripgrep -- their Blacksmith images ship it.
GitHub-hosted ubuntu-24.04 does not, so Marcode carries an install step,
and this sync converted every CI job back to GitHub-hosted runners.
pingdotgg/t3code@d7b9a689 then moved the `t3` suite into a new sharded
`test_server` job, and the Marcode-only step did not follow it there.
The existing parity test only inspected `ci.jobs.test`, so the move was
invisible to it. It now derives the job list from whatever actually runs
a Test step and asserts the install for each, so a future split, rename,
or new test job fails there instead of in CI.
Verified: WorkspaceFileSystem.test.ts passes locally with rg present
(31 tests); the broadened parity test fails with `job "test_server" must
install ripgrep` when the step is removed and passes when restored.
Both tests guard Marcode divergences the merge relocated rather than
removed, so both failed on content that is actually correct.
Migrations.test.ts pinned a fixed 9-entry tail. Adding upstream's
AuthSessionClientConnection as 042 slid Marcode's own migration 33 out of
that window, so the diff read as "33 disappeared" rather than "42 is
new". It now anchors on 33 by lookup and asserts the sequence from there,
which keeps the pin's intent and reports the real change next time.
workspaceTitlebar.fork.test.ts scanned settings.tsx and UsagePage.tsx for
a `drag-region` line next to SIDEBARLESS_TITLEBAR_INSET_CLASS. Adopting
upstream's shared WorkspacePageHeader moved both out of the call sites,
so neither string remained. The guarantee still has two independently
regressible halves, and each is now asserted where it lives: the
primitive maps `sidebarless` to the unconditional inset and carries the
drag region, and both routes pass the prop.
Verified: each rewritten pin fails when its regression is reintroduced
(the primitive reverted to the collapsed-only inset, and a route dropping
the prop) and passes when restored. Full apps/web suite green
(289 files, 2961 tests).
@maarcoChatGPT Codex Connector

Copy link
Copy Markdown
OwnerAuthor

Superseded by PR #51, the newer upstream sync through f035a0f4, which has now merged to main. Closing this older draft to keep the sync queue clean.

@maarcomaarco closed this Aug 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXLvouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@maarco@aoright@gbarros-dev@Bil0000@Rishet11@StiensWout@AugusDogus@tarik02@gsimone@t3dotgg@chrisdeeming@inayayousfi@RakshithBhat03@dbalders@maria-rcks@UtkarshUsername@SunkenInTime@lgwacker@jakeleventhal@sethwebster
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

chore(upstream): sync marcode through 2c4158f8 - #47

Closed
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d
Closed

chore(upstream): sync marcode through 2c4158f8#47
maarco wants to merge 95 commits into
mainfrom
claude/gracious-bohr-whg94d

Conversation

@maarco

@maarcomaarco commented Aug 22, 2026

Copy link
Copy Markdown
Owner

What Changed

Merges pingdotgg/t3code@2c4158f8 into Marcode — 92 upstream commits since the last sync point (82b8a938), as one two-parent merge commit. 25 paths conflicted and were resolved by hand.

This supersedes the three older stacked sync drafts (#41 through f2d5fc91, #43 through beab6886, #45 through be7d35aa); their ranges are all contained in this one. Close them if this lands.

CI is green on 480c621a — all four required checks (Check, Test, Mobile Native Static Analysis, Release Smoke) plus Rust, Test Server 1/2/3. The red checks on the two earlier commits are the three failures described below, each fixed in a follow-up commit.

GitHub still reports mergeable_state: unstable. That is the non-required Native fingerprint diff check, which GitHub cancelled after a 24-hour queue — a pre-existing fork issue this PR surfaced but did not cause; see Worth a maintainer decision below.

Fork-boundary breaks that merged cleanly — no conflict, silent regressions

These are the dangerous ones. Every item below produced zero conflict markers and would have shipped broken.

BreakFix
Upstream's new macOS launch agent (pingdotgg#6286) exports T3CODE_HOME into the plist. resolveLauncherBaseDir reads MARCODE_HOME and throws without it — the background service would never start on macOS.Renamed to MARCODE_HOME; pinned with a test asserting the plist names it and never T3CODE_HOME.
The launch-agent label was com.t3tools.t3code.service, so an upstream T3 Code install writes the same ~/Library/LaunchAgents/…plist path and the two overwrite each other.Derived from BOOT_SERVICE_NAMEcom.t3tools.marcode.service, matching the reason Marcode already renamed the systemd unit. Pinned with a test.
Upstream's new uninstall assertion hardcoded systemctl --user disable --now t3code.service.Now reads BOOT_SERVICE_UNIT_FILE so it can't drift from Marcode's unit name again.
The new t3 triage command (pingdotgg#6563) resolves its base dir from T3CODE_HOME, while its own comment claims parity with t3 pair — which reads MARCODE_HOME.Switched to MARCODE_HOME.
Upstream moved CI to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A blacksmith-* label matches no runner on this fork, so those jobs queue forever rather than failing.All CI jobs back on GitHub-hosted runners. Marcode's existing runner-pinning test caught this — it now also rejects any blacksmith label outright.
Second-order consequence of that runner change, and the one CI caught: upstream also moved the server suite into a new sharded test_server job (pingdotgg#7286), and Marcode's ripgrep install — needed only because of the runner conversion — stayed on the old test job. WorkspaceFileSystem search tests failed with spawn rg ENOENT. Upstream never hits this; their Blacksmith images ship ripgrep.Install step added to test_server. The parity test now derives the job list from whatever actually runs a test suite, so the next split or rename fails there instead of in CI.
Background-draft promotion (pingdotgg#7821) landed its usage of handleNewThread but not its declaration, which fell in a region Marcode had diverged.Restored useNewThreadHandler(); apps/web typechecks.
The new platform docs section named upstream's unit paths.Corrected to marcode.service / com.t3tools.marcode.service.plist.

Conflict decisions

Kept Marcode, ported the upstream fix inside the hunk

Took upstream's refactor, re-applied Marcode's behavior on top

  • WorkspacePageHeader — adopted upstream's shared header primitive on settings and usage, and added one sidebarless prop for SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's collapsed-sidebar selector never matches and the header would slide back under the native window controls.
  • UsagePage — took the redesign (feat(web): redesign usage insights pingdotgg/t3code#7147), re-applied Marcode's styled Tooltip on both refresh controls.
  • _chat.pull-requests / PullRequestListFilters — took upstream's shared PullRequestRefreshControl and Button-based filter trigger, moved Marcode's Tooltip onto them instead of keeping a third refresh button in the header.
  • RightPanelTabs — took tab mute (feat(desktop): mute a browser tab pingdotgg/t3code#7252) and surface-dropdown shortcuts (feat(web): add shortcuts to the surface dropdown pingdotgg/t3code#7318), minus copy-path and the Files entry, which address the retired right-panel file surface. Marcode's add-surface menu now renders from upstream's shared action list rather than duplicating it.
  • ChatComposer / ComposerPendingApprovalPanel — took upstream's composer state drawers (feat(web): attach composer state drawers pingdotgg/t3code#7150); Marcode's in-surface approval banner depended on a container upstream removed. The glass treatment lives on chat-composer-glass-shell in ChatView and is unaffected.

Where Marcode's implementation was superseded

  • threadSettled — retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in favour of upstream's event-ordering rule (fix(threads): a merged PR settles its thread only once pingdotgg/t3code#7454). Both fix the same bug (a merged PR burying a warm follow-up), but upstream's also covers the inherited-PR case — a thread opened on a branch whose PR already merged must never settle — which the time window would have regressed. Marcode's warm-window tests are replaced with tests for the combined rule, and the retirement is documented where the constant lived.

Other

  • Migrations — upstream's 041_AuthSessionClientConnection renumbered to 042. Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one id higher; renumbering an applied id would re-run or skip it on real installs.
  • .plans/** — took upstream's removal (chore: move implementation plans out of repository pingdotgg/t3code#7665). Marcode's only change there was a path rebrand inside a file the repo policy already says not to commit, and .plans/ is gitignored.
  • AGENTS.md — kept Marcode's structure and its own Verifying / Pull-requests sections; adopted upstream's new "Plans and work artifacts" policy and folded its PR-assets rule into Marcode's list.
  • cli/service.ts, cli/connect.ts — took upstream's macOS/launchd copy paths, kept Marcode's product name.
  • index.css, __root.tsx, Sidebar.logic.ts — additive on both sides; kept both.

Coupled changes:pnpm-workspace.yaml moved only Clerk versions, not the effect catalog, so no .repos/ subtree sync is required. infra/relay/package.json is unchanged.

Two fork pins this sync relocated

Both guard Marcode divergences the merge moved rather than removed, so both failed CI on content that is actually correct. Rewritten to assert the invariant where it now lives:

  • Migrations.test.ts pinned a fixed 9-entry tail, so adding migration 42 slid Marcode's own migration 33 out of the window — the diff read as "33 disappeared" rather than "42 is new". Now anchors on 33 by lookup.
  • workspaceTitlebar.fork.test.ts scanned settings/usage for a drag-region line beside SIDEBARLESS_TITLEBAR_INSET_CLASS; adopting WorkspacePageHeader moved both out of the call sites. The guarantee still has two independently regressible halves, each now asserted where it lives.

Why

The daily sync had stalled behind three unmerged drafts, so the fork was 92 commits behind and drifting. Merging the full range in one reviewed pass is cheaper than resolving three overlapping stacks, and it re-establishes a single merge base for the next run.

Every fix above is either an upstream correctness/security/operational change Marcode needs, or a Marcode product contract that upstream's rewrite would have quietly removed. Hotspot paths were treated as mandatory-review, not as automatic keep-Marcode.

UI Changes

Not captured — this ran headless with no browser or display available. This is the main reason the PR is still draft. The following surfaces changed and want a look:

  • Settings and Usage top bars, in Electron on macOS specifically — that's where the sidebarless inset matters (the header must clear the traffic lights).
  • The composer's new top drawer against Marcode's glass shell (approval, user-input, and plan-follow-up states).
  • Chat header, right-panel tabs (mute indicator, add-surface shortcuts), and the terminal drawer's close confirmation.
  • 390px and 820px viewports, per the sync runbook's UI-hotspot rule.

Checklist

  • This PR is small and focused — no. It is a 92-commit upstream sync; that scope is inherent to the task.
  • I explained what changed and why
  • I included before/after screenshots for any UI changes — not possible in this environment; see UI Changes above.
  • I included a video for animation/interaction changes — same.

Verification

CI green on 480c621a:Check, Test, Mobile Native Static Analysis, Release Smoke, Rust, Test Server 1/2/3, Mobile Native Changes. Thread-transfer bot reports the merge stays within every enforced ceiling (+6.7% total wire against a 15.1 KiB cap).

Locally:apps/web fully green (289 files, 2961 tests); typecheck clean for web, server, contracts, shared, client-runtime, mobile, desktop; fmt --check and lint clean on the changed scope.

Each rewritten pin was verified to still fail on the regression it guards — the ripgrep step removed from test_server, the header primitive reverted to the collapsed-only inset, and a route dropping the sidebarless prop — and to pass when restored.

Known-noisy locally, green in CI

The sync container is resource-constrained and shares its port space, which produced local-only failures that CI does not reproduce. Treat CI as authoritative for these:

  • packages/shared/src/Net.test.tsfindAvailablePort returns preferred when it is free. Both Net.ts and Net.test.ts are byte-identical to pre-merge main, and the test passes in CI.
  • A GrokAdapter drain-window test hit its 120s timeout locally under a concurrently running suite. All three CI server shards pass.

Not verified here

  • No live client verification (no browser or simulator available) — see UI Changes.

Worth a maintainer decision

  • Native fingerprint diff can never run on this fork, and this PR is the first to show it..github/workflows/mobile-fingerprint-check.yml still targets blacksmith-8vcpu-ubuntu-2404. That label matches no runner here, so the job queued from 16:02 on 22 Aug until GitHub cancelled it at the 24-hour timeout — which is what leaves this PR unstable. It is untouched by this merge and was already Blacksmith-bound on 5bcc188a; it only surfaced now because the workflow is paths-gated to mobile native files and this diff touches them. It is not a required check, so it does not block merging.

    Deliberately not fixed here — it is unrelated to the sync and this PR is already XXL. The patch is one line, and the same one applied to ci.yml:

    # .github/workflows/mobile-fingerprint-check.yml- runs-on: blacksmith-8vcpu-ubuntu-2404+ runs-on: ubuntu-24.04

    The same latent problem exists in release.yml, publish-aur.yml, web-preview.yml, mobile-eas-preview.yml, mobile-eas-production.yml, and mobile-showcase-screenshots.yml. Worth one small follow-up PR sweeping all of them, plus a parity test covering every workflow rather than just ci.yml.

  • t3 triage's playbook still points at pingdotgg/t3code — a Marcode user running it would be told to file issues upstream. Left as-is: that's a product decision, not a merge decision.

  • docs/internals/scripts.md still documents T3CODE_HOME and .t3/userdata. Pre-existing drift, not caused by this merge; left alone to keep the diff focused.

  • Mobile Native Static Analysis is now conditionally skipped (upstream ci: only boot the macOS native lint runner when native sources change pingdotgg/t3code#7283 gates it on native source changes) and is a required check. It ran on this PR because the diff touches native sources, so the skip path is unverified — worth confirming branch protection treats a skipped required check as passing.

aorightand others added 30 commits August 18, 2026 13:38
…in GitHubPullRequestCli (pingdotgg#7385)
Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…t full speed (pingdotgg#7460)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…nt (pingdotgg#6563)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…tgg#6286)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GPT-5.6 <noreply@openai.com>
t3dotggand others added 22 commits August 20, 2026 22:12
…pingdotgg#7283)
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…otgg#7809)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…gdotgg#7794)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>
…tgg#6633)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Brings 92 upstream commits (82b8a93..2c4158f) into Marcode. 25 paths
conflicted; each was resolved by combining upstream's intent with Marcode's,
never by taking a whole file from one side.
Fork-boundary breaks that merged cleanly (no conflict, silent regressions):
- bootService: upstream's new macOS launch agent (pingdotgg#6286) exported T3CODE_HOME
into the plist. The Marcode launcher reads MARCODE_HOME and exits without it,
so the background service would never have started. Renamed, and pinned with
a test asserting the plist names MARCODE_HOME and never T3CODE_HOME.
- bootService: the launch-agent label is now derived from BOOT_SERVICE_NAME
(com.t3tools.marcode.service), matching the reason Marcode already renamed the
systemd unit -- an upstream install writes com.t3tools.t3code.service.plist to
the same path and the two must not overwrite each other. Pinned with a test.
- bootService test: upstream's new uninstall assertion hardcoded
"systemctl --user disable --now t3code.service"; it now reads
BOOT_SERVICE_UNIT_FILE so it cannot drift from Marcode's unit name again.
- cli/triage: upstream's new `t3 triage` command (pingdotgg#6563) resolves its base dir
from T3CODE_HOME while its own comment claims parity with `t3 pair`, which
reads MARCODE_HOME. Switched to MARCODE_HOME.
- ci.yml: upstream moved every job to Blacksmith runners (pingdotgg#7286, pingdotgg#7283). A
blacksmith-* label matches no runner on this fork, so those jobs would queue
forever rather than fail. All CI jobs are back on GitHub-hosted runners, and
the existing runner-pinning test now also rejects any blacksmith label.
- ChatView: upstream's background-draft promotion (pingdotgg#7821) landed without its
`const handleNewThread = useNewThreadHandler()` declaration, which fell in a
region Marcode had diverged. Restored; the file now typechecks.
- docs/user/background-service.md: the new platform section named upstream's
unit paths; corrected to marcode.service and com.t3tools.marcode.service.plist.
Conflict decisions:
- .plans/**: took upstream's removal (pingdotgg#7665). Marcode's only change there was a
path rebrand inside a file the repo policy already says not to commit, and
.plans/ is gitignored.
- apps/web/src/components/files/{FileBrowserPanel,FilePreviewPanel}.tsx: kept
Marcode's deletion. Upstream's change (pingdotgg#7490) is a refresh affordance confined
to the retired right-panel file surfaces and has no floating-editor analogue.
The removal stays pinned by rightPanelStore.test.ts.
- Migrations: upstream's 041_AuthSessionClientConnection renumbered to 042.
Marcode's ProjectWorkspaceLayout owns 033, so every shared migration sits one
id higher; renumbering an applied id would re-run or skip it on real installs.
- cli/service.ts, cli/connect.ts: took upstream's macOS/launchd copy paths, kept
Marcode's product name.
- SidebarChrome: kept Marcode's footer. Upstream's SidebarUtilityMenu adds
Settings, Usage, Pull Requests, and Back to a footer Marcode emptied because
FloatingPillNav owns those; SidebarChrome.fork.test.tsx already pins this.
- SettingsSidebarNav: same call, same reason -- upstream swapped the single Back
row for SidebarUtilityMenu. Kept Marcode's Back row and added a test so the
swap fails loudly instead of merging silently next time.
- WorkspacePageHeader: adopted upstream's shared header primitive on settings
and usage, and added a `sidebarless` prop for Marcode's
SIDEBARLESS_TITLEBAR_INSET_CLASS. Those routes mount no sidebar, so upstream's
collapsed-sidebar selector never matches and the header would slide back under
the native window controls.
- UsagePage: took upstream's redesign (pingdotgg#7147) and re-applied Marcode's styled
Tooltip on both refresh controls.
- _chat.pull-requests / PullRequestListFilters: took upstream's shared
PullRequestRefreshControl and Button-based filter trigger, and moved Marcode's
Tooltip onto them rather than keeping a third refresh button in the header.
- threadSettled: retired Marcode's CHANGE_REQUEST_SETTLE_IDLE_MS warm window in
favour of upstream's event-ordering rule (pingdotgg#7454). Both fix the same bug -- a
merged PR burying a warm follow-up -- but upstream's also covers the inherited
PR case (a thread opened on a branch whose PR already merged must never
settle), which the time window would have regressed. Marcode's warm-window
tests are replaced with tests for the combined rule, and the retirement is
documented where the constant used to live.
- ChatComposer / ComposerPendingApprovalPanel: took upstream's composer state
drawers (pingdotgg#7150). Marcode's in-surface approval banner depended on a container
upstream removed; the glass treatment lives on chat-composer-glass-shell in
ChatView and is unaffected.
- ChatView: kept Marcode's ChatHeader call and its ThreadActionsCluster portal
inside upstream's WorkspacePageHeader, and kept the single container-level
panelLayoutControls render so it is not drawn twice. Kept
chat-composer-glass-shell-transparent and took upstream's -attached modifier.
- ChatHeader: kept Marcode's title-only header. Upstream's inline rename and
title action menu (pingdotgg#7817, pingdotgg#7476) duplicate entry points Marcode already
provides from the sidebar row and pill nav.
- RightPanelTabs: took upstream's tab mute feature (pingdotgg#7252) and surface-dropdown
shortcuts (pingdotgg#7318), minus copy-path and the Files entry, which address the
right-panel file surface Marcode retired. Marcode's existing add-surface menu
now renders from upstream's shared action list rather than duplicating it.
- ThreadTerminalDrawer: kept Marcode's terminal chrome and its FitAddon padding,
took upstream's themed terminal background and routed every close through
upstream's close confirmation (pingdotgg#7592).
- Sidebar.tsx: kept Marcode's 12px empty-state type, took upstream's
cursor-pointer fix (pingdotgg#5545).
- MessagesTimeline: kept Marcode's text-sm, took upstream's -mx-1 removal.
- AGENTS.md: kept Marcode's structure and its own Verifying/Pull-requests
sections, adopted upstream's new "Plans and work artifacts" policy and folded
its PR-assets rule into Marcode's list.
- index.css, __root.tsx, Sidebar.logic.ts: additive on both sides; kept both.
Coupled changes: pnpm-workspace.yaml moved only Clerk versions, not the effect
catalog, so no .repos/ subtree sync is required. infra/relay/package.json is
unchanged.
Verified: focused tests for threadSettled, bootService, service, serviceLauncher,
migration 042, upstream-sync workflow, dev-runner, Sidebar.logic, contracts
settings, shared git, RightPanelTabs, SidebarChrome fork pins, threadSidebarWidth,
rightPanelStore, ThreadStatusIndicators, desktopUpdate, editor-surface. Typecheck
clean for web, server, contracts, shared, client-runtime, mobile, desktop.
Targeted fmt --check and lint clean on the changed scope.
Not verified here: tests that import @aliimam/icons fail to resolve in this
container because that package declares main: dist/index.cjs and ships
dist/index.js. Both the dependency and the importing files are untouched by this
merge.
@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Aug 22, 2026
@github-actions

github-actionsBot commented Aug 22, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB13.4 KiB+856 B (+6.6%)15.1 KiB
CodexThread snapshot wire6.3 KiB6.9 KiB+625 B (+9.7%)7.3 KiB
CodexLive turn WebSocket wire6.3 KiB6.5 KiB+231 B (+3.6%)7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB55.0 KiB+3.2 KiB (+6.1%)66.4 KiB
CodexLive turn messages16160 (0.0%)21
ClaudeTotal thread wire12.6 KiB13.4 KiB+878 B (+6.8%)15.1 KiB
ClaudeThread snapshot wire6.3 KiB6.9 KiB+631 B (+9.8%)7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB6.5 KiB+247 B (+3.8%)7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB55.8 KiB+3.2 KiB (+6.0%)66.4 KiB
ClaudeLive turn messages16160 (0.0%)21

Baseline: 5bcc188 · PR result: 480c621 · 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: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

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

`Test Server 3` failed with `spawn rg ENOENT` on three
WorkspaceFileSystem searchContent tests. WorkspaceFileSystem calls
execFile("rg", ...), a bare PATH lookup.
Upstream never installs ripgrep -- their Blacksmith images ship it.
GitHub-hosted ubuntu-24.04 does not, so Marcode carries an install step,
and this sync converted every CI job back to GitHub-hosted runners.
pingdotgg/t3code@d7b9a689 then moved the `t3` suite into a new sharded
`test_server` job, and the Marcode-only step did not follow it there.
The existing parity test only inspected `ci.jobs.test`, so the move was
invisible to it. It now derives the job list from whatever actually runs
a Test step and asserts the install for each, so a future split, rename,
or new test job fails there instead of in CI.
Verified: WorkspaceFileSystem.test.ts passes locally with rg present
(31 tests); the broadened parity test fails with `job "test_server" must
install ripgrep` when the step is removed and passes when restored.
Both tests guard Marcode divergences the merge relocated rather than
removed, so both failed on content that is actually correct.
Migrations.test.ts pinned a fixed 9-entry tail. Adding upstream's
AuthSessionClientConnection as 042 slid Marcode's own migration 33 out of
that window, so the diff read as "33 disappeared" rather than "42 is
new". It now anchors on 33 by lookup and asserts the sequence from there,
which keeps the pin's intent and reports the real change next time.
workspaceTitlebar.fork.test.ts scanned settings.tsx and UsagePage.tsx for
a `drag-region` line next to SIDEBARLESS_TITLEBAR_INSET_CLASS. Adopting
upstream's shared WorkspacePageHeader moved both out of the call sites,
so neither string remained. The guarantee still has two independently
regressible halves, and each is now asserted where it lives: the
primitive maps `sidebarless` to the unconditional inset and carries the
drag region, and both routes pass the prop.
Verified: each rewritten pin fails when its regression is reintroduced
(the primitive reverted to the collapsed-only inset, and a route dropping
the prop) and passes when restored. Full apps/web suite green
(289 files, 2961 tests).
@maarcoChatGPT Codex Connector

Copy link
Copy Markdown
OwnerAuthor

Superseded by PR #51, the newer upstream sync through f035a0f4, which has now merged to main. Closing this older draft to keep the sync queue clean.

@maarcomaarco closed this Aug 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXLvouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@maarco@aoright@gbarros-dev@Bil0000@Rishet11@StiensWout@AugusDogus@tarik02@gsimone@t3dotgg@chrisdeeming@inayayousfi@RakshithBhat03@dbalders@maria-rcks@UtkarshUsername@SunkenInTime@lgwacker@jakeleventhal@sethwebster