Sync site list when CLI creates sites while app is running #2313
+23
−1
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.








Related issues
Proposed Changes
useIpcListenerforuser-data-updatedevent inuse-site-details.tsxto refresh the site list when the appdata file changes externally (e.g., when CLI creates a site or modifies site settings)Root cause: The file watcher (
user-data-watcher.ts) already broadcastsuser-data-updatedIPC events when the appdata file changes, butuse-site-details.tsxwas not listening to this event. The snapshot slice listened to it for preview sites, but the main site list did not.Testing Instructions
Test STU-1164 (Site creation)
npm run cli:buildnode dist/cli/main.js site create --path /tmp/test-site-cliTest STU-1163 (Site settings changes)
node dist/cli/main.js site set-domain hello.wp.local --path PATH_TO_SITEset-php-version,set-wp-version,set-httpsPre-merge Checklist