Skip to content

feat(mac): migrate renderer hot path to AppKit - #437

Merged
SergeSerb2 merged 5 commits into
mainfrom
codex/appkit-renderer-foundation
Aug 1, 2026
Merged

feat(mac): migrate renderer hot path to AppKit#437
SergeSerb2 merged 5 commits into
mainfrom
codex/appkit-renderer-foundation

Conversation

@SergeSerb2

Copy link
Copy Markdown
Owner

Summary

  • Migrates the macOS sidebar, chat timeline, Markdown, and measured diff hot paths to native AppKit controllers while keeping AppModel and the existing domain models authoritative.
  • Adds renderer-neutral presentation stores, scoped mutation/action boundaries, keyed collection updates, row reuse and height infrastructure, TextKit 2 Markdown, exact scroll anchoring, and deterministic performance probes.
  • Makes AppKit the compiled default after Gates A-E passed. SERGECODE_MAC_RENDERER=swiftui remains the immediate process-local rollback. Legacy SwiftUI deletion is deliberately reserved for Gate F after an accepted release soak.

Area

  • apps/mac — native macOS app
  • apps/windows — Windows desktop app
  • apps/mobile — iPhone companion app
  • apps/server — backend server
  • Shared packages (packages/contracts, packages/shared, packages/client-runtime, …) or relay (infra/relay)
  • Build, CI, or release tooling
  • Docs

Release size

  • size:XS — tiny internal, documentation, or narrowly scoped fix
  • size:S — small user-visible fix or contained improvement
  • size:M — normal feature or meaningful behavior change
  • size:L — broad feature or substantial cross-package change
  • size:XL — release-system, architecture, or ecosystem-scale change

Verification

  • pnpm run verify --all passes (check + typecheck + tests; adds lint:mobile and the Swift suite)
  • pnpm run test:mac passes (required for apps/mac changes)
  • Manually verified (describe below)

Verification results:

  • Full gate: all five verification steps passed; 0 check errors, all package typechecks/tests passed, 1,104 macOS app tests passed, 28 SidecarKit tests passed, and the mobile native static gate passed.
  • Gate D exact 60-second AppKit stream soak: 1,819 deltas / 3,725,312 bytes; pinned p95/p99 8.335/12.431 ms; unpinned 5.031/6.783 ms; offscreen 5.368/7.165 ms; no qualified-phase stalls over 100 ms and zero full reload/group/activity/fallback/anchor failures.
  • Gate E no-override seven-scene matrix passed with renderer=appkit. Qualified stream p95 was 7.392 ms pinned, 4.865 ms unpinned, and 4.559 ms offscreen.
  • The identical seven-scene matrix passed with SERGECODE_MAC_RENDERER=swiftui and renderer=swiftui, proving the rollback path.
  • Local evidence: .artifacts/appkit-gate-d-stream-soak-final-3/evidence.json, .artifacts/appkit-gate-e-default-final-1/evidence.json, and .artifacts/swiftui-gate-e-fallback-final-1/evidence.json.

Screenshots / Recordings

The in-process UIProbe captured all seven deterministic scenes for both the default AppKit path and explicit SwiftUI fallback under the Gate E artifact directories listed above.

Release notes

SurgeCode now uses a native AppKit renderer by default for the macOS sidebar, conversation timeline, Markdown, and diff review, with a tested SwiftUI rollback switch retained during rollout.

@SergeSerb2 SergeSerb2 added the size:XL Release-system, architecture, or ecosystem-scale change label Aug 1, 2026
@SergeSerb2
SergeSerb2 merged commit 914e7e0 into main Aug 1, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL Release-system, architecture, or ecosystem-scale change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant