Skip to content

merge(upstream): integrate upstream t3code changes into marcode - #26

Merged
tyulyukov merged 100 commits into
mainfrom
marcode/selective-upstream-merge
Apr 8, 2026
Merged

tyulyukov merged 100 commits into
mainfrom
marcode/selective-upstream-merge

Conversation

@tyulyukov

Copy link
Copy Markdown
Owner

Summary

  • Merges 79 upstream commits from pingdotgg/t3code into MarCode
  • Adopts new Effect RPC transport layer (replaces WebSocket push/subscribe)
  • Adds WebSocket disconnect recovery and slow RPC toast UX
  • Adds server observability tracing and metrics (OTLP)
  • Adds worktree bootstrap moved to server with terminal launch context persistence
  • Adds Effect.fn migration across all provider layers
  • Adds performance optimizations (projections, message timeline virtualization)
  • Adds git branch listing pagination and search
  • Adds "Build" mode (renamed from "Chat")
  • Adds IntelliJ IDEA open-in launch support
  • Various bug fixes (stale spinner, Windows compat, git branch parsing)

All MarCode custom features preserved:

  • Full @marcode namespace branding (zero T3 references)
  • Jira Cloud integration (OAuth, composer, RPC routes ported to new transport)
  • GitLab MR integration (RoutingGitHostCli, dynamic MR/PR labels)
  • Custom theme system (24+ themes across 12 families)
  • Subagent support and UI (SubagentDetailDrawer, AgentGroupCard)
  • Diff visibility (DiffPanel, InlineDiffPreview, FileChangeCard)
  • Custom tool cards (CommandExecutionCard, WebSearchCard, WebFetchCard, McpToolCallCard, ExplorationCard)
  • Todo viewing in composer (ComposerActiveTasksPanel)
  • Additional directories thread context
  • Copy buttons on assistant/plan messages
  • Conventional commits in generated prompts

Test plan

  • bun typecheck — 0 errors
  • bun lint — 0 errors
  • bun fmt — clean
  • bun run test — 675 passed, 0 failed
  • Manual smoke test: boot desktop app, create thread, send message, verify all card types render
  • Verify GitLab repo shows MR labels everywhere
  • Verify revert to checkpoint works correctly
  • Verify Jira integration (paste, autocomplete, inline chips)

🤖 Generated with Claude Code

