Skip to content

Add verified local WebKit preview launcher - #306

Closed
JJJ wants to merge 2 commits into
mainfrom
codex/local-webkit-preview
Closed

JJJ wants to merge 2 commits into
mainfrom
codex/local-webkit-preview

Conversation

@JJJ

@JJJ JJJ commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an opt-in macOS launcher for running Pasted against a caller-supplied local WebKit build
  • propagate framework selection to the app and its XPC services, then fail closed unless vmmap confirms the requested WebKit loaded
  • keep ordinary builds, release configuration, and Pasted data untouched
  • document the development-only workflow and add a portable source-contract test

Validation

  • npm run test:frontend
  • end-to-end launch against /private/tmp/WebKitBuild-live-resize/Release
  • vmmap confirmed /private/tmp/WebKitBuild-live-resize/Release/WebKit.framework/Versions/A/WebKit
  • git diff --check

Copilot AI lite review requested due to automatic review settings September 1, 2026 21:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new platform test and launcher script include portability/usability issues (hard bash dependency in the test, and missing node_modules validation when skipping builds) that should be addressed before merging.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds an opt-in macOS development launcher that runs Pasted against a caller-supplied local WebKit build, verifies the loaded framework via vmmap, and documents the workflow while enforcing a lightweight source-contract test in the frontend validation suite.

Changes:

  • Introduces scripts/run-with-local-webkit.sh to build (optionally), start Vite on loopback, launch the debug app with DYLD/XPC framework overrides, and fail closed unless vmmap verifies the requested WebKit.
  • Adds scripts/test-local-webkit-preview.js and wires it into npm run test:platform to protect the launcher’s key invariants.
  • Documents the development-only workflow in docs/LOCAL_WEBKIT_PREVIEW.md and exposes the launcher via npm run dev:local-webkit.
File summaries
File Description
scripts/test-local-webkit-preview.js Adds a platform/source-contract test to keep the local WebKit launcher’s behavior and safety invariants stable.
scripts/run-with-local-webkit.sh Implements the macOS-only local WebKit preview launcher with vmmap verification and cleanup traps.
package.json Adds dev:local-webkit and includes the new contract test in test:platform.
docs/LOCAL_WEBKIT_PREVIEW.md Documents how to run Pasted against a local WebKit build and the intended development-only usage.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +67 to +73
if [[ "${PASTED_LOCAL_WEBKIT_SKIP_BUILD:-0}" != "1" ]]; then
if [[ ! -d node_modules ]]; then
echo "Install the locked frontend dependencies with npm ci first." >&2
exit 1
fi
cargo build --locked --manifest-path src-tauri/Cargo.toml --bin pasted-app
fi
Comment on lines +8 to +14
const syntax = spawnSync('bash', ['-n', scriptPath], { encoding: 'utf8' });
assert.equal(syntax.status, 0, syntax.stderr);

const help = spawnSync('bash', [scriptPath, '--help'], { encoding: 'utf8' });
assert.equal(help.status, 0, help.stderr);
assert.match(help.stdout, /WebKitBuild\/Release/);
assert.match(help.stdout, /vmmap confirms/);
@JJJ JJJ closed this Sep 1, 2026
@JJJ
JJJ deleted the codex/local-webkit-preview branch September 1, 2026 23:42
@JJJ

JJJ commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

GitHub closed this pull request when I renamed its branch to remove the codex/ prefix. The same work continues in #309 on eng/local-webkit-preview, with the additional privacy-safe disposable demo database and paused clipboard capture.

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.

2 participants