chore(upstream): sync marcode through 9b2d0431 - #65
Draft
maarco wants to merge 132 commits into
Draft
Conversation
Co-authored-by: mweinbach <maxweinbach5@gmail.com>
…gdotgg#8144) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…ingdotgg#8189) Co-authored-by: Claude Fable 5 <noreply@anthropic.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>
pingdotgg#8227) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
…text (pingdotgg#8804) Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius@mac.lan>
…gg#8734) Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Julius Marminge <jmarminge@gmail.com>
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Merges 129 upstream commits (f035a0f..9b2d043) into Marcode. 39 paths conflicted; each was resolved by combining both intents rather than taking a side. Decisions, grouped by kind: Fork-boundary breaks that merged cleanly (no conflict marker, would have shipped broken): - apps/server/src/cli/theme.ts — upstream's new `t3 theme` command read T3CODE_HOME. Every other Marcode CLI command reads MARCODE_HOME, so `MARCODE_HOME=... t3 theme set` would have silently targeted the default install. Renamed the var (and its test). - oxlint-disable comments in apps/desktop/src/preload.ts, apps/desktop/scripts/verify-preload-bundle.mjs, and apps/server/src/process/externalLauncher.test.ts named `t3code/no-global-process-runtime`. Marcode's plugin meta name is `marcode`, so the disables were inert against a rule configured at "error". Renamed. - oxlint-plugin-t3code/rules/no-mobile-uniwind-theme-escape-hatches.{ts,test.ts} landed in Marcode's renamed plugin directory; the test asserted `t3code/` rule ids. Renamed to `marcode/`, registered the rule in vite.config.ts at upstream's "error" level (lint is clean on apps/mobile/src). - apps/server/src/server.test.ts — upstream's new bootstrap tests carried `t3code/bootstrap-refName` fixtures into a file where Marcode had renamed every sibling to `marcode/`. Normalized. - apps/web/src/connection/clientMetadata.ts — new upstream helper shipped user-visible "T3 Code Desktop" / "T3 Code Web" connection labels. Rebranded; platform.ts now delegates to it instead of building metadata inline, so the fork keeps upstream's device/OS/browser detection. Android adaptive launcher icon (upstream pingdotgg#4332): Upstream's fix is real — a universal export used as an adaptive foreground makes Android draw a rounded square inside the launcher mask — but its new asset is the T3 wordmark. Took the fix and derived the foreground from Marcode's own mark instead: apps/mobile/assets/android-icon-foreground.png is android-icon-mark.png scaled into Android's 264px adaptive safe zone by the new scripts/android-adaptive-foreground.ts. Dropped upstream's wordmark SVG, rewrote the assets/README.md section it added, and kept Marcode's per-variant androidAdaptiveBackgroundColor values. Marcode surfaces upstream still ships: - apps/web/src/components/files/{FileBrowserPanel,FilePreviewPanel}.tsx stay deleted, and ChatView keeps no right-panel `file`/`files` branch: the floating editor is Marcode's only file-editing surface. ChatMarkdown keeps openFileInFloatingEditor and drops upstream's useRightPanelStore import. - apps/web/src/components/sidebar/SidebarChrome.tsx stays Marcode's bare Electron drag strip. Upstream's only change here (pingdotgg#8168) adds a footer Back button for project settings; Marcode's FloatingPillNav is always present, so there is no page to get stuck on. - apps/mobile/src/components/T3Wordmark.tsx stays deleted; CompactBrandTitle and HomeHeader keep MarcodeMark. CompactBrandTitle does adopt upstream's Uniwind class refactor (which also removes a useThemeColor escape hatch the new lint rule would flag) while keeping Marcode's conditional stage pill — Marcode's production stage label is empty, so the pill must stay guarded. - apps/web/src/components/ThreadTerminalDrawer.tsx keeps Marcode's xterm link provider. Upstream's pingdotgg#7488 fix (only treat real URLs as clickable) lands via the shared isTerminalUrl predicate in terminal-links.ts, which Marcode's collectMatches already applies. Renumbered and combined: - Migrations: upstream's 042_ProjectionThreadLinkedPullRequest and 043_ProjectionThreadsUnsettledAt become Marcode's 043 and 044, since 033_ProjectWorkspaceLayout already offsets the shared registry by one. Updated the migration test's toMigrationInclusive ids to match. - Capability flags workspaceLayoutMutations and threadPullRequestLinking both kept, in contracts and ServerEnvironment plus their tests. - bootService: launchd plist gets upstream's PATH export and keeps Marcode's MARCODE_HOME key; both the PATH test and Marcode's MARCODE_HOME regression test now run against the new render signature. - Composer: ChatView adopts upstream's ComposerSurface.Shell/Host (its closing tags merged in cleanly) and passes Marcode's transparency through the single chat-composer-glass-shell-transparent class, which only lowers --glass-opacity. - KeybindingsSettings adopts upstream's extracted WarningTooltipIcon and BrowserKeybindingNotice with Marcode's copy. - OpenInPicker keeps Marcode's FolderOpenFilled icon and drops the inline label upstream moved into editorLabelForPlatform. - useHandleNewThread keeps Marcode's workspace placement and adopts upstream's resolveModelSelectionOverride, which subsumes the carried-selection branch. - ChatView: dropped the duplicate handleNewThread upstream added above Marcode's existing declaration, kept useThreadActions. - Storage keys and schemes stay Marcode's (composer drafts, provider-update dismissals, marcode: CSP scheme); composer draft storage takes upstream's version bump to 9. - Mobile dev scripts take upstream's --clear split (dev:client:reset) on Marcode's marcode-* schemes. - threadSidebarWidth.test.ts: upstream deleted the file as trivial layout coverage and un-exported THREAD_SIDEBAR_DEFAULT_WIDTH. Kept only the two assertions Marcode depends on, including the pin that the sidebar header carries no brand. - pnpm-lock.yaml regenerated with pnpm against the merged package.json set. Neither coupled subtree needs syncing: the effect catalog version is unchanged and infra/relay/package.json is untouched (only Clerk and Expo moved). Verified: typecheck clean for contracts, shared, client-runtime, web, server, desktop, mobile, and scripts; oxlint clean (only the documented no-native-title-tooltip warn seam); focused tests pass for bootService, ServerEnvironment, theme, serviceLauncher, migrations, settings, environment, ElectronProtocol, clientMetadata, mobileBranding, threadSidebarWidth, Sidebar.logic, KeybindingsSettings.logic, composerDraftStore, MessagesTimeline, ChatMarkdown, markdown-links, terminal-links, editor-surface, build-desktop-artifact, the oxlint rule suite, and the upstream-sync suites. server.test.ts passes 138/139 and theme.test.ts 21/25; the five failures are all chmod-based permission tests that a root container cannot exercise (verified: this container writes into a 0o555 directory).
…ling window Test Server 2 failed on the sync merge: Migrations.test.ts asserts the registry tail, and appending upstream's renumbered 043/044 pushed ProjectWorkspaceLayout out of its fixed `slice(-10)` window. Added the two new entries, and anchored the assertion at id 33 rather than a trailing slice. The window was self-defeating: each upstream migration shifted it forward by one, so it would eventually have stopped asserting the migration 33 pin the test exists for, without ever failing.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Upstream's environment-published-themes feature (pingdotgg#8569) is new in this sync, so its test merged in with no conflict. It seeds localStorage with `t3code:theme`, but Marcode renamed the selected-theme key to `marcode:theme` in useTheme.ts while leaving the auxiliary theme keys upstream-shaped. With no stored selection to find, nothing the suite published was ever resolved and every assertion read back the default appearance — four failures in the Test job. Seeded the key Marcode actually reads, and marked the seam. The feature itself is unaffected: useEnvironmentTheme.ts resolves through useTheme rather than touching localStorage, so only the fixture was wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Merges 129 upstream commits,
f035a0f4..9b2d0431(pingdotgg/t3code@9b2d04317c68233782e0630464ac86d77d0686f3, "fix(mobile): replace Callstack glass with Expo glass (pingdotgg#8862)"), intomainas one two-parent merge commit, plus two follow-up commits fixing what CI caught. 39 paths conflicted; every one was resolved by hand, combining both intents. This supersedes the older open sync PRs (#53, #55, #56, #58, #61, #63) — they all target the samemainSHA and are subsets of this delta — and resolves theupstream-sync-blockedissue #64.Fork-boundary breaks that merged cleanly
These produced no conflict marker and would have shipped broken. The last two were caught by CI rather than by review — both in code that is brand new from upstream, so there was nothing to conflict with:
t3 themecommand readT3CODE_HOME; every other Marcode CLI command readsMARCODE_HOME, soMARCODE_HOME=… t3 theme setwould silently target the default installapps/server/src/cli/theme.ts// oxlint-disable-next-line t3code/no-global-process-runtimecomments (preload.ts,verify-preload-bundle.mjs,externalLauncher.test.ts) — Marcode's plugin meta name ismarcode, so they were inert against a rule at"error"marcode/no-mobile-uniwind-theme-escape-hatchesrule landed in Marcode's renamed plugin dir witht3code/rule ids in its testvite.config.tsat upstream's"error"level;vp lint apps/mobile/srcis cleant3code/bootstrap-refNameintoserver.test.ts, where Marcode had renamed every sibling tomarcode/apps/web/src/connection/clientMetadata.tsshipped user-visible "T3 Code Desktop" / "T3 Code Web" connection labelsplatform.tsnow delegates to the helper so the fork keeps upstream's device/OS/browser detectionlocalStoragewitht3code:theme, but Marcode renamed the selected-theme key tomarcode:themeinuseTheme.ts. With no stored selection, nothing the suite published resolved and every assertion read back the default appearance — 4 failuresuseEnvironmentTheme.tsresolves throughuseThemerather than touchinglocalStorage, so only the fixture was wrongMigrations.test.tspins the registry tail via a fixedslice(-10)window; appending the renumbered 043/044 pushedProjectWorkspaceLayoutout of itAndroid adaptive launcher icon (upstream pingdotgg#4332)
Upstream's fix is real — a universal export used as an adaptive foreground makes Android draw a rounded square inside the launcher mask — but its new asset is the T3 wordmark. Took the fix, derived the foreground from Marcode's own mark:
apps/mobile/assets/android-icon-foreground.pngisandroid-icon-mark.pngscaled into Android's 264px adaptive safe zone by the newscripts/android-adaptive-foreground.ts. Dropped upstream's wordmark SVG, rewrote theassets/README.mdsection it added, kept Marcode's per-variantandroidAdaptiveBackgroundColorvalues.Marcode surfaces upstream still ships
components/files/{FileBrowserPanel,FilePreviewPanel}.tsxstay deleted, andChatViewkeeps no right-panelfile/filesbranch — the floating editor is Marcode's only file-editing surface.ChatMarkdownkeepsopenFileInFloatingEditorand drops upstream'suseRightPanelStoreimport.sidebar/SidebarChrome.tsxstays Marcode's bare Electron drag strip. Upstream's only change here (fix(web): add back button to project settings pingdotgg/t3code#8168) adds a footer Back button for project settings;FloatingPillNavis always present in Marcode, so there is no page to get stuck on.T3Wordmark.tsxstays deleted;CompactBrandTitleandHomeHeaderkeepMarcodeMark.CompactBrandTitledoes adopt upstream's Uniwind class refactor (which also removes auseThemeColorescape hatch the new lint rule would flag) while keeping Marcode's conditional stage pill — Marcode's production stage label is empty, so an unguarded pill would ship blank.ThreadTerminalDrawer.tsxkeeps Marcode's xterm link provider. Upstream's fix(web): make terminal links appear clickable only when clickable pingdotgg/t3code#7488 fix lands via the sharedisTerminalUrlpredicate interminal-links.ts, which Marcode'scollectMatchesalready applies.Renumbered and combined
042_ProjectionThreadLinkedPullRequestand043_ProjectionThreadsUnsettledAtbecome Marcode's 043 and 044 (033_ProjectWorkspaceLayoutoffsets the shared registry by one). Migration testtoMigrationInclusiveids updated to match.workspaceLayoutMutationsandthreadPullRequestLinkingboth kept, in contracts andServerEnvironmentplus tests.PATHexport and keeps Marcode'sMARCODE_HOMEkey; both the new PATH test and Marcode'sMARCODE_HOMEregression test run against the new render signature.ChatViewadopts upstream'sComposerSurface.Shell/Host(its closing tags merged cleanly) and passes Marcode's transparency through the singlechat-composer-glass-shell-transparentclass, which only lowers--glass-opacity.KeybindingsSettingsadopts upstream's extractedWarningTooltipIcon/BrowserKeybindingNoticewith Marcode's copy.OpenInPickerkeeps Marcode'sFolderOpenFilledand drops the inline label upstream moved intoeditorLabelForPlatform.useHandleNewThreadkeeps Marcode's workspace placement and adopts upstream'sresolveModelSelectionOverride. Dropped a duplicatehandleNewThreadupstream added above Marcode's existing declaration.marcode:CSP scheme); composer draft storage takes upstream's version bump to 9. Mobile dev scripts take upstream's--clearsplit (dev:client:reset) on Marcode'smarcode-*schemes.threadSidebarWidth.test.ts: upstream deleted the file as trivial layout coverage and un-exportedTHREAD_SIDEBAR_DEFAULT_WIDTH. Kept only the two assertions Marcode depends on, including the pin that the sidebar header carries no brand.pnpm-lock.yamlregenerated with pnpm against the mergedpackage.jsonset. Neither coupled subtree needs syncing: theeffectcatalog version is unchanged andinfra/relay/package.jsonis untouched (only Clerk and Expo moved).Why
Scheduled daily upstream sync. The delta had conflicts, so the bot pushed nothing and filed #64; this is the hand-resolved integration branch that runbook calls for.
UI Changes
No screenshots — this ran headless with no browser. Three areas need a runtime pass before this leaves draft:
ComposerSurfaceinstead of Marcode's inline glass shell. Worth checking the draft hero and the context strip at 390px and 820px.CompactBrandTitlemoved to Uniwind classes; confirm the stage pill still hides in production builds.Reviewed but deliberately left alone
microphonePermission, theme-file error, OpenCode adapter errors) match the existing unbranded convention in those same files —app.config.tsalready ships "T3 Code Dev" andpair.tsalready says "No running T3 Code server found." Rebranding just the new ones would be inconsistent, andAGENTS.mdsays not to mass-replace internalT3identifiers.$HOME/.t3/wsl-runtimeinside the distro (upstream fix(desktop): Cache Runtime locally on WSL Filesystem, dramatically improving launch times pingdotgg/t3code#5769). Self-consistent and functional, but inconsistent with Marcode's~/.marcodehome — your call whether to rename.ComposerSurfaceleaves most of Marcode's.chat-composer-*block inindex.cssdead (only-transparentand-horizontal-insetare still referenced). Left in place rather than pruning ~470 lines of CSS I cannot visually verify here; worth a follow-up..chat-timeline-scroll-fade/.settings-page-scroll-fade/.pull-requests-scroll-fadeblock was already dead before this merge and now also references--topbar-scroll-fade-height, which upstream renamed. Pre-existing, flagged not fixed.T3_BOOT_SERVICE_UNIT,T3_SERVICE_LAUNCHER_CONTEXT,@t3tools/*, thet3package/CLI name,com.t3tools.t3code.service.WORKTREE_BRANCH_PREFIXis stillmarcode;BOOT_SERVICE_NAMEstill yieldsmarcode.service.Checklist
Verification
Typecheck clean:
contracts,shared,client-runtime,web,server,desktop,mobile,scripts.vp lintclean apart from the documentedno-native-title-tooltipwarn seam.vp fmt --checkclean.Full suites run locally after the fixes: web 3283/3283, client-runtime 790/790, contracts all green, persistence 21/21 files.
Six tests fail in this container but pass in CI, all for the same reason — the container runs as root, so the
chmod-based guards they rely on cannot fire (verified directly: it writes into a0o555directory). Four intheme.test.ts, one inserver.test.ts, one inupdate-release-package-versions.test.ts. Separately,packages/shared/src/Net.test.tsfails here on port allocation; I proved it pre-existing by running the byte-identical file atmain(133f3f73) in a throwaway worktree, where it fails the same way. CI passes all of these.