Skip to content

Improve site status check for json format#3485

Open
nightnei wants to merge 3 commits into
trunkfrom
printJsonStatusWithoutEmoji
Open

Improve site status check for json format#3485
nightnei wants to merge 3 commits into
trunkfrom
printJsonStatusWithoutEmoji

Conversation

@nightnei
Copy link
Copy Markdown
Contributor

@nightnei nightnei commented May 14, 2026

How AI was used in this PR

AI helped to write the code and we had a few iterations to adjust teh approach

Proposed Changes

  1. For site status --format=json we receive emoji which doesn't make sense for machine-readable output and it forces to use .includes('Online') instead of direct check via === 'Online'
  2. We have localization, so it complicates a lot the condition. As a workaround so far, I found out that we can check for existance of autoLoginUrl, but it's jsut workaround.

So I propose to introduce isOnline: boolean for json.

Testing Instructions

  1. npm run cli:build
  2. node apps/cli/dist/cli/main.mjs site status --path=~/Studio/my-wordpress-website --format=json
  3. Assert that you see isOnline: boolean
  4. node apps/cli/dist/cli/main.mjs site status --path=~/Studio/my-wordpress-website
  5. Assert that no regresion and you don't see isOnline: boolean

@nightnei nightnei requested review from a team, bcotrim and fredrikekelund May 14, 2026 11:25
@nightnei nightnei marked this pull request as draft May 14, 2026 11:30
@nightnei nightnei changed the title Print site status json without emopji Improve site status check for json format May 14, 2026
@nightnei nightnei marked this pull request as ready for review May 14, 2026 11:39
@wpmobilebot
Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 260fef0 vs trunk

app-size

Metric trunk 260fef0 Diff Change
App Size (Mac) 1409.62 MB 1409.62 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 260fef0 Diff Change
load 1506 ms 1496 ms 10 ms ⚪ 0.0%

site-startup

Metric trunk 260fef0 Diff Change
siteCreation 8566 ms 8572 ms +6 ms ⚪ 0.0%
siteStartup 4927 ms 4920 ms 7 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

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