Skip to content

feat: port Window Controls Overlay + markdown file link UX (upstream #1969, #1956)#51

Merged
tyulyukov merged 2 commits intomainfrom
marcode/port-wco-and-markdown-file-links
Apr 21, 2026
Merged

feat: port Window Controls Overlay + markdown file link UX (upstream #1969, #1956)#51
tyulyukov merged 2 commits intomainfrom
marcode/port-wco-and-markdown-file-links

Conversation

@tyulyukov
Copy link
Copy Markdown
Owner

Summary

Ports two upstream commits from the next tier of t3code port work onto MarCode:

  • Window Controls Overlay (dff8784a, upstream window controls overlay (windows&linux) pingdotgg/t3code#1969) — native Windows/Linux titlebar overlay so maximize/minimize/close buttons sit inside the app chrome, while keeping macOS's hiddenInset + traffic-light offset intact.
  • Markdown file link UX (68061af0, upstream Improve markdown file link UX pingdotgg/t3code#1956) — chat messages render file references as monospaced chips with workspace-relative labels, icons, and hover tooltips. Changed-file previews in work-log entries are also truncated to workspace-relative form.

Upstream's Claude Opus 4.7 port (3e07f5a6) was checked during planning and is already in main via 24dc316a; cherry-pick skipped (re-applying it would overwrite MarCode's claude-first defaults).

Key reconciles (MarCode divergences preserved)

  • Sidebar.tsx — macOS traffic-light hack preserved. Inline style={{ paddingLeft: 58 }} converted to conditional pl-[58px] class so the wco:pl-[calc(env(titlebar-area-x)+1em)] variant can override on Windows/Linux.
  • apps/desktop/src/main.ts — merged upstream's getWindowTitleBarOptions / syncWindowAppearance / syncAllWindowAppearance / nativeTheme.on("updated", ...) helpers with MarCode's existing captureWindowState / saveWindowState / window-state persistence. MarCode's createWindow(options?: { deferLoad?: boolean }) signature + resolveWindowBounds preserved.
  • ChatView.tsx — upstream's discriminated-union ChatViewProps (with routeKind/draftId/onDiffPanelOpen) not adopted, since MarCode uses separate route files for draft vs server threads. Added only the new reserveTitleBarControlInset?: boolean prop. Kept MarCode's collapsed-sidebar pl-[90px] macOS traffic-light hack in the header and layered upstream's wco:h-[...] + wco:pr-[...] variants on top.
  • MessagesTimeline.tsx — MarCode keeps work-group rendering inline in renderRowContent (upstream extracted it to WorkGroupSection). Applied upstream's intent surgically: imported formatWorkspaceRelativePath, threaded workspaceRoot into SimpleWorkEntryRow + workEntryPreview, wrapped changed-file chips. No structural refactor.
  • MessagesTimeline.test.tsx — MarCode's two existing tests preserved; upstream's new "formats changed file paths from the workspace root" test appended in MarCode's inline-props style (MarCode doesn't use a `buildProps()` helper).

Test plan

  • `bun --filter @marcode/web typecheck`
  • `bun --filter @marcode/desktop typecheck`
  • `bun --filter @marcode/web test` — 1011/1011 passed (95 files)
  • `bun --filter @marcode/desktop test` — 82/82 passed (13 files)
  • Regression guard: `service.notification-wiring` — 4/4 passed
  • Regression guard: `windowState.integration-guard` — 8/8 passed
  • Windows/Linux smoke test — we don't run CI on those Electron targets, so the WCO behavior ships "blind" with confidence that upstream tested it. Anyone on Win/Linux should verify native titlebar controls render inline with the app chrome.
  • macOS smoke: sidebar logo still clears the traffic lights in windowed mode and shifts flush-left in fullscreen; chat header/diff panel/settings heights unchanged.
  • Chat smoke: file references in assistant responses render as monospaced chips with workspace-relative labels + absolute-path tooltips; clicking opens the file.

Notes

  • Both cherry-picks preserve upstream authorship (Taras Fomin, legs).
  • Branch isolated from `main`; no force-push risk.

🤖 Generated with Claude Code

tarik02 and others added 2 commits April 21, 2026 15:15
Co-authored-by: julius <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
@tyulyukov tyulyukov force-pushed the marcode/port-wco-and-markdown-file-links branch from f3bc237 to f63c772 Compare April 21, 2026 12:15
@tyulyukov tyulyukov merged commit 5cc2a2e into main Apr 21, 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.

3 participants