chore(upstream): sync marcode through c163d502 - #72
Closed
maarco wants to merge 470 commits into
Closed
Conversation
…9146) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
…dotgg#9075) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…9166) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.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: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Simone <185146821+Lucenx9@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>
…ingdotgg#9191) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Defer the draft walk and JSON serialization until the storage write flushes. Preserve hydration, migrations, attachment verification, and final flushes. Continues the web portion of [pingdotgg#9049](pingdotgg#9049). The mobile storage migration remains separate. Created with GPT-6 Astra (preview) in Codex. Co-authored-by: Wout Stiens <71498452+StiensWout@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
466 upstream commits, 89 conflicted paths. Every conflict was resolved by combining both intents; no path was taken wholesale from one side except where one side had nothing to contribute. Conflict decisions ------------------ Fork identity and service lifecycle - bootService: kept Marcode's `marcode.service` unit and the plist's MARCODE_HOME key (the launcher's resolveLauncherBaseDir reads it and exits without it); took upstream's new PATH export and --allow-downgrade flow. The service-stopped hint now interpolates BOOT_SERVICE_UNIT_FILE instead of hardcoding upstream's unit name. - cli/service, cli/connect: kept Marcode branding, took upstream's installedVersion reporting and serviceReconcileFlags. - RuntimeInstructions: took upstream's shared runtime_info producer and moved Marcode's product name into it, so Codex, Claude, Cursor and Antigravity all report the fork correctly. Its test now asserts Marcode and rejects "T3 Code". Persistence - Migrations: Marcode owns id 33, so upstream's 042-047 were renumbered to 043-048 on the way in. Migrations.test.ts pins the full renumbered tail. Orchestration - projector: git aligned upstream's project.meta-updated body against Marcode's project.workspace-layout-applied case. Split them apart and landed upstream's autoPull/projectIcon fields where they belong. - commandInvariants: took upstream's removal of the now-unused requireNonNegativeInteger; kept Marcode's workspace-layout block. - ServerEnvironment: capability set is the union of both sides. - WorkspaceFileSystem: kept Marcode's mutation-target canonicalization and took upstream's absolute-path read resolution. Web - rightPanelStore and RightPanelTabs: kept Marcode's retirement of the file/files surfaces (the floating editor owns file editing) and took upstream's live pull-request tab icon, browser profile submenu and tab scroll arrows alongside Marcode's surface-overflow menu. - ChatMarkdown: adopted upstream's panelPath prop rename and media fallback; file opens still land in the floating editor. - ChatView: took upstream's composer shell extraction, panel animations, agent-browser close confirmation and paste-to-focus; kept Marcode's pill-nav portal, ambient effects and right-panel terminal reconcile. - ChatHeader: kept Marcode's portaled action cluster; upstream's header title action menu stays unmounted, as the existing fork seam records. - ThreadTerminalDrawer: Marcode keeps its xterm surface, so upstream's Ghostty rewrite of this file is not taken. This divergence is re-ported by hand each sync by design. - index.css: Marcode's dark palette is a strict superset of upstream's block. Mobile, desktop, marketing - Kept MarcodeMark, marcode-* dev-client schemes, MARCODE_IOS_PERSONAL_TEAM and the black-on-white adaptive icon; took upstream's runtime version policy, dev-client reset script and tablet/phone client detection. - Followed upstream's uniwind migration for the mobile stage pill, since their new lint rule bans the useThemeColor escape hatch it used. - Marketing: took upstream's responsive hero image pipeline and moved Marcode's branded mark into src/assets so the Astro <Image> pipeline serves it. Breaks that merged cleanly and produced no conflict --------------------------------------------------- - vite.config.ts: upstream's new lint overrides named the t3code plugin; Marcode's is marcode. Same for five oxlint-disable directives. - Upstream's new CLI commands (t3 app, t3 theme) read T3CODE_HOME; Marcode's base-dir variable is MARCODE_HOME everywhere else in the CLI. - updatesTestHarness exported T3CODE_* env names the desktop never reads. - app.test.ts rebuilt the CLI's default base dir as `.t3`; Marcode's is `.marcode`, so the fake desktop listened on a socket the CLI never dialed. - ProviderCommandReactor.test.ts hardcoded a `t3code/<hex>` placeholder branch, which stopped being placeholder-shaped once WORKTREE_BRANCH_PREFIX became `marcode`. It now derives the prefix from the constant. - BrowserSession/BrowserImport tests pinned `persist:t3code-preview-`. - DesktopRemoteUpdates.test.ts asserted T3CODE_DISABLE_AUTO_UPDATE. - RuntimeInstructions.test.ts and clientMetadata asserted upstream's product name; 32 newly introduced user-visible strings were rebranded. - fileSaveCoordinator: upstream's stale-write fix changed persistLatest's entry guard, silently breaking Marcode's cancel() invariant. cancel() now bumps a generation counter so an in-flight write cannot confirm a discarded buffer. - vite-plus 0.2.2 -> 0.3.0 resolves package entries strictly, exposing a broken `main` in @aliimam/icons (a Marcode-only dependency). Patched like the repo's other dependency fixes. Coverage kept ------------- - threadSettled.test.ts: upstream deleted it wholesale when settling moved server-side, taking the only coverage of hasQueuedTurnStart with it. Trimmed to that surviving suite instead. - threadSidebarWidth.test.ts, mobileBranding.test.ts and Marcode's terminal selection tests were kept where upstream deleted them. - rightPanelStore.test.ts now also pins the absence of openAttachment. Coupled subtrees ---------------- effect stayed at 4.0.0-beta.103 and infra/relay/package.json did not move, so neither vendored subtree needed a sync. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JurM2fqYGVdQXriLvYuQ49
The upstream merge bumps vite-plus 0.2.2 -> 0.3.0, which brings oxfmt 0.64.0. The newer formatter collapses this single-argument Effect.map call differently, so a file the merge never touched started failing `vp check`. Formatting only, no behavior change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JurM2fqYGVdQXriLvYuQ49
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. |
Four more breaks the merge introduced without a conflict, all caught by CI.
Migration ids are pinned numerically. Renumbering upstream's 042-047 onto
Marcode's free ids renamed the files and the layer() titles, but their
tests select migrations through `runMigrations({ toMigrationInclusive })`,
which still carried upstream's numbers. The ClearAutomaticProjectModelDefaults
suite lives inside 016_CanonicalizeModelSelections.test.ts, so the file
rename never reached its title or bounds either.
Telemetry opt-out was not being exercised. AnalyticsService reads
MARCODE_TELEMETRY_ENABLED and defaults it to true; upstream's new
disabled-path test set T3CODE_TELEMETRY_ENABLED, which the service ignores.
Telemetry stayed on and the test saw a real PostHog batch request. This is
the one break here that was a live behavior gap rather than a stale string.
Three suites still asserted product strings this sync rebranded:
pullRequestDiffHttp, DesktopAppUpdate, and ClaudeAdapter's runtime_info.
Verified with the full apps/server suite (3769 passing) plus the
client-runtime tests. The 7 remaining local failures are all chmod-based
permission assertions that cannot fail under this container's root user
and pass on CI's non-root runner.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JurM2fqYGVdQXriLvYuQ49
Two more upstream tests seeded browser storage under upstream's key names, so the modules under test never saw the fixture: - clientPersistenceStorage's new diff-layout case wrote "t3code:client-settings:v1"; the module reads "marcode:client-settings:v1", which the file's three other cases already use. - useEnvironmentThemeSync seeded "t3code:theme"; useTheme reads "marcode:theme", so the stored theme was never found and appearance stayed dark. Only these two keys are Marcode-renamed. The rest of the theme keys (t3code:themes:v1, :theme-follow-system, :theme-appearance-mode, :theme-halves:v1) stay upstream-shaped and agree between index.html and themePalette.ts, so they are left alone. Verified with the full apps/web suite: 3905 passing. The two remaining local failures are the Ghostty wasm `?inline` imports, which fail only in this container -- CI's Test job reports neither. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JurM2fqYGVdQXriLvYuQ49
4 tasks
Owner
Author
|
Superseded by merged PR #74. |
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
pingdotgg/t3code@c163d502dd32b993c03d8c20a5fae55b159bd8dcintomainas a normal two-parent merge commit: 466 upstream commits, 89 conflicted paths.Every conflict was resolved by hand, combining both intents. No path was taken wholesale from one side except where one side contributed nothing.
CI is green on
38d51a48—Check,Test,Mobile Native Static AnalysisandRelease Smokeall pass, plusTest Server 1/2/3,Rust,claude-reviewand the native fingerprint checks. Mergeable, no conflicts. Left as a draft deliberately: runtime verification is still outstanding (see below) and the three carry-forwards want a maintainer decision.Conflict decisions
Fork identity and service lifecycle
bootService: kept Marcode'smarcode.serviceunit and the plist'sMARCODE_HOMEkey —resolveLauncherBaseDirreads it and exits without it. Took upstream's newPATHexport and--allow-downgradeflow. The service-stopped hint now interpolatesBOOT_SERVICE_UNIT_FILErather than hardcoding upstream's unit name.cli/service,cli/connect: kept Marcode branding, took upstream'sinstalledVersionreporting andserviceReconcileFlags.RuntimeInstructions: took upstream's sharedruntime_infoproducer and moved Marcode's product name into it, so Codex, Claude, Cursor and Antigravity all report the fork correctly. Its test now asserts Marcode and rejects"T3 Code".Persistence — Marcode owns migration id 33, so upstream's
042–047were renumbered to043–048on the way in.Migrations.test.tspins the full renumbered tail.Orchestration
projector: git aligned upstream'sproject.meta-updatedbody against Marcode'sproject.workspace-layout-appliedcase. Split them apart and landed upstream'sautoPull/projectIconfields where they belong.commandInvariants: took upstream's removal of the now-unusedrequireNonNegativeInteger; kept Marcode's workspace-layout block.ServerEnvironment: capability set is the union of both sides.WorkspaceFileSystem: kept Marcode's mutation-target canonicalization, took upstream's absolute-path read resolution.Web
rightPanelStore/RightPanelTabs: kept Marcode's retirement of thefile/filessurfaces; took upstream's live pull-request tab icon, browser profile submenu, and tab scroll arrows alongside Marcode's surface-overflow menu.ChatMarkdown: adopted upstream'spanelPathprop rename and media fallback; file opens still land in the floating editor.ChatView: took upstream's composer shell extraction, panel animations, agent-browser close confirmation and paste-to-focus; kept Marcode's pill-nav portal, ambient effects and right-panel terminal reconcile.index.css: Marcode's dark palette is a strict superset of upstream's block.Mobile / desktop / marketing — kept
MarcodeMark,marcode-*dev-client schemes,MARCODE_IOS_PERSONAL_TEAM, and the black-on-white adaptive icon; took upstream's runtime version policy, dev-client reset script and tablet/phone detection. Followed upstream's uniwind migration for the mobile stage pill (their new lint rule bans theuseThemeColorescape hatch it used). Marketing took upstream's responsive hero pipeline, with Marcode's branded mark moved intosrc/assetsso the Astro<Image>pipeline serves it.Breaks that merged cleanly and produced no conflict
The dangerous ones — each would have shipped silently. Ten found before pushing:
vite.config.tslint overrides named thet3codeplugin; Marcode's ismarcodeoxlint-disabledirectives)t3 appandt3 themereadT3CODE_HOMEMARCODE_HOMEupdatesTestHarnessexportedT3CODE_*env namesapp.test.tsrebuilt the default base dir as.t3.marcode; the fake desktop listened on a socket the CLI never dialedProviderCommandReactor.test.tshardcodedt3code/<hex>WORKTREE_BRANCH_PREFIX = "marcode"; now derived from the constantBrowserSession/BrowserImporttests pinnedpersist:t3code-preview-DesktopRemoteUpdates.test.tsassertedT3CODE_DISABLE_AUTO_UPDATEpersistLatest's entry guardcancel()invariant —cancel()now bumps a generation counter so an in-flight write cannot confirm a discarded buffer0.2.2 → 0.3.0resolves entries strictlymainin@aliimam/icons(Marcode-only dep); patched like the repo's other dependency fixesWhat CI caught that local verification did not
Four further rounds, all the same class. Recorded because the pattern is the lesson: scoped local checks cannot catch a break in a file the merge never touched.
CheckprojectWorkspace.ts— a file this merge never touched, so a changed-files-onlyfmt --checkcould not see itTest Server 1/2/3,TesttoMigrationInclusive), which the renumbering missed; theClearAutomaticProjectModelDefaultssuite lives inside016_CanonicalizeModelSelections.test.ts, so the file rename never reached its title or bounds eitherTest Server 3AnalyticsServicereadsMARCODE_TELEMETRY_ENABLEDand defaults it totrue, but upstream's new disabled-path test setT3CODE_TELEMETRY_ENABLED. Telemetry stayed on and the test saw a real PostHog batch request go out. The one live behavior gap in this set, not a stale stringTestclientPersistenceStorageseededt3code:client-settings:v1(module readsmarcode:, as the file's three other cases already do);useEnvironmentThemeSyncseededt3code:theme(useThemereadsmarcode:theme), so the stored theme was never foundOnly
marcode:themeandmarcode:client-settings:v1are Marcode-renamed storage keys. The other theme keys (t3code:themes:v1,:theme-follow-system,:theme-appearance-mode,:theme-halves:v1) stay upstream-shaped and agree betweenindex.htmlandthemePalette.ts, so they were left alone.Coverage kept where upstream deleted it
threadSettled.test.ts: upstream deleted it wholesale when settling moved server-side, taking the only coverage ofhasQueuedTurnStartwith it. Trimmed to that surviving suite instead of deleting.threadSidebarWidth.test.ts,mobileBranding.test.tsand Marcode's terminal-selection tests kept.rightPanelStore.test.tsnow also pins the absence ofopenAttachment.Coupled subtrees
effectstayed at4.0.0-beta.103andinfra/relay/package.jsondid not move, so neither vendored subtree needed async:repos.Why
Scheduled daily upstream sync. The delta was large enough to conflict, so this is the hand-resolved integration the runbook calls for in place of the bot's clean-merge branch.
Needs a maintainer decision
Four things, none blocking CI:
ChatHeader— Marcode portals thread actions intoFloatingPillNav, so upstream's header title action menu, inline rename, project favicon and project icon stay unmounted. This preserves the fork seam an earlier sync recorded, but it is now a larger upstream feature to keep declining.ThreadTerminalDrawer— Marcode keeps its xterm surface, so upstream's Ghostty rewrite of this file is not taken. Re-ported by hand each sync by design; flagging that the divergence keeps growing.filesurface. Marcode retired that surface and has no attachment preview host, so these now fall through to the download path. Marked with a fork seam comment.@aliimam/icons—apps/web/vite.config.tsalready carries a Marcoderesolve.aliaspointing the package at its ESM build, for exactly the broken-mainproblem the newpatches/@aliimam__icons@1.1.3.patchalso fixes. The patch was needed for the failure hit here, but one of the two is probably redundant and worth collapsing rather than maintaining both.UI Changes
No screenshots. This sync introduces no Marcode-authored UI, and the scheduled run had no browser available. Web and mobile runtime verification per the sync runbook is still outstanding —
test-t3-appandtest-t3-mobileshould be driven before this leaves draft, since the merge touchedChatView,RightPanelTabs,ChatMarkdown, the composer shell and the mobile brand lockup.Verification
contracts,shared,t3(server),client-runtime,web,desktop,mobile,scripts,marketing,oxlint-plugin-marcodeapps packages scripts oxlint-plugin-marcodevp check: exit 0 (0 errors; the 695 warnings are pre-existing)apps/server(3,769 passing), fullapps/web(3,905 passing), plusclient-runtime,contracts,shared, desktop, mobile, oxlint plugin and scriptsFailures seen only in the scheduled runner's container, each verified as environmental and confirmed absent from CI:
cli/theme.test.ts,keybindings,terminal/Manager,server.test.ts,update-release-package-versions) — the container runs as root, which ignores0o000/0o400/0o555. Verified directly by writing into a0555directory as root.browser-secret-native.test.mjsneedslibsecret-1-dev, absent there; this PR adds that install step to CI (upstream's, merged alongside Marcode's ripgrep step).?inlinewasm imports (core.test.ts,runtimeAbi.test.ts) — fail only in that container; CI'sTestjob reports neither, on files this merge did not change..github/scripts/thread-transfer-report.test.cjsis anode:testfile the vitest runner does not collect; passes undernode --test(6/6).Thread transfer impact stays within every enforced ceiling (see the bot comment).
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01JurM2fqYGVdQXriLvYuQ49