Skip to content

chore(upstream): sync marcode through 018d7f27 - #58

Draft
maarco wants to merge 61 commits into
mainfrom
claude/gracious-bohr-1dtucn
Draft

chore(upstream): sync marcode through 018d7f27#58
maarco wants to merge 61 commits into
mainfrom
claude/gracious-bohr-1dtucn

Conversation

@maarco

@maarco maarco commented Aug 28, 2026

Copy link
Copy Markdown
Owner

What Changed

Merges 59 upstream commits, f035a0f4..018d7f27 (pingdotgg/t3code@018d7f27), into Marcode as one two-parent merge commit (a940ce5c), plus one follow-up commit (0a265857) fixing a Marcode-owned test the merge invalidated. No force push, reset, restore, stash, clean, or wholesale ours/theirs resolution was used; MERGE_HEAD stayed at 018d7f27 for the whole resolution.

Supersedes #53, #55, and #56 — those draft syncs targeted older upstream SHAs (a3a8cbd6, f6f2be32) that are contained in this one. Merging this closes the delta they cover; they can be closed unmerged.

Conflicts resolved (24 paths)

Path Decision
apps/mobile/app.config.ts Took upstream's adaptive-launcher-icon fix (pingdotgg#4332) — release now uses the shared transparent foreground instead of the rounded-square universal export Android was masking twice. See the branding note below.
apps/mobile/src/lib/authClientMetadata.ts Kept "Marcode Mobile"; took upstream's tablet/phone deviceType detection.
apps/mobile/src/components/CompactBrandTitle.tsx Kept MarcodeMark and the conditional stage badge; took upstream's Uniwind className styling over useThemeColor + inline styles (the new lint rule forbids them).
apps/mobile/src/components/T3Wordmark.tsx Kept Marcode's deletion; upstream only restyled it.
apps/mobile/src/features/home/HomeHeader.tsx Kept MarcodeMark.
apps/mobile/src/lib/mobileBranding.test.ts Upstream deleted it (pingdotgg#8397). Kept — it pins Marcode returning "" (no badge) where upstream returns "Alpha". Now says so in a comment.
oxlint-plugin-marcode/rules/no-mobile-uniwind-theme-escape-hatches.* Landed upstream's new rule under Marcode's plugin dir; renamed the test's rule prefix t3code/marcode/ to match the plugin meta name.
vite.config.ts Enabled the new rule at upstream's "error"; kept Marcode's prefixes and the no-native-title-tooltip "warn" seam.
apps/server/src/cloud/bootService.ts + test Took upstream's PATH export (pingdotgg#8173, keeps provider CLIs on the service path); kept MARCODE_HOME, not T3CODE_HOME. Both guard tests now stand side by side.
apps/server/src/environment/ServerEnvironment.ts, packages/contracts/src/environment.ts Kept both capability flags: workspaceLayoutMutations and the new threadPullRequestLinking.
apps/server/src/persistence/Migrations.ts Marcode ids sit one higher (033 is ProjectWorkspaceLayout). Renamed upstream's 042/043 → 043/044 and fixed the new migration test's hardcoded toMigrationInclusive ids.
apps/web/src/components/sidebar/SidebarChrome.tsx Kept Marcode's bare Electron drag strip. Upstream's only change was a project-settings case for the sidebar Back button (pingdotgg#8168) — Marcode's FloatingPillNav already shows Back to Workspace on every non-thread route, so that intent is covered.
apps/web/src/components/threadSidebarWidth.test.ts Accepted upstream's prune of the trivial width assertions, but moved the Marcode brand-removal pin into its own components/sidebar/sidebarBrandRemoval.test.ts so a future upstream prune can't take it out silently.
apps/web/src/components/ThreadTerminalDrawer.tsx Kept Marcode's xterm link provider. Upstream's isTerminalUrl fix (pingdotgg#7488) lands in the shared terminal-links.ts, which Marcode's match.kind classification already goes through.
apps/web/src/components/chat/OpenInPicker.tsx Kept Marcode's FolderOpenFilled icon; took upstream's move of labels to the shared editorLabelForPlatform.
apps/web/src/components/ChatMarkdown.tsx Took upstream's editorPreferences/editorLabels/remoteOpen imports; kept openFileInFloatingEditor. The fork seam routing agent file links to the floating editor survives — upstream's right-panel file viewer (pingdotgg#8098) is not reintroduced.
apps/web/src/components/ChatView.tsx Took upstream's hoisted useNewThreadHandler/useThreadActions (needed by the new settle/pin keyboard shortcuts) and removed the duplicate later declaration. Kept Marcode's slim ChatHeader; dropped upstream's openProjectPullRequest, unreachable here because openThreadPullRequest already falls back to the project repository.
pnpm-lock.yaml Kept Marcode's xterm entries, then regenerated with pnpm install --lockfile-only from the merged manifests.

Fork-boundary breaks that merged cleanly (no conflict) and were fixed here

These are the dangerous ones — they produce no conflict marker:

  1. apps/web/src/connection/clientMetadata.ts arrived new from upstream with hardcoded "T3 Code Desktop" / "T3 Code Web" labels and replaced Marcode's inline metadata builder in platform.ts. Every client would have reported itself as T3 Code. Routed both labels through APP_BASE_NAME and pinned "Marcode Desktop" in clientMetadata.test.ts.
  2. Three upstream oxlint-disable-next-line t3code/no-global-process-runtime comments (apps/desktop/src/preload.ts, apps/desktop/scripts/verify-preload-bundle.mjs, apps/server/src/process/externalLauncher.test.ts). Marcode's plugin is named marcode, so those disables match nothing and the rule — set to "error" — would have failed the Check job. Repointed to marcode/.

Swept and confirmed correct for Marcode: T3CODE_HOME (only guard tests/comments), t3code.service / com.t3tools.t3code launchd label, WORKTREE_BRANCH_PREFIX ("marcode"; the t3code/... branch strings in server/checkpoint tests are pre-existing arbitrary fixtures, not prefix-derived), t3code: storage keys, T3_BOOT_SERVICE_UNIT, T3CODE_DESKTOP_REUSE_RESOURCE_MONITOR, @t3tools/*, and the t3 package/CLI name — all left upstream-shaped on purpose.

Follow-up commit 0a265857

CI caught one thing the focused local run did not: apps/server/src/persistence/Migrations.test.ts pins the migration registry with slice(-10), so appending the two renumbered upstream migrations pushed id 33 — the id the test is named for — out of the asserted window.

Fixed by anchoring the slice at id 33 via findIndex rather than a fixed tail length, so the assertion keeps covering Marcode's owned migration however many upstream ones land after it. Without that, the pin would have silently stopped testing its own subject on the next sync.

Coupled vendored subtrees

pnpm-workspace.yaml moved, but only Clerk versions; effect stayed at 4.0.0-beta.103 and infra/relay/package.json did not change. No sync:repos run was needed.

Why

Daily upstream sync. Upstream had 59 unmerged commits including a Codex approval-callback recovery fix, a projection-bootstrap replay fix (pingdotgg#7538), the macOS service PATH fix, Grok reliability work, and the Clerk 6.30/0.0.37 bumps.

UI Changes

Two decisions need your eye — I could not drive a browser or simulator for them in this container:

  • Android release launcher icon. Upstream's fix pairs a transparent light mark with a dark plate. Marcode's release previously used the black-on-white universal export as the foreground, which is exactly the double-masking bug upstream fixed. Taking the fix means the release Android launcher is now a light mark on #000000, diverging from Marcode's black-on-white rule for that one surface. Restoring black-on-white needs a Marcode-owned foreground SVG/PNG pair; no rasterizer is available here to generate one. Flagging for your call — the alternative was keeping the double-mask bug or shipping a white mark on a white plate.
  • vp run icons:check could not run: it needs macOS Icon Composer.

Checklist

  • This PR is small and focused — no, it is a 59-commit upstream sync; that is the unit of work
  • I explained what changed and why
  • I included before/after screenshots for any UI changes — no browser/simulator available in this environment
  • I included a video for animation/interaction changes — n/a

CI on 0a265857

All four required checks green: Check ✅ · Test ✅ · Mobile Native Static Analysis ✅ · Release Smoke ✅. Also green: Test Server 1/2/3, Rust, Mobile Native Changes, claude-review, and the thread-transfer budget report (every metric within its ceiling). Native fingerprint diff sits queued, as it did on the previous head; it is not a required check.

Local verification before pushing (focused, per AGENTS.md — not the full suite)

  • vp test run green on: clientMetadata, sidebarBrandRemoval, mobileBranding, no-mobile-uniwind-theme-escape-hatches, bootService, ServerEnvironment, Migrations, 043_ProjectionThreadLinkedPullRequest, 042_AuthSessionClientConnection, build-desktop-artifact, contracts/environment, contracts/settings, terminal-links, editorLabels, Sidebar.logic, versionSkew, upstream-sync-workflow, serviceLauncher, electron-launcher, generate-uniwind-themes, connection/platform.
  • vp run --filter … typecheck clean for @t3tools/contracts, @t3tools/web, @t3tools/shared, @t3tools/client-runtime, t3 (server), @t3tools/mobile, @t3tools/desktop (only pre-existing Effect style suggestions, no errors).
  • vp fmt --check clean on all 356 changed TS files.
  • vp lint on the 82 changed directories: no errors; only warnings that are pre-existing on main.
  • generate-uniwind-themes.mts --check passes, so the generated theme CSS matches Marcode's tokens.

One thing to review deliberately

apps/server/src/provider/ModelManifest.ts is new from upstream and fetches legacy model classification from https://raw.githubusercontent.com/pingdotgg/t3code/main/apps/server/src/provider/model-manifest.json. I left the URL pointing at upstream — they maintain that data and Marcode benefits from their updates — but it does mean Marcode servers read a file from upstream's repo at runtime. Repointing it at maarco/marcode is a one-line change if you'd rather own it. The in-repo model-manifest.json is the fallback either way.

Left deliberately as a draft: this sync is yours to review and mark ready.

t3dotgg and others added 30 commits August 24, 2026 12:42
Co-authored-by: mweinbach <maxweinbach5@gmail.com>
…gg#7140)

Co-authored-by: Dara Adedeji <daraaded@amazon.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
krutftw and others added 22 commits August 27, 2026 02:58
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
Co-authored-by: Julius Marminge <julius@mac.lan>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Recent scheduled nightlies have been delayed or skipped.

Move the nightly cron from minute 7 to minute 38. Keep the existing three-hour interval. This tests a different point in each three-hour window without claiming it will fix GitHub schedule delivery.

Authored by GPT-5.6 Sol with the Codex harness.
Add a mod+shift+p shortcut that pins or unpins the active thread. Ignore the shortcut during terminal focus and when the server does not support thread pinning.
Co-authored-by: codex <codex@users.noreply.github.com>
Merges 59 upstream commits (f035a0f..018d7f2) into Marcode. Conflict
decisions, path by path:

apps/mobile/app.config.ts
  Took upstream's adaptive-launcher-icon fix (pingdotgg#4332): the release variant now
  uses the shared transparent foreground instead of the rounded-square universal
  export, which Android was masking a second time. The shipped foreground
  artwork is a light mark, so the release plate stays dark; every other Marcode
  production mark is still black-on-white.

apps/mobile/src/lib/authClientMetadata.ts
  Kept the "Marcode Mobile" label, took upstream's tablet/phone deviceType
  detection.

apps/mobile/src/components/CompactBrandTitle.tsx
  Kept MarcodeMark and the conditional stage badge; took upstream's Uniwind
  className styling in place of useThemeColor + inline styles, which the new
  no-mobile-uniwind-theme-escape-hatches rule forbids.

apps/mobile/src/components/T3Wordmark.tsx
  Kept Marcode's deletion; upstream only restyled it for Uniwind.

apps/mobile/src/features/home/HomeHeader.tsx
  Kept MarcodeMark.

apps/mobile/src/lib/mobileBranding.test.ts
  Upstream deleted this in pingdotgg#8397. Kept it: it pins Marcode returning "" (no
  badge) where upstream returns "Alpha", and now says so in a comment.

oxlint-plugin-marcode/rules/no-mobile-uniwind-theme-escape-hatches.*
  Landed upstream's new rule under Marcode's plugin directory and renamed its
  test's rule prefix from t3code/ to marcode/ to match the plugin meta name.

vite.config.ts
  Enabled the new rule at upstream's "error", kept Marcode's prefixes and the
  no-native-title-tooltip "warn" seam.

apps/server/src/cloud/bootService.ts + test
  Took upstream's PATH export (pingdotgg#8173, keeps provider CLIs on the service path)
  and kept MARCODE_HOME rather than T3CODE_HOME. Both guard tests now stand
  side by side.

apps/server/src/environment/ServerEnvironment.ts, packages/contracts/src/environment.ts
  Kept both capability flags: workspaceLayoutMutations and the new
  threadPullRequestLinking.

apps/server/src/persistence/Migrations.ts
  Marcode ids sit one higher than upstream's because 033 is
  ProjectWorkspaceLayout here. Renamed upstream's 042/043 to 043/044 and fixed
  the new migration test's hardcoded toMigrationInclusive ids.

apps/web/src/components/sidebar/SidebarChrome.tsx
  Kept Marcode's bare Electron drag strip. Upstream's only change in the file
  was adding a project-settings case to the sidebar Back button (pingdotgg#8168);
  Marcode's FloatingPillNav already shows Back to Workspace on every non-thread
  route, so that intent is already covered.

apps/web/src/components/threadSidebarWidth.test.ts
  Accepted upstream's prune of the trivial width assertions, but moved the
  Marcode brand-removal pin into its own file,
  components/sidebar/sidebarBrandRemoval.test.ts, so a future upstream prune
  cannot take it out silently.

apps/web/src/components/ThreadTerminalDrawer.tsx
  Kept Marcode's xterm link provider. Upstream's isTerminalUrl fix (pingdotgg#7488)
  lands in the shared terminal-links.ts, which Marcode's match.kind
  classification already goes through.

apps/web/src/components/chat/OpenInPicker.tsx
  Kept Marcode's FolderOpenFilled icon, took upstream's move of labels to the
  shared editorLabelForPlatform helper.

apps/web/src/components/ChatMarkdown.tsx
  Took upstream's editorPreferences/editorLabels/remoteOpen imports and kept
  openFileInFloatingEditor. The Marcode fork seam routing agent file links to
  the floating editor survives; the right-panel file viewer upstream added in
  pingdotgg#8098 is not reintroduced.

apps/web/src/components/ChatView.tsx
  Took upstream's hoisted useNewThreadHandler/useThreadActions (needed by the
  new settle and pin keyboard shortcuts) and removed the now-duplicate later
  declaration. Kept Marcode's slim ChatHeader; dropped upstream's
  openProjectPullRequest, which is unreachable here because Marcode's
  openThreadPullRequest already falls back to the project repository.

pnpm-lock.yaml
  Kept Marcode's xterm entries, then regenerated the lockfile with pnpm from
  the merged manifests. Effect and Alchemy versions did not move, so no
  vendored subtree sync was needed.

Fork-boundary breaks that merged cleanly and were fixed here:

- apps/web/src/connection/clientMetadata.ts arrived new from upstream with
  hardcoded "T3 Code Desktop"/"T3 Code Web" labels and replaced Marcode's
  inline metadata builder. Routed both through APP_BASE_NAME and pinned the
  label in clientMetadata.test.ts.
- Three upstream oxlint-disable comments referenced the t3code/ rule prefix,
  which does not match Marcode's plugin name and would have let
  no-global-process-runtime fire in CI. Repointed to marcode/.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Aug 28, 2026
The registry pin sliced the last 10 entries, so appending upstream's two new
migrations (043/044 after renumbering) pushed migration 33 — the id the test is
named for — out of the asserted window.

Anchor the slice at id 33 instead of a fixed tail length so the assertion keeps
covering Marcode's owned migration however many upstream ones land after it, and
add the two new entries.
@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.4 KiB 13.3 KiB −122 B (−0.9%) 15.1 KiB
Codex Thread snapshot wire 6.9 KiB 6.9 KiB +5 B (+0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.4 KiB −127 B (−1.9%) 7.8 KiB
Codex Live turn WebSocket decoded 55.0 KiB 55.6 KiB +558 B (+1.0%) 66.4 KiB
Codex Live turn messages 16 10 −6 (−37.5%) 21
Claude Total thread wire 13.4 KiB 13.3 KiB −156 B (−1.1%) 15.1 KiB
Claude Thread snapshot wire 6.9 KiB 6.9 KiB +8 B (+0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 6.4 KiB −164 B (−2.4%) 7.8 KiB
Claude Live turn WebSocket decoded 55.8 KiB 56.4 KiB +532 B (+0.9%) 66.4 KiB
Claude Live turn messages 16 9 −7 (−43.8%) 21

Baseline: 133f3f7 · PR result: 0a26585 · 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.

maarco commented Aug 29, 2026

Copy link
Copy Markdown
Owner Author

Two status changes since the description was written.

Native fingerprint diff is now cancelled, and it is not this PR's failure. It sat queued for exactly 24h (2026-08-28 15:42:11 → 2026-08-29 15:42:11) and GitHub killed it on the job timeout. Every run of mobile-fingerprint-check.yml on this fork does the same: I checked the last 30 runs and not one has ever completedclaude/gracious-bohr-1dtucn, -rlxi8l, -ie7aa6, -23bj7a, -x80z9c, -23l2b6, back to at least 2026-08-23, all queued-then-cancelled. It is a pre-existing fork-environment condition (the job never starts; the blacksmith-8vcpu-ubuntu-2404 label itself is fine, since Check, Test, and Rust all run on it here), and it is not in requiredPullRequestChecks. I am deliberately not spending the one re-run on it: 30 runs across 6 branches is stronger evidence than a 31st would be, and a re-run would just occupy a runner slot for another 24h. It needs a repo-settings fix, not a change to this PR.

The four required checks remain green on 0a265857: Check ✅ · Test ✅ · Mobile Native Static Analysis ✅ · Release Smoke ✅.

This PR's upstream coverage is now superseded by #61 (053affbe), opened by today's scheduled run. I verified 018d7f27 is an ancestor of #61's head, so #61 covers everything here.

But #61 branched from main independently rather than building on this branch, so the two are not interchangeable:

So the migration-pin fix in 0a265857 is the one piece of this PR that #61 still needs. Cherry-picking that single commit onto #61 should get it green, at which point #61 is the better merge candidate and this PR can be closed alongside #53, #55, and #56.

I have not pushed to #61 — it is not a PR I opened, and this session was not asked to drive it.


Generated by Claude Code

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.