chore(upstream): sync marcode through d29c56a5 - #82
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>
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
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
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Brings in 17 upstream commits on top of the 6c58362 sync, headlined by thread-linked pull requests (pingdotgg#10839), PR stack navigation (pingdotgg#10875), and PR search (pingdotgg#10870). Conflict decisions: - packages/contracts/src/environment.ts, apps/server/src/environment/ ServerEnvironment{.ts,.test.ts}: additive. Keep Marcode's workspaceLayoutMutations capability and take upstream's new threadPullRequests / pullRequestStackActions, plus upstream's reworded threadPullRequestLinking doc comment. - apps/server/src/persistence/Migrations.ts: upstream's 050_ProjectionThreadPullRequests lands as Marcode 051, one past the Marcode-offset tail, so no applied id moves. Renamed the migration and its test, shifted the test's toMigrationInclusive bounds by the same offset, and extended the offset pin in Migrations.test.ts to cover 50 and 51 -- it had stopped at 49, so the last two syncs added migrations the pin did not see. - apps/server/src/provider/RuntimeInstructions.ts: keep Marcode's product name and take upstream's PULL_REQUEST_LINKING_INSTRUCTIONS block. The `t3-code` MCP server id inside it stays upstream-shaped. - apps/server/src/provider/Layers/ClaudeAdapter.test.ts: take upstream's refactor to buildRuntimeInstructions() instead of Marcode's inlined literal, which now derives the Marcode branding automatically. - apps/web/src/rightPanelStore.ts, marcodeRightPanelPolicy.ts: adopt upstream's new thread-linked `pull-requests` surface (distinct from the repo-wide list panel Marcode retired in v11, which is a full page here). Upstream's `files` singleton stays out: the floating Code editor remains Marcode's only file-editing surface. - apps/web/src/components/RightPanelTabs.tsx: resolved to Marcode's side, which delegates the launcher and add-menu chrome to marcodeRightPanelChrome.tsx. Ported upstream's "Linked pull requests" entries into that module instead of re-inlining their copy. - apps/web/src/components/ChatView.tsx: take upstream's addPullRequestsSurface; drop openFileSurface, which opens files in the right panel upstream and in the floating editor here. - apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx: take upstream's Tooltip/MenuTrigger nesting, keep Marcode's side="bottom". Fork-boundary breaks that merged without a conflict: - Five upstream test fixtures built OrchestrationProjectShell literals without workspaceLayoutVersion/workspaceLayout, which Marcode requires. - Marcode's decider.workspaceLayout.test.ts thread fixture predates upstream's now-required `pullRequests` field. - The link_pull_request MCP tool description named T3 Code where Marcode uses its own product identity. Added a focused test pinning the adopted `pull-requests` surface so a future sync cannot silently drop it while ChatView still renders ThreadPullRequestsPanel for that kind. Verified: typecheck for web, server, contracts, shared, client-runtime, desktop, mobile; focused tests for migrations, environment capabilities, provider runtime instructions, the PR orchestration paths, right-panel state, and the fork-identity suites; fmt --check and lint on the changed scope (0 errors, pre-existing warnings only). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSPeSBiGm2QzZWPdsL2zuy
|
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. |
|
All four required checks are now green on
Two things stand between this and merge, both yours:
Leaving it in draft; I won't mark it ready or merge. Generated by Claude Code |
What Changed
Merges
pingdotgg/t3code@d29c56a5c404cb0f58d3b2ac41762fa0d0ac28d4into Marcode.Upstream delta on top of
6c583620(17 commits), headlined by:afb84898link multiple pull requests to threads (feat(pull-requests): link multiple pull requests to threads pingdotgg/t3code#10839)de37964dnavigate, merge and rebase GitHub stacks (feat(prs): navigate, merge and rebase GitHub stacks pingdotgg/t3code#10875)f0401c62find threads by linked pull request (feat(search): find threads by linked pull request pingdotgg/t3code#10870)33242d01preserve recent PR reads across server restarts (fix(server): preserve recent PR reads across server restarts pingdotgg/t3code#11007)d29c56a5resolve project identity before legacy PR relinks (fix(server): resolve project identity before legacy pr relinks pingdotgg/t3code#11045)Conflict decisions (10 files)
packages/contracts/src/environment.tsworkspaceLayoutMutations, take upstream'sthreadPullRequests/pullRequestStackActionsand its rewordedthreadPullRequestLinkingdoc.apps/server/src/environment/ServerEnvironment.ts+.test.tsapps/server/src/persistence/Migrations.ts050_ProjectionThreadPullRequestslands as Marcode 051, one past the Marcode-offset tail, so no applied id moves. Migration and its test renamed; the test'stoMigrationInclusivebounds shifted by the same offset.apps/server/src/provider/RuntimeInstructions.tsPULL_REQUEST_LINKING_INSTRUCTIONS. Thet3-codeMCP server id inside it stays upstream-shaped on purpose.apps/server/src/provider/Layers/ClaudeAdapter.test.tsbuildRuntimeInstructions()over Marcode's inlined literal — it now derives the Marcode branding automatically.apps/web/src/rightPanelStore.tsRIGHT_PANEL_KINDSexport; take upstream'spull-requestssingleton, leavefilesout.apps/web/src/marcodeRightPanelPolicy.tspull-requestssurface (see below).apps/web/src/components/RightPanelTabs.tsxmarcodeRightPanelChrome.tsx; upstream's "Linked pull requests" entries ported into that module rather than re-inlining their copy.apps/web/src/components/ChatView.tsxaddPullRequestsSurface; dropopenFileSurface— files open in the floating Code editor here, not the right panel.apps/web/src/components/pullRequest/PullRequestDetailPanel.tsxTooltip/MenuTriggernesting, keep Marcode'sside="bottom".The one judgement call worth a look
Upstream's new
pull-requestsright-panel surface (the thread's own linked PRs, stacks included) reuses the same kind id as the repo-wide PR list panel Marcode retired in right-panel storage v11. I adopted it rather than retiring it again, because:RightPanelTabsPropsupstream'sonAddPullRequests/pullRequestsAvailable, andChatViewalready rendersThreadPullRequestsPanelfor that kind, so retiring it would have left the feature half-wired;file/files/plan) is untouched and still pinned.If you'd rather keep it out, that's a one-line revert in
marcodeRightPanelPolicy.tsplus the ChatView opener.Fork-boundary breaks that merged with no conflict
These are the silent ones — caught by typecheck, not by git:
OrchestrationProjectShellliterals withoutworkspaceLayoutVersion/workspaceLayout, which Marcode requires (linkCreatedPullRequest,mcp/toolkits/pullRequests/handlers,PullRequestSyncReactor,decider.pullRequests,projector).decider.workspaceLayout.test.tsthread fixture predates upstream's now-requiredpullRequestsfield.link_pull_requestMCP tool description named "T3 Code" where Marcode uses its own product identity.Identity sweep over the whole merged tree came back clean:
T3CODE_HOMEappears only in Marcode comments and the tests documenting the divergence,marcode.serviceis the unit,WORKTREE_BRANCH_PREFIXis referenced through the constant, and the right-panel storage key is Marcode's.T3_BOOT_SERVICE_UNIT,T3_SERVICE_LAUNCHER_CONTEXT,com.t3tools.t3code.service,@t3tools/*, thet3CLI name and thet3-codeMCP id are all left upstream-shaped deliberately.Pins added
Migrations.test.tsoffset pin extended to cover ids 50 and 51. It had stopped at 49, so the last two syncs added migrations the pin never saw — the "fails here loudly" comment was no longer true.rightPanelStore.test.tscase pinning the adoptedpull-requestssurface, so a future sync cannot drop the kind whileChatViewstill rendersThreadPullRequestsPanelfor it.Why
Daily upstream sync. Nothing here is a Marcode feature change beyond the surface decision called out above; the goal is to take upstream's correctness, protocol and dependency work while keeping Marcode's floating editor, unified workspace, branding and migration offsets intact.
No coupled-subtree work needed: neither
pnpm-workspace.yamlnorinfra/relay/package.jsonmoved in this delta.UI Changes
Not captured. This run is headless — no browser or simulator verification was possible, so the web/mobile surfaces upstream touched (the new linked-PR panel, PR stack navigation, image zoom/pan, Android glass fixes) have not been driven live. That verification is still owed before this leaves draft, per the runbook's step 5.
Checklist
Verification run
typecheck: web, server (t3), contracts, shared, client-runtime, desktop, mobile — all clean.051_ProjectionThreadPullRequests,ServerEnvironment,RuntimeInstructions,ClaudeAdapter,decider.workspaceLayout,decider.pullRequests,projector,PullRequestSyncReactor,linkCreatedPullRequest,mcp/toolkits/pullRequests/handlers,rightPanelStore,RightPanelTabs,contracts/orchestration, plus the fork-identity suites (forkIdentity,git,bootService,serviceLauncher,upstream-sync-workflow).vp fmt --checkon the 23 changed files: clean.vp linton the changed dirs: 0 errors, pre-existing warnings only.🤖 Generated with Claude Code
https://claude.ai/code/session_01LSPeSBiGm2QzZWPdsL2zuy
Generated by Claude Code