chore(upstream): sync marcode through 061543e9 - #78
Conversation
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…dotgg#10463) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…ccount (pingdotgg#10462) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
… second one (pingdotgg#10440) Co-authored-by: Claude Code <noreply@anthropic.com>
…ed (pingdotgg#10435) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…dotgg#10019) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…diff fallback (pingdotgg#9828) Co-authored-by: James <jamescollard2005@gmail.com>
… update depth errors (pingdotgg#7138) Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…banners (pingdotgg#10635) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: codex <codex@users.noreply.github.com>
…ngdotgg#10705) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…here else (pingdotgg#10712) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…#10713) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…not drift (pingdotgg#10714) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…them (pingdotgg#10501) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Merges 110 upstream commits (52b2bf7..061543e) into Marcode. 35 paths conflicted; each was resolved by hand, combining upstream's intent with Marcode's. Notable upstream work in this delta: the Effect rc.112 / Alchemy beta.76 upgrade, TypeScript 7.0.2, cross-platform window capture (SnapShot), a rewritten multi-computer onboarding wizard, the devcontainer, and a batch of knip export classifications. Conflict decisions ------------------ Effect rc.112 renamed `Schema.TaggedErrorClass` to `Schema.TaggedError`. Marcode-owned error classes follow the rename (contracts/project.ts, WorkspaceFileSystem.ts, scripts/upstream-sync*.ts). .devcontainer/devcontainer.json — took upstream's real devcontainer (ubuntu-24.04 base, node/rust/gh features, cache volumes, on-create and update-content scripts, forwarded ports) and applied Marcode identity: name, MARCODE_HOME -> .marcode (upstream's T3CODE_HOME would silently leave the container on the default home), watcher excludes. Kept the bun feature AGENTS.md relies on for bun:sqlite test-data seeding. package.json / scripts/package.json — kept Marcode's wider build filter, took upstream's icons:export:android script and its sharp dependency. `prepare` follows upstream: it dropped its own clean-tsgo-backups.mjs. contracts settings.ts/.test.ts, ChatView, MessagesTimeline.test, index.css, AgentSessionScanner.test — both sides added at the same spot; kept both. contracts/project.ts — kept Marcode's ProjectSearchContentError, applied the TaggedError rename. publicConfig.ts, codexLaunchArgs.ts, marcode-sqlite-state.ts — kept Marcode's names (__MARCODE_BUILD_*__, MARCODE_CODEX_LAUNCH_ARGS, marcode-sqlite-state) and took upstream's knip un-exporting. Migrations.ts — kept Marcode's `deployedMigrationEntries` split. No new upstream migration in this delta; ids stay unique and ordered. Desktop identity — upstream moved the Linux desktop entry name behind `resolveLinuxDesktopEntryName`. Took the refactor and made it emit marcode(.dev).desktop rather than com.t3tools.T3Code*.desktop: the filename lands in the user's applications dir, must not collide with a real T3 Code install, and DesktopSnapShot derives the Linux app id from it, which has to match `linuxWmClass`. Also took upstream's unification of the URL-handler entry with the main desktop entry. LAUNCHER_VERSION follows upstream (19) because the launcher logic is upstream's. electron-launcher.test.mjs — upstream moved captured env values out of the launcher script into the environment script; the MARCODE_* pin moved with them onto makeDevelopmentEnvironmentScript. WelcomeWizard.tsx — upstream rewrote onboarding into a shared multi-computer wizard (pingdotgg#10465, ~1200 lines). Took the rewrite and re-applied Marcode's diff on top: Marcode Connect naming, a text product mark instead of the T3Wordmark component Marcode deleted, and Marcode's TerminalViewport contract (no providerInstanceId/visible, needs onAddTerminalContext). useTheme.ts — upstream's rewrite turned onboarding into an overlay drawn over the workspace and deleted the document-wide onboarding theme. Marcode's dark-wizard override cannot survive that shape (it would darken the workspace behind the overlay), so it is removed rather than reworked and the seam is documented in the file. This retires a hotspot invariant and needs a product decision; see the pull request. rightPanelStore.ts — took upstream's PULL_REQUESTS_PANEL_REF; the storage key, version and isPullRequestsPanelKey stay in marcodeRightPanelPolicy.ts. Marcode's retired file/attachment surface was not reintroduced. SettingsSidebarNav.tsx — took upstream's pingdotgg#10705 removal of useRouterState/resolvedPathname, kept Marcode's useCanGoBack. apps/mobile/app.config.ts — kept Marcode's black-on-white release mark, took upstream's release splash icon and explicit absent background image. DMG backgrounds — upstream refreshed its installer artwork with a different viewBox and gradient ids. These are Marcode-branded assets; kept whole so the file stays internally coherent. apps/marketing/src/pages/95.astro — deletion kept; pinned by retiredRoutes.test.ts. docs/user/welcome-wizard.md — took upstream's rewritten content, applied Marcode naming. pnpm-lock.yaml — regenerated with pnpm 11.10.0; `pnpm install --frozen-lockfile` verifies it. Fork-boundary breaks that merged without a conflict --------------------------------------------------- - The GNOME capture extension only accepts D-Bus clients in CLIENT_NAMES. LinuxSnapShot requests `${appId}.SnapShot` where appId derives from linuxDesktopEntryName, so upstream's com.t3tools.T3Code names would have made the extension refuse every Marcode request. - The extension uuid and the KDE capture .desktop file were renamed so a Marcode install cannot overwrite or collide with a T3 Code install. - macOS Info.plist usage descriptions named "T3 Code" in prompts shown next to CFBundleDisplayName "Marcode". - CaptureShortcutConfig.test.ts carried an `oxlint-disable-next-line t3code/...` directive; Marcode's plugin is `marcode`, so the rule was not actually suppressed and lint failed on the dead directive. - Sidebar.tsx still read `projectCwdByKey` inside the unified-workspace seam after upstream's pingdotgg#10714 replaced it with `projectByKey`. - CommandPalette.logic.test.ts fixture predated Marcode's required workspaceLayoutVersion/workspaceLayout project fields. - docs/internals/devcontainer.md and .devcontainer/on-create.sh arrived documenting T3CODE_HOME and `.t3`. Upstream-shaped identifiers deliberately left alone: @t3tools/*, the `t3` CLI, T3_BOOT_SERVICE_UNIT, T3_SERVICE_LAUNCHER_CONTEXT, the com.t3tools.SnapShot D-Bus interface, t3code: client storage keys, and "T3 Code" strings inside upstream-owned desktop runtime messages, which Marcode already tolerates elsewhere. Coupled subtrees: pnpm-workspace.yaml and infra/relay/package.json both moved, and upstream's own pingdotgg#10653/pingdotgg#10654 brought .repos/effect-smol (4.0.0-rc.112) and .repos/alchemy-effect (2.0.0-beta.76) with them. No separate sync:repos needed. Verification ------------ Focused tests green across contracts, shared, server persistence / provider / project, desktop app + snapShot + gnome-extension, web store / theme / timeline / palette / sidebar / unified workspace, marketing retired routes, and scripts. Typecheck clean for contracts, shared, scripts, desktop, web, server, client-runtime, marketing, mobile. `vp fmt --check` and `vp lint` clean on the changed scope. One pre-existing-in-this-environment failure: scripts/dev-runner.test.ts "accepts a dry run without the optional browser flag" (new upstream test). It spawns the real dev-runner, which probes both 127.0.0.1 and ::1; this container has no IPv6 (::1 binds return EAFNOSUPPORT), so every port reads as unavailable. DEV_PORT_PROBE_HOSTS is untouched by this merge. Not verified here: live web and mobile client verification, which needs a browser and a simulator this environment does not have. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U3kz6cvULzXAHG2jfiVRWf
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: 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. |
The Check job failed on `knip:check` with seven unused exports. All seven are this merge's: upstream's pingdotgg#10282 added `apps/server` and `apps/desktop` to the `--exports` workspace list, and the merge took that widened scope, so exports that were never imported became visible for the first time. Six were dead and are now module-private, which is also how upstream declares the three it shares: - electron-launcher.mjs `APP_DISPLAY_NAME` / `APP_BUNDLE_ID`. The merge kept Marcode's `export` on the reasoning that Marcode exports them, but nothing ever imported either one — the `APP_DISPLAY_NAME` that web code imports is a different symbol in apps/web/src/branding.ts. Upstream has both as plain `const`. - http.ts `authenticateRawRouteWithScope`, used only by the route it sits next to. Upstream and the merge base both have it as `const`. - commandInvariants.ts `workspaceLayoutRejectionDetail`, `findWorkspaceLayoutEntryInAnyProject`, `isWorkspaceLayoutContainerKind`. Marcode-owned, each used only inside that module. The client-runtime reference to `workspaceLayoutRejectionDetail` is a doc comment naming the wire shape, not an import. The seventh, `defineMarcodeMigration`, keeps its export and gains a test. It is the constructor that holds the reserved >= 9000 namespace open, and its registry is deliberately empty, so it has no caller by design — the reason a future sync could renumber an applied migration is precisely that this reads as dead code. The test exercises the guard instead, which both gives the export a consumer and pins the invariant. Local verification had missed this because dependencies were installed with --ignore-scripts, so `prepare` never ran and `knip:check` was never part of the focused scope. Re-verified the way CI runs it: `vp run knip:check` clean, `vp check` 0 errors, and `vpr typecheck` clean across all 15 packages with the effect-tsgo patch applied and the Effect language-service diagnostics active. Migrations, commandInvariants, http, httpResponseErrorGuard, electron-launcher and projectWorkspace tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U3kz6cvULzXAHG2jfiVRWf
|
What Changed
Merges 110 upstream commits,
pingdotgg/t3code@52b2bf77..061543e9, intomainas one two-parent merge commit. 35 paths conflicted and were resolved by hand. One follow-up commit fixes a CI failure the merge caused (see Verification).Upstream work in this delta: Effect rc.112 / Alchemy beta.76, TypeScript 7.0.2, cross-platform window capture (SnapShot), a rewritten multi-computer onboarding wizard, a real devcontainer, and a batch of knip export classifications.
Conflict decisions
Schema.TaggedErrorClass→Schema.TaggedError. Marcode-owned error classes follow the rename..devcontainer/devcontainer.jsonMARCODE_HOME→.marcode, watcher excludes. Kept the bun feature AGENTS.md relies on forbun:sqliteseeding.package.json,scripts/package.jsonicons:export:android+ itssharpdep.preparefollows upstream (it dropped its ownclean-tsgo-backups.mjs).contracts/settings.{ts,test.ts},ChatView,MessagesTimeline.test,index.css,AgentSessionScanner.testcontracts/project.tsProjectSearchContentError; applied theTaggedErrorrename.publicConfig.ts,codexLaunchArgs.ts,marcode-sqlite-state.ts__MARCODE_BUILD_*__,MARCODE_CODEX_LAUNCH_ARGS,marcode-sqlite-state); took upstream's knip un-exporting.Migrations.tsdeployedMigrationEntriessplit. No new upstream migration in this delta; ids stay unique and ordered.resolveLinuxDesktopEntryName. Took the refactor, made it emitmarcode(.dev).desktop: the filename lands in the user's applications dir, must not collide with a real T3 Code install, andDesktopSnapShotderives the Linux app id from it (has to matchlinuxWmClass). Also took upstream's unification of the URL-handler entry with the main entry.LAUNCHER_VERSIONfollows upstream (19).electron-launcher.test.mjsMARCODE_*pin moved with it ontomakeDevelopmentEnvironmentScript.WelcomeWizard.tsxT3Wordmarkcomponent Marcode deleted, and Marcode'sTerminalViewportcontract.useTheme.tsrightPanelStore.tsPULL_REQUESTS_PANEL_REF; storage key/version/isPullRequestsPanelKeystay inmarcodeRightPanelPolicy.ts. The retired file/attachment surface was not reintroduced.SettingsSidebarNav.tsxuseRouterState/resolvedPathname; kept Marcode'suseCanGoBack.apps/mobile/app.config.tsapps/marketing/src/pages/95.astroretiredRoutes.test.ts.docs/user/welcome-wizard.mdpnpm-lock.yamlpnpm install --frozen-lockfileverifies it.Fork-boundary breaks that merged without a conflict
These are the dangerous ones — clean merges that would have shipped broken:
CLIENT_NAMESonly allowedcom.t3tools.T3Code(.Development).SnapShot, butLinuxSnapShotrequests${appId}.SnapShotwhereappIdderives fromlinuxDesktopEntryName—marcodehere..desktopfile renamed so a Marcode install cannot overwrite or collide with a T3 Code install.CFBundleDisplayName"Marcode".CaptureShortcutConfig.test.tscarried anoxlint-disable-next-line t3code/…directive; Marcode's plugin ismarcode, so the rule was never suppressed and lint failed on the dead directive.Sidebar.tsxstill readprojectCwdByKeyinside the unified-workspace seam after upstream's refactor(web): pass the project record to ProjectFavicon so icons cannot drift pingdotgg/t3code#10714 replaced it withprojectByKey.CommandPalette.logic.test.tsfixture predated Marcode's requiredworkspaceLayoutVersion/workspaceLayout.docs/internals/devcontainer.mdand.devcontainer/on-create.sharrived documentingT3CODE_HOMEand.t3.Upstream-shaped identifiers deliberately left alone:
@t3tools/*, thet3CLI,T3_BOOT_SERVICE_UNIT,T3_SERVICE_LAUNCHER_CONTEXT, thecom.t3tools.SnapShotD-Bus interface,t3code:client storage keys, and "T3 Code" strings inside upstream-owned desktop runtime messages (which Marcode already tolerates elsewhere).Coupled subtrees:
pnpm-workspace.yamlandinfra/relay/package.jsonboth moved, and upstream's own pingdotgg#10653/pingdotgg#10654 brought.repos/effect-smol(4.0.0-rc.112) and.repos/alchemy-effect(2.0.0-beta.76) with them. Verified matching; no separatesync:reposneeded.Why
Scheduled fork sync. Upstream ships correctness, security, protocol and dependency fixes that Marcode should carry; the fork's job at merge time is to take those while preserving Marcode's intentional product behavior at every seam.
.github/upstream-sync.ymlrecords the invariant "Marcode intentionally keeps the onboarding wizard dark while retaining upstream theme plumbing." This merge retires it, and that should be a deliberate call rather than a silent one.Upstream's pingdotgg#10465 turned onboarding into a Dialog overlay drawn over the workspace and deleted the document-wide onboarding theme (
mountOnboardingTheme,data-onboarding-surface,isOnboardingThemeActive). Marcode's override cannot survive that shape — a document-wide dark palette would now darken the workspace behind the overlay, not just the wizard. It is removed rather than reworked, and the reasoning is documented at the seam inapps/web/src/hooks/useTheme.ts.The wizard now follows the app theme. Reinstating a dark wizard means scoping it to the dialog and its portals. That is a design change, and it wants visual verification this environment cannot do — so it was left out rather than guessed at.
UI Changes
No before/after images: this environment has no browser or simulator. The user-visible surfaces this merge touches and that still want live verification are the rewritten onboarding wizard (including the theme question above), the sidebar after upstream's
ProjectFaviconrefactor, and the right panel.Checklist
Verification
CI is green on
da895a05— all four required checks plus the rest of the run:Check,Test,Test Server 1/2/3,Rust,Release Smoke,Mobile Native Static Analysis,Mobile Native Changes.The only red check is
claude-review, which has failed on every run of that workflow since pingdotgg#83 — ten of them before this branch existed, across three unrelated branches. The review agent never starts (zero turns, zero cost, emptymodelUsage), so it is not a finding about this diff; it needssecrets.CLAUDE_CODE_OAUTH_TOKENrotated. Re-run once on6659f3bato confirm; details in this comment.claude-reviewis not amongrequiredPullRequestChecks.One follow-up commit was needed
6659f3ba(the merge) failedCheckonknip:checkwith seven unused exports — genuinely this PR's. Upstream's pingdotgg#10282 addedapps/serverandapps/desktopto knip's--exportsscope, and this merge took that widened scope, so exports nothing had ever imported became visible for the first time. Fixed inda895a05: six were dead and are now module-private (three of them matching how upstream already declares them, including the twoelectron-launcher.mjsconstants this PR had initially kept exported on mistaken reasoning).defineMarcodeMigrationkeeps its export and gains a test exercising its>= 9000guard, since it holds the reserved migration namespace open and has no caller by design.My first round of local verification missed this: dependencies were installed with
--ignore-scripts, sopreparenever raneffect-tsgo patchand the Effect language-service diagnostics were inactive, andknip:checkwas not in the focused scope. Re-verified afterwards the way CI runs it, with the patch applied:vp run knip:checkclean,vp check0 errors,vpr typecheckclean across all 15 packages.Focused tests pass across contracts, shared, server persistence/provider/project/http, desktop app + snapShot + gnome-extension, web store/theme/timeline/palette/sidebar/unified-workspace, marketing retired routes, and scripts.
pnpm install --frozen-lockfilesucceeds against the regenerated lockfile.The one local failure reported in the first draft of this description —
scripts/dev-runner.test.ts"accepts a dry run without the optional browser flag" — was this container lacking IPv6 (::1binds returnEAFNOSUPPORT), not the diff.Testpassing in CI confirms it.Still unverified
Live web and mobile verification — this environment has no browser or simulator. The surfaces that want it are the rewritten onboarding wizard (including the theme question above), the sidebar after upstream's
ProjectFaviconrefactor, and the right panel.🤖 Generated with Claude Code
https://claude.ai/code/session_01U3kz6cvULzXAHG2jfiVRWf