Skip to content

[Personal WP] Install my-apps on existing personal sites#3768

Open
akirk wants to merge 1 commit into
WordPress:trunkfrom
akirk:add-my-apps-personal-wp-migration
Open

[Personal WP] Install my-apps on existing personal sites#3768
akirk wants to merge 1 commit into
WordPress:trunkfrom
akirk:add-my-apps-personal-wp-migration

Conversation

@akirk

@akirk akirk commented Jun 8, 2026

Copy link
Copy Markdown
Member

What?

  • Adds a shared Personal WP App Launcher blueprint helper.
  • Automatically checks existing personal sites for the my-apps plugin file and installs it when missing.
  • Persists a migration marker after the plugin is present and syncs that marker across tabs.

Why?

Older Personal WP sites predate the default my-apps plugin. This equips those sites without reinstalling when users already have the plugin.

Testing

  • npm exec nx test playground-personal-wp -- --run
  • npm exec nx typecheck playground-personal-wp
  • npm exec nx lint playground-personal-wp

@akirk akirk requested review from a team, bgrgicak and Copilot June 8, 2026 12:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a shared “my-apps” (App Launcher) blueprint helper and introduces a one-off migration flow to ensure older Personal WP sites have the plugin installed, persisting and cross-tab syncing a migration marker.

Changes:

  • Add appliedMigrations to site metadata and include it in cross-tab metadata sync.
  • Introduce personalwp/my-apps helpers for blueprint URL creation and plugin presence checks (with tests).
  • Add an automatic migration in the viewport to install my-apps when missing and record the migration timestamp.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/playground/personal-wp/src/lib/state/redux/slice-sites.ts Adds appliedMigrations field to persisted site metadata.
packages/playground/personal-wp/src/lib/state/redux/cross-tab-sync.ts Syncs appliedMigrations across tabs.
packages/playground/personal-wp/src/lib/state/redux/cross-tab-sync.spec.ts Updates tests to cover syncing the new metadata field.
packages/playground/personal-wp/src/lib/personalwp/my-apps.ts Adds shared blueprint constants + helpers for my-apps.
packages/playground/personal-wp/src/lib/personalwp/my-apps.spec.ts Adds tests for blueprint URL and plugin-file check.
packages/playground/personal-wp/src/components/playground-viewport/index.tsx Adds auto-migration logic to install my-apps and persist a marker.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/playground/personal-wp/src/components/playground-viewport/index.tsx Outdated
Comment thread packages/playground/personal-wp/src/components/playground-viewport/index.tsx Outdated
Comment thread packages/playground/personal-wp/src/components/playground-viewport/index.tsx Outdated
Comment thread packages/playground/personal-wp/src/lib/personalwp/my-apps.ts
@akirk akirk force-pushed the add-my-apps-personal-wp-migration branch from 45fb582 to 94fb894 Compare June 8, 2026 13:03
@akirk

akirk commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

Addressed the Copilot review comments:

  • Track my-apps migrations in progress per site with a Set instead of a single slug.
  • Mark migrations through a dedicated metadata thunk so appliedMigrations is merged from current Redux state.
  • Deep-merge appliedMigrations in the metadata reducer for cross-tab updates.
  • Narrow the migration effect dependencies to primitive site fields.
  • Pin the my-apps git:directory resource to commit 4e2c6f58b49bc8ccb88c6413c49929f076f80788.

Re-ran:

  • npm exec nx test playground-personal-wp -- --run
  • npm exec nx typecheck playground-personal-wp
  • npm exec nx lint playground-personal-wp

@akirk akirk self-assigned this Jun 8, 2026
@akirk akirk changed the title Install my-apps on existing personal sites [Personal WP] Install my-apps on existing personal sites Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants