Repository navigation
Conversation
There was a problem hiding this comment.
🟡 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.shto build (optionally), start Vite on loopback, launch the debug app with DYLD/XPC framework overrides, and fail closed unlessvmmapverifies the requested WebKit. - Adds
scripts/test-local-webkit-preview.jsand wires it intonpm run test:platformto protect the launcher’s key invariants. - Documents the development-only workflow in
docs/LOCAL_WEBKIT_PREVIEW.mdand exposes the launcher vianpm 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.
| 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 |
| 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/); |
|
GitHub closed this pull request when I renamed its branch to remove the |
Summary
vmmapconfirms the requested WebKit loadedValidation
npm run test:frontend/private/tmp/WebKitBuild-live-resize/Releasevmmapconfirmed/private/tmp/WebKitBuild-live-resize/Release/WebKit.framework/Versions/A/WebKitgit diff --check