juliusmarminge and others added 30 commits March 29, 2026 17:51
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cursor[bot] <206951365+cursor[bot]@users.noreply.github.com>
Co-authored-by: Ewan <ewanjordaan07@gmail.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…covery (pingdotgg#1560)

Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…ckpointDiffQuery.ts (pingdotgg#1622)

Co-authored-by: codex <codex@users.noreply.github.com>
…ckpointStore.ts (pingdotgg#1623)

Co-authored-by: codex <codex@users.noreply.github.com>
…eration.ts (pingdotgg#1625)

Co-authored-by: codex <codex@users.noreply.github.com>
…ration.ts (pingdotgg#1624)

Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge and others added 25 commits April 6, 2026 09:26
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#1303)

Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Merges upstream/main (pingdotgg/t3code) into the MarCode fork, bringing in
significant infrastructure improvements while preserving all custom features.

Upstream additions integrated:
- Effect RPC transport layer (replaces WebSocket push/subscribe)
- WebSocket disconnect recovery and slow RPC toast UX
- Server observability tracing and metrics (OTLP)
- Worktree bootstrap moved to server with terminal launch context persistence
- Effect.fn migration across all provider layers
- Performance optimizations (projections, message timeline virtualization)
- Git branch listing pagination and search
- "Build" mode (renamed from "Chat")
- IntelliJ IDEA open-in launch support
- Various bug fixes (stale spinner, Windows compat, git branch parsing)

MarCode features preserved:
- Full @marcode namespace branding (zero T3 references remaining)
- Jira Cloud integration (OAuth, composer, RPC routes ported to new transport)
- GitLab MR integration (RoutingGitHostCli, GitLabCli)
- Custom theme system (24+ themes across 12 families)
- Subagent support and UI (SubagentDetailDrawer, AgentGroupCard)
- Diff visibility enhancements (DiffPanel, InlineDiffPreview)
- Todo viewing in composer (ComposerActiveTasksPanel, deriveTodoItems)
- Additional directories thread context
- Landing app

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restores MarCode features that the merge agents dropped when taking
upstream's rewritten components:

- MessagesTimeline: Restore 7 specialized card types (FileChangeCard,
  AgentGroupCard, CommandExecutionCard, ExplorationCard, WebSearchCard,
  WebFetchCard, McpToolCallCard) with classification functions and
  batching logic integrated into upstream's virtualized architecture

- MessagesTimeline.logic: Extend row type union with file-change,
  exploration, agent-group, command, web-search, web-fetch, mcp-tool
  kinds plus height estimation constants

- Sidebar: Remove stray "Code" text from logo (was "MarCode Code Dev",
  now "MarCode Dev"), restore GitLab MR label support via
  gitHostProvider-aware prStatusIndicator

- ChatView: Restore onSubagentSelect callback wiring to
  SubagentDetailDrawer, restore draftAdditionalDirectories dispatch
  on thread creation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Restore MessageCopyButton on assistant messages (hover-visible,
  grouped with message metadata)
- Restore MessageCopyButton on proposed plan cards (hover-visible)
- Restore isSendBusy and isPreparingWorktree props on MessagesTimeline
  to show "Starting…" and "Preparing worktree…" labels during the
  respective phases instead of generic "Working…"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix command execution card showing output as command label: only use
  detail fallback when it matches a recognized shell wrapper pattern
  (pwsh, bash, cmd), not for arbitrary command output
- Restore shiny-text animation and text-primary/60 color on working
  indicator (was replaced with muted pulsing dots by upstream)
- Remove font-mono from all user message text (upstream wrongly added
  monospace font to UserMessageBody)
- Fix GitLab progress toast stages: use dynamic prLabel(gitHostProvider)
  instead of hardcoded "Creating GitHub pull request..."

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The upstream split of GitStatusResult into local+remote parts dropped
gitHostProvider from the remote status response. This meant the web UI
never received the git host provider field, so all PR/MR labels showed
"PR" even for GitLab repos.

- Add gitHostProvider detection to readRemoteStatus in GitManager.ts
  (parallel with PR lookup for zero extra latency)
- Include gitHostProvider in toRemoteStatusPart() to preserve it across
  localUpdated events

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two critical fixes:

1. Command card showing "Command run" instead of actual command:
   The upstream merge of extractToolCommand dropped the data.input.command
   lookup path (was line 1234 in pre-merge). The server sends tool data as
   { data: { toolName, input: { command: "..." } } } but the function only
   checked data.item.command (Codex format). Restored data.input.command
   candidate to match Claude adapter's payload structure.

2. User messages still rendering in monospace: The previous fix removed
   the font-mono CSS class but left <pre> tags which inherit monospace
   from the browser's user-agent stylesheet. Changed <pre> to <div> for
   user message text rendering (with whitespace-pre-wrap preserved).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PopoverTrigger renders a <span> not a <button>, so set nativeButton={false}
to silence the console warning about missing native button semantics.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The upstream merge rewrote SidebarThreadRow and dropped the Tooltip
wrapper around thread titles. Restored the Tooltip with right-side
placement and word-wrapping for long titles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The upstream merge used px-4 which in Tailwind v4 generates
padding-inline, overriding the physical pl-[90px] needed for macOS
window controls. Fixed by using pr-4 instead of px-4 (the exact
Tailwind v4 pitfall documented in CLAUDE.md).

Also restored the fullscreen detection via bridge.onFullscreenChange
so the padding switches to pl-4 when the app is fullscreened (where
traffic lights are hidden).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…herwise

Fullscreen: justify-center px-4 (logo centered in sidebar)
Non-fullscreen: pr-4 pl-[90px] (offset right to account for macOS
window control buttons)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The SidebarHeader base component applies p-2 which overrides the
Tailwind pl-[90px] class in the cascade. Using inline style for
paddingLeft ensures it wins specificity regardless of CSS order.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use inline style (immune to Tailwind cascade issues) with 78px left
padding — standard safe clearance for macOS close/minimize/fullscreen
buttons (3×12px dots + gaps + inset ≈ 70-78px).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
justify-center with paddingLeft: 78px so the logo centers in the
remaining space after the macOS window control buttons.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The runStackedAction result CTA hardcoded "View PR" and "Create PR"
regardless of git host provider. Now detects the host provider and
uses "View MR"/"Create MR" for GitLab repos.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The thread.reverted event handler filtered turnDiffSummaries with
`checkpointTurnCount !== undefined`, which excluded entries where
the field was undefined (e.g. initial turns). This caused ALL turn
diff summaries to be filtered out, resulting in the entire chat
being wiped instead of reverting to the target turn.

Fix: treat undefined checkpointTurnCount as 0 (the initial turn),
so those entries are retained during revert.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tyulyukov and others added 3 commits April 8, 2026 13:25
The upstream merge dropped originRepositoryNameWithOwner from
BranchHeadContext and all its usages. This meant gh pr create and
gh pr list ran without --repo, which fails for fork repos because
gh defaults to the upstream repository (which doesn't have the branch).

Restored:
- originRepositoryNameWithOwner field on BranchHeadContext
- Populated from resolveRemoteRepositoryContext(cwd, "origin")
- Passed as --repo to createPullRequest, findOpenPr, and findLatestPr

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SettingsPanels.browser.tsx: wrap render with QueryClientProvider
  (JiraSettingsSection uses useQueryClient which needs the provider)
- timelineHeight: adjust USER_LINE_HEIGHT_PX (22 -> 22.75) and
  USER_AVG_CHAR_WIDTH_PX (7.8 -> 7.9) to match proportional font
  rendering after <pre> -> <div> change
- timelineHeight.test.ts: update all hardcoded expected values to
  match the new height constants

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- JiraSettingsSection: guard api?.jira?.onConnectionStatusChanged with
  optional chaining (was crashing when jira namespace undefined in test)
- SettingsPanels.browser: wrap render with QueryClientProvider
- ChatView.browser: increase height estimation tolerances for
  proportional font rendering (desktop 44->48, mobile 56->68, narrow
  84->114) and plan footer alignment tolerance (0.5->3px)
- timelineHeight: update USER_LINE_HEIGHT_PX and USER_AVG_CHAR_WIDTH_PX
  for proportional font, update unit test expectations to match

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tyulyukov
tyulyukov merged commit 401ee1f into main Apr 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.