Run the desktop app on native PHP#198
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Part of #196
Desktop now boots the bundled WordPress site with host PHP and SQLite, not WordPress Playground. The snapshot step builds a real WordPress install, seeds Cortext, and includes the small runtime pieces the app needs for routing and desktop auth. This PR also adds a Playwright Electron smoke test and a GitHub Actions workflow for desktop-related changes.
Why
Playground was the bottleneck with the seeded DataViews workspace open. Running both paths on the same machine, against the same data, made the difference pretty clear:
How
php -Sfrom Electron and waiting for it before loading the Cortext admin page.sqlite-database-integration.wp-config.phpwith random salts,CORTEXT_DESKTOP,WP_HOME, andWP_SITEURL.blueprint.jsonand the Playground client from both build and runtime.Trade-offs
phpon the host'sPATH. Bundled PHP per architecture is still future work, not part of this PR.auth_redirect. It is only for desktop snapshots and must never ship to a public WordPress site.Testing Instructions
pdo_sqliteis available onPATH. On macOS,brew install phpis enough.npm install && npm --prefix apps/desktop install && npm --prefix apps/desktop run snapshot. The build takes about 18 seconds; later runs use cached downloads.npm --prefix apps/desktop start. The window should reach Cortext admin in well under a second.npm --prefix apps/desktop run test:e2e. It should finish in about 7 seconds once the snapshot exists.