chore(upstream): sync marcode through 2daff8c2 - #63
Draft
maarco wants to merge 105 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: Julius Marminge <julius@mac.lan>
Co-authored-by: Julius Marminge <julius@mac.lan>
Co-authored-by: Julius Marminge <julius@mac.lan>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
PRs pingdotgg#8437 and pingdotgg#8236 crossed: one made stashShortcutLabel a required ComposerStashMenu prop, the other added a test case without it, so main fails web typecheck. 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: Theo Browne <me@t3.gg>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gg#8694) Co-authored-by: Julius Marminge <julius@mac.lan>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Brings in 102 upstream commits since f035a0f (Expo SDK 57, turn file attachments, thread<->pull-request linking, OpenCode child approvals, the macOS service PATH fix, and the Uniwind semantic-theme refactor). 34 paths conflicted. Each was resolved by hand, combining both intents: Server - cloud/bootService.ts: took upstream's PATH export in the launchd plist (pingdotgg#8173, keeps provider CLIs on the macOS service) and kept Marcode's MARCODE_HOME key. The launcher's resolveLauncherBaseDir reads MARCODE_HOME and exits without it, so the plist must match the systemd unit. - cloud/bootService.test.ts: kept both tests -- Marcode's MARCODE_HOME pin and upstream's new installer-PATH assertion -- retargeting the Marcode one at the new macRenderOptions fixture. - persistence/Migrations.ts: upstream's two new migrations were renumbered to the next free Marcode ids (042 -> 043 ProjectionThreadLinkedPullRequest, 043 -> 044 ProjectionThreadsUnsettledAt). Marcode's ProjectWorkspaceLayout holds 033, so every shared migration sits one id higher; renumbering an applied id would re-run or skip it on existing installs. The migration's own test was retargeted at ids 42/43. - environment/ServerEnvironment{,.test}.ts, contracts/environment.ts: both capability flags kept (threadPullRequestLinking + workspaceLayoutMutations). - server.test.ts: both imports kept. - cli/theme.ts + theme.test.ts: the new theme CLI read T3CODE_HOME while every other Marcode CLI command reads MARCODE_HOME, so `t3 theme` would have silently targeted the default install. Switched to MARCODE_HOME. Web - connection/platform.ts: took upstream's clientPresentationMetadata refactor (pingdotgg#8481 device type, OS, browser family, hosted deployment). Its new clientMetadata.ts merged cleanly but hardcoded "T3 Code Desktop"/"T3 Code Web"; both labels now come from branding's APP_BASE_NAME, and upstream's test asserts the Marcode label so a future sync fails loudly. - components/sidebar/SidebarChrome.tsx: kept Marcode's bare drag strip. Upstream's only change here was pingdotgg#8168's project-settings Back button inside SidebarUtilityMenu, which Marcode moved to FloatingPillNav -- whose "Back to Workspace" entry already covers every off-thread route. - components/ChatView.tsx: took upstream's useThreadActions destructuring (its consumers merged in cleanly) without the duplicate handleNewThread Marcode moved down; kept Marcode's one-prop ChatHeader; kept Marcode's composer insets and applied pingdotgg#8090's shoulder-tab reduction at both breakpoints so sm:pb-10 does not shadow it. - components/ChatMarkdown.tsx: took upstream's editorPreferences, editorLabels, remoteOpen and entities imports; dropped useRightPanelStore and the now-dead useActiveEnvironmentId. File links still open in the floating editor. - components/ThreadTerminalDrawer.tsx: kept Marcode's xterm implementation. pingdotgg#7488's fix lands through the shared terminal-links producer, which Marcode already routes on via match.kind, so no isTerminalUrl import is needed. - components/settings/KeybindingsSettings.tsx: took upstream's extracted WarningTooltipIcon and BrowserKeybindingNotice, restoring Marcode's copy. - components/chat/OpenInPicker.tsx: took upstream's editorLabelForPlatform refactor (which subsumes Marcode's Finder/Explorer/Files ternary) and kept Marcode's filled FolderOpenFilled glyph. - hooks/useHandleNewThread.ts: kept Marcode's workspace placement registration and took upstream's pingdotgg#6011 project-default model resolution. - composerDraftStore.ts: kept the marcode: storage key, took the version bump to 9 (the persisted draft shape changed with file attachments). - providerUpdateDismissal.ts: followed upstream's un-export, kept the key. - components/Sidebar.tsx: both imports kept. - components/files/FilePreviewPanel.tsx: kept Marcode's deletion. pingdotgg#8501's nested-image fix still lands in ChatMarkdown, which Marcode uses for chat. - components/threadSidebarWidth.test.ts: upstream deleted this file as a trivial layout test, but its "keeps the brand out of the sidebar header" case is the only assertion pinning a Marcode removal upstream still ships. Kept, and retargeted off the constant upstream un-exported. Mobile - app.config.ts: kept MARCODE_IOS_PERSONAL_TEAM and took upstream's new runtimeVersionPolicy. Adopted pingdotgg#4332's adaptive-icon fix (a universal export already carries a rounded-square silhouette, so Android double-masked it) with a Marcode-branded foreground: android-icon-foreground.svg now carries the black Marcode glyph in the adaptive safe zone, and the background is white on every channel. That preserves the rendered icon exactly -- the old full-bleed white foreground already hid the per-channel tints. - package.json: took pingdotgg#8694's dev-client startup fix (no --clear, new dev:client:reset) and kept the marcode-* schemes. - components/CompactBrandTitle.tsx + features/home/HomeHeader.tsx: adopted upstream's Uniwind semantic classes (required -- the new no-mobile-uniwind-theme-escape-hatches rule is an error and useThemeColor was deleted) and kept MarcodeMark plus the conditional stage pill. - components/T3Wordmark.tsx: kept Marcode's deletion, and replaced the upstream test deleted in pingdotgg#8397 with a focused pin asserting both lockups render MarcodeMark and that T3Wordmark stays out of the tree. - lib/authClientMetadata.ts: kept the Marcode label, took upstream's tablet/phone device-type detection. Tooling and docs - oxlint-plugin-marcode: upstream's new no-mobile-uniwind-theme-escape-hatches rule landed in the renamed directory; its test hardcoded t3code/ rule ids, which do not resolve against a plugin named marcode. Retargeted at marcode/ and registered the rule at error in vite.config.ts, keeping the documented warn seam on no-native-title-tooltip. - Three oxlint-disable-next-line comments arrived with a t3code/ prefix and would not have suppressed anything; retargeted at marcode/. - scripts/build-desktop-artifact.test.ts: kept all imports from both sides and Marcode's provisioning-profile fixture alongside upstream's sign assertion. - AGENTS.md: kept Marcode's sections and ported the one rule upstream added that they did not already cover. - docs/README.md: kept the unified-workspace entry, added OpenCode. - pnpm-lock.yaml: regenerated with pnpm, not hand-resolved. pnpm-workspace.yaml moved, but the effect catalog entry is unchanged at 4.0.0-beta.103, so the effect-smol subtree needs no sync. infra/relay did not move, so the alchemy coupling is not triggered.
…rations The sync renumbered upstream's 042/043 to Marcode's free ids 043/044. Migrations.test.ts pins the tail of the registry with slice(-10), so the two appended entries pushed ProjectWorkspaceLayout (id 33) out of the window and the pin failed -- which is exactly what it exists to do. Widened to slice(-12) and added both entries, keeping id 33 as the anchor the assertion is built around.
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 new useEnvironmentThemeSync test seeds localStorage with "t3code:theme", but Marcode renamed the selected-theme key to "marcode:theme" (useTheme.ts STORAGE_KEY; useTheme.test.ts already uses the same literal). Seeding the upstream key resolved no stored theme, so the hook fell back to the default dark appearance and all four light-appearance assertions failed. The merge produced no conflict here because the file is new upstream.
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@2daff8c25adf701fddd062ae93b94cc57d420ec2intomain— 102 upstream commits since the last sync basef035a0f4. One two-parent merge commit (586dcfb2), plus two follow-up CI fixes. No rebase, no force push.Headline upstream content: Expo SDK 57, turn file attachments (PDF/ZIP up to 50MB), thread↔pull-request linking, OpenCode child approvals and model catalogs, the macOS service
PATHfix, and the Uniwind semantic-theme refactor for mobile.34 paths conflicted. Every one was resolved by hand, combining both intents — no whole-file
ours/theirs, noreset/restore/stash/clean.Silent fork-boundary breaks caught (no conflict — these are the dangerous ones)
t3code/no-mobile-uniwind-theme-escape-hatchesmarcode; the rule id would not resolvemarcode/, rule registered aterrorinvite.config.tsoxlint-disable-next-line t3code/…commentsmarcode, so lint would failmarcode/t3 themeCLI readT3CODE_HOMEMARCODE_HOME; this one command would have silently targeted the default installMARCODE_HOME, test renamed with itconnection/clientMetadata.tshardcoded"T3 Code Desktop"/"T3 Code Web"branding'sAPP_BASE_NAME; upstream's test now asserts the Marcode labelandroidAdaptiveForegroundauto-merged to upstream's white T3 wordmark on all three channelsandroid-icon-foreground.svgwith the black Marcode glyph in the adaptive safe zone; regenerated the 432×432 transparent PNG9eff59df)Migrations.test.tspins the registry tail withslice(-10)ProjectWorkspaceLayout(id 33) out of the window — the pin firing exactly as designedslice(-12)and added both entries, keeping id 33 as the anchor4bfa609a) NewuseEnvironmentThemeSync.test.tsseedslocalStoragewith"t3code:theme""marcode:theme"(useTheme.tsSTORAGE_KEY). No theme resolved, so the hook fell back to dark and all four light-appearance assertions failed"marcode:theme", matching the literaluseTheme.test.tsalready usesThe last two were not caught by the pre-push audit and were found by CI. After fixing the second, every
"t3code:*"literal this merge introduces was swept against the keys Marcode actually renamed; the only other one,"t3code:default-theme-applied:v2:", is entirely new upstream with no Marcode counterpart, so it correctly stays upstream-shaped.Conflict decisions
Server
cloud/bootService.ts— took upstream'sPATHexport in the launchd plist (fix(server): keep provider CLIs available in the macOS service pingdotgg/t3code#8173, keeps provider CLIs on the macOS service) and kept Marcode'sMARCODE_HOMEkey.resolveLauncherBaseDirreadsMARCODE_HOMEand exits without it, so the plist must match the systemd unit.cloud/bootService.test.ts— kept both tests (Marcode'sMARCODE_HOMEpin, upstream's installer-PATHassertion), retargeting the Marcode one at the newmacRenderOptionsfixture.persistence/Migrations.ts— upstream's two new migrations renumbered to the next free Marcode ids:042 → 043 ProjectionThreadLinkedPullRequest,043 → 044 ProjectionThreadsUnsettledAt. Marcode'sProjectWorkspaceLayoutholds033, so every shared migration sits one id higher; renumbering an applied id would re-run or skip it on existing installs. Both the migration's own test and the registry pin were retargeted.ServerEnvironment{,.test}.ts,contracts/environment.ts— both capability flags kept (threadPullRequestLinking+workspaceLayoutMutations).server.test.ts— both imports kept.Web
connection/platform.ts— took upstream'sclientPresentationMetadatarefactor (feat(analytics): report connected client platforms pingdotgg/t3code#8481: device type, OS, browser family, hosted deployment).sidebar/SidebarChrome.tsx— kept Marcode's bare drag strip. Upstream's only change was fix(web): add back button to project settings pingdotgg/t3code#8168's project-settings Back button insideSidebarUtilityMenu, which Marcode moved toFloatingPillNav— whose "Back to Workspace" entry already covers every off-thread route, so the defect does not exist on this surface.ChatView.tsx— took upstream'suseThreadActionsdestructuring (its consumers merged in cleanly) without the duplicatehandleNewThreadMarcode moved down; kept the one-propChatHeader; kept Marcode's composer insets and applied fix(web): four composer spacing defects pingdotgg/t3code#8090's shoulder-tab reduction at both breakpoints sosm:pb-10does not shadow it.ChatMarkdown.tsx— took upstream'seditorPreferences/editorLabels/remoteOpen/entitiesimports; droppeduseRightPanelStoreand the now-deaduseActiveEnvironmentId. File links still open in the floating editor.ThreadTerminalDrawer.tsx— kept Marcode's xterm implementation. fix(web): make terminal links appear clickable only when clickable pingdotgg/t3code#7488's fix lands through the sharedterminal-linksproducer, which Marcode already routes on viamatch.kind.settings/KeybindingsSettings.tsx— took upstream's extractedWarningTooltipIcon/BrowserKeybindingNotice, restoring Marcode's copy inside them.chat/OpenInPicker.tsx— took upstream'seditorLabelForPlatformrefactor (it subsumes Marcode's Finder/Explorer/Files ternary), kept Marcode's filledFolderOpenFilledglyph.hooks/useHandleNewThread.ts— kept Marcode's workspace placement registration, took upstream's fix(clients): honor project default models in new threads pingdotgg/t3code#6011 project-default model resolution.composerDraftStore.ts— kept themarcode:key, took the version bump to 9 (persisted draft shape changed with attachments).providerUpdateDismissal.ts— followed upstream's un-export, kept the Marcode key.files/FilePreviewPanel.tsx— kept Marcode's deletion. fix(web): render nested markdown images correctly pingdotgg/t3code#8501's nested-image fix still lands inChatMarkdown, which Marcode uses for chat.Mobile
app.config.ts— keptMARCODE_IOS_PERSONAL_TEAM, took upstream's newruntimeVersionPolicy, adopted Fix Android adaptive launcher icon pingdotgg/t3code#4332's adaptive-icon fix with Marcode branding (see table above). Backgrounds are white on every channel, which preserves the rendered icon exactly — the old full-bleed white foreground already hid the per-channel tints.package.json— took fix(mobile): reduce dev-client reload and Metro startup cost pingdotgg/t3code#8694's dev-client startup fix (no--clear, newdev:client:reset), kept themarcode-*schemes.CompactBrandTitle.tsx+HomeHeader.tsx— adopted upstream's Uniwind semantic classes (required:useThemeColor.tswas deleted upstream and the new escape-hatch rule is anerror), keptMarcodeMarkand the conditional stage pill.lib/authClientMetadata.ts— kept the Marcode label, took upstream's tablet/phone device-type detection.Tooling and docs —
build-desktop-artifact.test.tskept all imports from both sides plus Marcode's provisioning-profile fixture alongside upstream'ssignassertion;AGENTS.mdkept Marcode's sections and ported the one rule upstream added that they did not already cover;docs/README.mdkept the unified-workspace entry and added OpenCode;pnpm-lock.yamlwas regenerated with pnpm, not hand-resolved.Removals pinned with tests
Upstream deleted two tests that were the only thing holding a Marcode removal in place. Both were replaced so the next sync conflicts loudly instead of silently reverting:
apps/web/src/components/threadSidebarWidth.test.ts(deleted in test: prune trivial error and layout tests pingdotgg/t3code#8400) — kept for its "keeps the brand out of the sidebar header" case, retargeted off the constant upstream un-exported.apps/mobile/src/lib/mobileBranding.test.ts(deleted in test: remove low-signal test files pingdotgg/t3code#8397) — kept, and extended with a new pin asserting both mobile lockups renderMarcodeMarkand thatT3Wordmark.tsxstays out of the tree.Coupled subtrees
pnpm-workspace.yamlmoved, so theeffect-version-subtreecoupling was checked: theeffectcatalog entry is unchanged at4.0.0-beta.103, so.repos/effect-smolneeds no sync.infra/relay/package.jsondid not move, so the alchemy coupling is not triggered.Why
The daily scheduled sync hit a conflicted delta and filed #62 rather than pushing a branch. This is the hand resolution that unblocks it.
Hotspots are treated as mandatory-review paths, not keep-Marcode paths: every upstream correctness, security, and operational fix above survives even where it landed in a customized file.
UI Changes
Not captured — this container has no display, so the web and mobile surfaces were not driven. Verification below is tests, typecheck, format, and lint only. Before taking this out of draft, the runbook's runtime verification is still owed:
apps/web/**,apps/mobile/**andassets/**all changed, so the affected surfaces need a real pass at 390px and 820px, plusvp run icons:checkfor the regenerated Android adaptive foreground.The one visual change worth a specific look is the Android adaptive launcher icon on dev, nightly, and production — the rendered result should be unchanged (black Marcode glyph on white), now without Android double-masking the silhouette.
Verification
apps/websuite — 297 files, 3263 tests, all pass locally via the package's owntestscript (vp run --filter ./apps/web test), matching CI's total exactly. Note:vp test run apps/webis not equivalent — it bypasses the package's vitest project config and six files fail to load on wasm/icon assets.apps/server/src/persistence— 21 files, 35 tests, all pass.oxlint-plugin-marcodeuniwind rule,bootService,cli/theme,ServerEnvironment,serviceLauncher, migrations 042/043 + the registry pin,mobileBranding,threadSidebarWidth,clientMetadata,contracts/environment,Sidebar.logic,composerDraftStore,editorLabels,terminal-links,branding,ChatMarkdown.workspace-images,ComposerTasksBadge,ComposerStashBadge,build-desktop-artifact,upstream-sync-workflow.apps/web,apps/server,apps/mobile,apps/desktop,packages/contractsall exit 0.vp fmt --checkclean across all 568 changed source files.vp lintexits 0 acrossapps/*/src,packages,oxlint-plugin-marcode,scripts. Only pre-existingno-native-title-tooltipwarnings (the documented Marcode seam kept atwarn).Known environment artifact: 4 tests in
apps/server/src/cli/theme.test.tsfail in the authoring container and pass in CI (confirmed green there). They map 1:1 to the file's fourchmodSync(…, 0o555 / 0o000)sites; that container runs asuid 0, and root can write into a0555directory, so those rollback paths structurally cannot trigger. Verified by probe, not assumed.Checklist
Closes #62.