chore(upstream): sync marcode through 6c583620 - #80
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>
…them (pingdotgg#10501) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Pixel Perfect <me@pixp.cc>
Co-authored-by: Pixel Perfect <me@pixp.cc>
…gg#10790) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.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>
…0820) Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
…ad (pingdotgg#10727) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…gdotgg#10768) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…ingdotgg#10848) Co-authored-by: Ryan Hughes <ryan@heyoodle.com>
…10851) Co-authored-by: Ryan Hughes <ryan@heyoodle.com>
…ingdotgg#10416) Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Merges 130 upstream commits (merge base 52b2bf7) into Marcode. 41 paths conflicted; each was resolved by combining both intents, and the merge also carried several fork-boundary breaks that produced no conflict at all. Conflict decisions - Migrations.ts: kept Marcode's `deployedMigrationEntries` split and frozen 1-49 history; took upstream's un-export of `makeMigrationLoader`. - marcode-sqlite-state.ts, codexLaunchArgs.ts, publicConfig.ts: kept Marcode's command/env names (MARCODE_*), took upstream's knip un-exports. - WorkspaceFileSystem.ts, contracts/project.ts: kept Marcode's added error classes, adopted Effect rc.112's `Schema.TaggedError` rename. - contracts/settings.ts + settings.test.ts: additive on both sides — kept Marcode's `unifiedWorkspaceSidebar` and upstream's snapShot settings. - AgentSessionScanner.test.ts: took upstream's two new exclusion tests, kept Marcode's `.marcode` worktree-path test. - electron-launcher.mjs: kept Marcode identity, took upstream LAUNCHER_VERSION 19 and their un-exports. - electron-launcher.test.mjs: upstream split env out into a sourced script, so Marcode's MARCODE_PORT/MARCODE_HOME assertions moved onto `makeDevelopmentEnvironmentScript`, where they now have coverage again. - Desktop Linux identity: adopted upstream's shared `resolveLinuxDesktopEntryName` helper but not their reverse-DNS rename — the entry filename is what existing installs' xdg-mime associations point at. Swept the merged-clean fixtures that had silently kept `com.t3tools.T3Code*.desktop`, and aligned `linuxWmClass` across both producers. - ElectronProtocol.ts, DesktopWindow.test.ts, git.test.ts: kept Marcode schemes/fixtures, took upstream's un-exports, new mocks and ssh:// case. - devcontainer: took upstream's rewrite (base image, on-create/update-content, forwarded ports) with Marcode's name, MARCODE_HOME and `.marcode` state. - mobile app.config.ts: kept Marcode's black-on-white release mark, took upstream's new adaptive-background and splash keys. - mobile SettingsRouteScreen, MobileClientsUserProfilePage.logic: took upstream's Android-aware copy and platform logic under Marcode branding. - ConnectOnboardingDialog, WelcomeWizard: took upstream's shared wizard components (WizardPopup wraps Marcode's DialogPopup, so overlay behavior is preserved) and re-applied Marcode's product copy. - rightPanelStore.ts: kept Marcode's `marcodeRightPanelPolicy` ownership of the storage key/version and panel-key predicate; took upstream's new `PULL_REQUESTS_PANEL_REF`, which other merged files already consume. - SettingsSidebarNav.tsx: took upstream's removal of the router-state read that caused the page-switch shift; kept Marcode's back control. - ThreadTerminalDrawer.tsx: kept Marcode's own link provider, and ported upstream's pingdotgg#10060 browser-override plus its toast error handling into it. `forceBrowser` is required, so the merge would not have typechecked without it. - ChatView.tsx: took upstream's `activeProject` record prop; kept Marcode's FloatingPillNav imports. - useTheme.ts/.test.ts, index.css: kept Marcode's dark-onboarding seam and Mentiko chrome; combined upstream's additive rules. - DMG backgrounds: kept Marcode artwork, pinned by build-desktop-artifact.test. - 95.astro: kept Marcode's removal, pinned by retiredRoutes.test. - pnpm-lock.yaml: regenerated with pnpm rather than hand-resolved. Fork-boundary breaks that merged clean - Effect beta.103 -> rc.112 removes `Schema.TaggedErrorClass`; migrated the Marcode-only files (upstream-sync tooling) that kept the old name. - `resolveLinuxDesktopEntryName`/`linuxWmClass` had silently reverted to upstream identity; added a test pinning that DesktopEnvironment and DesktopEarlyElectronStartup agree, so the next sync fails loudly instead. - Upstream's new CaptureShortcutConfig test disabled a `t3code/` oxlint rule; Marcode's plugin namespace is `marcode`, so the directive was dead and CI would have failed on it. - Sidebar.tsx and CommandPalette.logic.test.ts still used the removed `projectCwdByKey` map and lacked Marcode's required `workspaceLayoutVersion`. - Upstream's widened knip server-export scope (pingdotgg#10282) newly covers Marcode files: un-exported four module-private helpers and covered `defineMarcodeMigration` with a test of its reserved-id guard. Verification: focused tests (23 files, 683 passing), typecheck across contracts/shared/scripts/server/client-runtime/desktop/web/mobile, knip:check, vp fmt --check and vp lint over the changed scope. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017aktzmLA2BYiyzBZUSikhq
Upstream's cross-platform window capture (pingdotgg#8103) arrived in this sync carrying its own desktop identity, and none of it conflicted. The functional break: the GNOME extension only answers D-Bus callers whose well-known name is in its `CLIENT_NAMES` allowlist, and the Linux client requests `${linuxDesktopEntryName without .desktop}.SnapShot` — `marcode` here, not `com.t3tools.T3Code`. Every Marcode capture request would have been refused with "Only T3 Code may request a snapshot", at runtime, on Linux only. `gnomeCaptureClientNames.test.ts` now pins the allowlist against the entry names Marcode ships and against both halves of the derivation; restoring upstream's list fails it. The collisions: a Marcode install wrote the GNOME extension under upstream's uuid `snap-shot@t3.codes`, staged its KDE/Hyprland capture helpers and extension backups under a shared `~/.local/share/t3code/`, and installed a `com.t3tools.T3Code.KdeCapture.desktop` entry. Each of those would overwrite or be overwritten by a real T3 Code install on the same machine. Also renames the extension's own user-visible strings (GNOME Extensions app listing, authorization and activation errors) and the macOS `NSScreenCaptureUsageDescription`, which the OS renders in a permission prompt beside CFBundleDisplayName "Marcode". Deliberately left upstream-shaped: the `t3-kde-snap-shot` / `t3-hyprland-snap-shot` binary names (built from upstream's crates), the `X-T3Code-Capture-Helper` marker key, and the "T3 Code" strings in desktop runtime messages — main already carries 16 such files, and AGENTS.md rules out mass-replacing internal upstream-shaped identifiers. Verified: capture, GNOME setup, KDE, Hyprland, shortcut-config, desktop environment and build-artifact suites (185 passing), desktop and scripts typecheck, knip:check, fmt and lint. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017aktzmLA2BYiyzBZUSikhq
|
Two follow-ups on this PR: one correction to the description above, one more round of fork-boundary fixes, and a note on a red check. Correction: the
|
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. |
Both CI failures on the merge commit were in infra/relay, the one package I did not typecheck locally. Upstream's Android agent notifications (pingdotgg#10416) brought a new FCM path whose identity is upstream's, and none of it conflicted. Check / `vpr typecheck` — five `effect(deterministicKeys)` errors. The diagnostic derives a Context.Service key from the package name, and Marcode's relay package is `marcode-relay`, so upstream's `t3code-relay/...` keys are rejected outright: src/WebCrypto.ts src/agentActivity/FcmAssertionSigner.ts src/agentActivity/FcmClient.ts src/agentActivity/FcmDeliveries.ts src/agentActivity/FcmDeliveryQueueSender.ts Every pre-existing service in the package already spells its key `marcode-relay/...`; these five now match. Test — `ApnsDeliveries.test.ts` "sends signed jobs to the device's APNs environment and bundle topic" asserted `com.t3tools.marcode.preview…` against a fixture that fed it `com.t3tools.t3code.preview`. Marcode had renamed the bundle-id fixtures to its real mobile identity; upstream's new blocks reintroduced theirs, and the two halves met in one assertion. Renamed the four new occurrences plus the two in the new FCM test files, matching apps/mobile/app.config.ts (`com.t3tools.marcode{,.dev,.preview}`). Verified the way CI runs it, rather than by focused scope again: `vp check` 0 errors, `vpr typecheck` clean across all 14 packages, and the full relay suite (30 files, 286 tests) green. Two failures remain locally that CI does not have, both confirmed environmental rather than assumed — CI's own run passes both: - scripts/dev-runner.test.ts: this container has no IPv6, so `::1` binds return EAFNOSUPPORT and every probed port reads as occupied. - scripts/update-release-package-versions.test.ts: the case chmods a file to 0400 and expects the write to fail; this container runs as uid 0, where that write succeeds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017aktzmLA2BYiyzBZUSikhq
|
CI on Upstream's Android agent notifications (pingdotgg#10416) brought a new FCM path carrying upstream's identity, and none of it conflicted:
I re-verified the way CI runs it this time rather than by focused scope: Two local failures that are not CI's, confirmed rather than assumedRunning CI's exact test command locally also fails
Neither needs a change, and I have not touched either test. On the "2 failed" countsBoth jobs reported
Generated by Claude Code |
What Changed
Merges 130 upstream commits from
pingdotgg/t3code— merge base52b2bf77, upstream head6c583620("feat(mobile): add Android agent notifications and ongoing activity (pingdotgg#10416)") — into Marcode as one two-parent merge commit (3ba313f1, parentsa9836f5f+6c583620), plus two follow-up commits for fork-boundary breaks the merge carried in silently:3ba313f148b36108a5e138t3code-relay/…Effect service keys and upstream bundle-id fixtures. Both CI failures were here.All four required checks are green on
8a5e138:Check,Test,Mobile Native Static Analysis,Release Smoke(plusTest Server 1–3andRust).claude-reviewis red for an unrelated reason — see the comments.This supersedes the two stale open sync PRs and the blocked-sync issue, all of which are ancestors of this merge:
061543e9)8b2838e0)upstream sync blocked: pingdotgg/t3code@12391bd041 paths conflicted. Every one was resolved by hand, combining both intents — no whole-file ours/theirs, no force push, reset, restore, stash or clean.
Conflict decisions
persistence/Migrations.tsdeployedMigrationEntriessplit and frozen 1–49 history; took upstream's un-export ofmakeMigrationLoader.marcode-sqlite-state.ts,codexLaunchArgs.ts,cloud/publicConfig.tsMARCODE_*names; took upstream's knip un-exports.WorkspaceFileSystem.ts,contracts/project.tsSchema.TaggedErrorrename.contracts/settings.ts+ testunifiedWorkspaceSidebarand upstream's snapShot settings.AgentSessionScanner.test.ts.marcodeworktree test.electron-launcher.mjsLAUNCHER_VERSION19 and un-exports.electron-launcher.test.mjsMARCODE_PORT/MARCODE_HOMEassertions moved ontomakeDevelopmentEnvironmentScript— where they now actually cover the rename again.resolveLinuxDesktopEntryNamehelper but not their reverse-DNS rename — see the open questions below.ElectronProtocol.ts,DesktopWindow.test.ts,shared/git.test.tsssh://case..devcontainer/MARCODE_HOMEand.marcodestate.mobile/app.config.tsSettingsRouteScreen.tsx,MobileClientsUserProfilePage.logic.tsConnectOnboardingDialog.tsx,WelcomeWizard.tsxWizardPopupwraps Marcode'sDialogPopup, so overlay/modal-layer behavior is preserved) and re-applied Marcode's product copy. Marcode's delta here was 10 lines against a 783/693-line upstream rewrite.rightPanelStore.tsmarcodeRightPanelPolicy's ownership of the storage key/version and panel-key predicate; took upstream's newPULL_REQUESTS_PANEL_REF, which other merged files already import.SettingsSidebarNav.tsxThreadTerminalDrawer.tsxChatView.tsxactiveProjectrecord prop; kept Marcode's FloatingPillNav imports.useTheme.ts/.test.ts,index.cssbuild-desktop-artifact.test.ts).95.astroretiredRoutes.test.ts).pnpm-lock.yamlFork-boundary breaks that merged clean (no conflict)
These are the dangerous ones — each would have shipped silently:
Schema.TaggedErrorClass. Migrated the Marcode-only files still using it (theupstream-synctooling), which upstream never touches.resolveLinuxDesktopEntryNameis new from upstream in this delta, so taking their side would have revertedDesktopEnvironment'smarcode.desktop. Restored, and pinned with a test thatDesktopEnvironmentandDesktopEarlyElectronStartupagree — verified it fails when the seam is broken. Correction to an earlier version of this description: the window class half was already divergent onmain(DesktopEarlyElectronStartupsaidt3code,DesktopEnvironmentsaidmarcode), so aligning it fixes a pre-existing bug rather than one this merge introduced.ThreadTerminalDrawerwould not have typechecked:openTerminalLinkInPreview's newforceBrowseris required, and Marcode's own link provider never passed it.CaptureShortcutConfigtest disabled at3code/oxlint rule; Marcode's plugin namespace ismarcode, so the directive was dead and CI failed on the unused-directive error.Sidebar.tsxandCommandPalette.logic.test.tsstill used the removedprojectCwdByKeymap and lacked Marcode's requiredworkspaceLayoutVersion.defineMarcodeMigrationwith a test of its reserved-id guard.useTheme's onboarding seam lostisOnboardingThemeActiveand bothonboardingActivebindings to an upstream rewrite; restored.48b3610). Its D-Bus allowlist heldcom.t3tools.T3Code.SnapShot, but the client requests${linuxDesktopEntryName without .desktop}.SnapShot→marcode.SnapShot. Runtime-only, Linux-only, and it surfaces as an authorization error. Pinned bygnomeCaptureClientNames.test.ts. Also fixed three install collisions with a real T3 Code install (extension uuid, shared~/.local/share/t3code/helper dirs, KDE.desktopentry) and a macOS permission prompt reading "T3 Code".8a5e138). FiveContext.Servicekeys spelledt3code-relay/…, whicheffect(deterministicKeys)rejects because the package ismarcode-relay; andApnsDeliveries.test.tsasserted a Marcode bundle id against an upstream fixture. These were the two CI failures.Coupled changes
pnpm-workspace.yaml(Effect rc.112) andinfra/relay/package.json(Alchemy beta.76) both moved, and upstream's ownchore(refs)commits carried the matching.repos/effect-smoland.repos/alchemy-effectsubtrees in the same delta. No separatesync:reposrun was needed — verified the vendored Effect source is the one that renamedTaggedErrorClass.Why
Scheduled daily upstream sync. Marcode is a maintained fork, so upstream correctness, security, protocol and dependency fixes have to land even when they touch customized files — hotspots are mandatory-review paths, not automatic keep-Marcode paths.
UI Changes
Not captured — this environment has no browser or simulator. The merge changes user-visible web and mobile surfaces (onboarding wizard, Connect dialog, settings sidebar, terminal links, mobile theme list, Android adaptive icons), so per the runbook the integrated client verification is still required before this leaves draft.
Open questions for review
com.t3tools.T3Code.desktop) and centralized it in one helper. I took the refactor but kept Marcode's existingmarcode.desktop/marcode-dev.desktop, because that filename is what existing installs'xdg-mimeassociations point at — renaming it would silently drop every user'smarcode://handler. If upstream's format change was carrying a Linux packaging fix, Marcode needs the equivalent deliberately, as a migration rather than a merge side effect.mainalready carries 16 such files and AGENTS.md rules out mass-replacing internal upstream-shaped identifiers. That boundary is a judgement call, not a rule.Verification
CI on
8a5e138— all four required checks green:ANTHROPIC_API_KEY, red repo-wide including onmainLocally, run the way CI runs it:
vp check0 errors,vpr typecheckclean across all 14 packages,vp run knip:checkclean, and focused suites across contracts, shared, marketing, desktop, server, web, scripts, mobile and relay.Two tests fail in the authoring container but pass in CI, confirmed from CI's own log rather than assumed:
scripts/dev-runner.test.ts(no IPv6 here —::1binds returnEAFNOSUPPORT) andscripts/update-release-package-versions.test.ts(chmods to0400and expects a write to fail; the container runs as uid 0). Neither was modified.Not covered here
docs/operations/development.mdand the Clerk auth-redirect fixtures still describe upstream's~/.t3/T3CODE_HOME/t3code://. Those are onmainalready, not introduced here.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_017aktzmLA2BYiyzBZUSikhq