Skip to content

Split project inputs and destination selection out of NativePreviewBuild - #508

Merged
lynnswap merged 2 commits into
mainfrom
claude/split-native-preview-build
Nov 20, 2026
Merged

lynnswap merged 2 commits into
mainfrom
claude/split-native-preview-build

Conversation

@lynnswap

Copy link
Copy Markdown
Owner

Summary

Splits project input synchronization and destination selection out of NativePreviewBuild into two new classes. Behavior does not change. This is the last of four PRs for #489, and it cuts NativePreviewBuild from 2,241 to about 1,050 lines.

Details

  • NativePreviewProjectInputs synchronizes project containers and collects input roots. It owns synchronizedProjects.
  • NativePreviewDestinations handles the planning context, destination resolution and selection, the source plan, metadata decoding, and the framework agent. It owns destinationPreparation and sourceSelections.
    • Its nested DestinationSelection and DestinationResolution types are now Selection and Resolution.
    • The native ABI lookups still use Xcode's own name, RenderPreviewAction.DestinationResolution.
  • NativePreviewBuild keeps the build operation and the target records.
  • workspaceBuilder(for:) is now Selection.workspaceBuilder(). It only reads the selection's preview host, and it never awaited anything.
  • Source moves to NativePreviewDefinitions.Source, next to the definitions that produce it.
  • The Objective-C getter helpers move into a shared NativeObjCGetters enum. nativePreviewOwnedValue and NativePreviewBuildURL go from file-private to internal so that both files can use them.
  • NativePreviewTool owns one instance of each new class, just as it owned one builder before.

Testing

  • swift build --build-tests
  • Compared every string literal in the native runtime sources with main. No native ABI names changed.
  • M6 mini, xcode-runner test --scheme XcodeMCPNativeRuntimeTests: everything passed except NativeApplicationLaunchTests, whose hostless cases also fail intermittently on main on that host.
  • Live preview rendering against a real workspace was not run. The unit tests do not exercise the native destination lookup.

Related

🤖 Generated with Claude Code

lynnswap and others added 2 commits November 20, 2026 15:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lynnswap
lynnswap merged commit 1dcc7bb into main Nov 20, 2026
@lynnswap
lynnswap deleted the claude/split-native-preview-build branch November 20, 2026 06:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T06:14:27.243468Z 668bba8 PR opened
🔒 Security Review ✅ Completed 2026-11-20T06:16:29.711353Z 668bba8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide how to split the native preview classes

1 participant