Skip to content

Conversation

wojtekn
Copy link
Contributor

@wojtekn wojtekn commented Oct 8, 2025

Related issues

Proposed Changes

  • Added "Beta Features" menu to the app menu (available for all users, not just dev builds)
  • Beta features are disabled by default and saved in appdata-v1.json for cross-app/CLI access
  • Exposed "Studio Sites CLI" as the first beta feature
  • Updated CLI to check betaFeatures.studioSitesCli from appdata instead of ENABLE_CLI_V2 environment variable
  • Added "(Beta)" label to studio site command when the beta feature is enabled
Windows macOS
beta-features-menu-windows-after beta-features-menu-macos

Testing Instructions

Testing the Beta Features Menu

  1. Launch the Studio app
  2. Open the app menu (Studio menu on macOS, or File menu on other platforms)
  3. Find and click the "Beta Features" menu item
  4. You should see the "Studio Sites CLI" checkbox (unchecked by default)

Testing CLI Integration

  1. Build the CLI: npm run make
  2. Run CLI without beta feature: node dist/cli/main.js --help
    • Verify site command is NOT listed
  3. Enable beta feature in Studio app: Check "Beta Features → Studio Sites CLI"
  4. Run CLI again: node dist/cli/main.js --help
    • Verify site Manage local sites (Beta) command is now listed
  5. Test the command: node dist/cli/main.js site list
    • Should work if the beta feature is enabled

Verify Persistence

  1. Enable "Studio Sites CLI" in the app
  2. Quit and restart Studio
  3. Open Beta Features menu - checkbox should remain checked
  4. Check ~/Library/Application Support/Studio/appdata-v1.json (macOS) or equivalent
    • Should contain: "betaFeatures": { "studioSitesCli": true }

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@wojtekn wojtekn self-assigned this Oct 8, 2025
@wojtekn wojtekn requested a review from a team October 8, 2025 15:58
@wojtekn wojtekn marked this pull request as ready for review October 8, 2025 15:58
Copy link
Contributor

@bcotrim bcotrim left a comment

Choose a reason for hiding this comment

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

Works as described and a nice addition in my opinion!
LGTM 👍

@wojtekn
Copy link
Contributor Author

wojtekn commented Oct 9, 2025

@bcotrim Thank you for your review. Your Feature Flags menu implementation paved the way. 🥳

Copy link
Contributor

@katinthehatsite katinthehatsite left a comment

Choose a reason for hiding this comment

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

Functionally, this works for me and I did not run into any issues 👍

I had one suggestion about the naming: to me, as a user with little context, it was not really clear what Studio Sites CLI did, especially since there was also Install CLI... command that was in the top menu. Perhaps we could improve the naming there

@wojtekn
Copy link
Contributor Author

wojtekn commented Oct 9, 2025

@katinthehatsite, do you see any short name we could use instead of the current one to make it more descriptive?

Alternatively, we could use the menu description. It looks like that on macOS:

Screenshot 2025-10-09 at 11 03 24

I'm unsure how it works on Windows, though.

@wojtekn wojtekn force-pushed the add/beta-features-menu branch from 71d0094 to bb91703 Compare October 9, 2025 10:50
Copy link

github-actions bot commented Oct 9, 2025

📊 Performance Test Results

Comparing a9bfcfb vs trunk

site-editor

Metric trunk a9bfcfb Diff Change
load 10348.50 ms 10612.00 ms +263.50 ms 🔴 2.5%

site-startup

Metric trunk a9bfcfb Diff Change
siteCreation 18140.00 ms 23252.00 ms +5112.00 ms 🔴 28.2%
siteStartup 4942.00 ms 5934.00 ms +992.00 ms 🔴 20.1%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

@katinthehatsite
Copy link
Contributor

katinthehatsite commented Oct 9, 2025

Alternatively, we could use the menu description. It looks like that on macOS:

Oh I think this is very nice, let's do that. It would give users a brief idea of what the feature 👍 Worst case, we can try to limit it to Mac

@wojtekn
Copy link
Contributor Author

wojtekn commented Oct 9, 2025

I adjusted it for Windows, as it didn't look great with sublabel:

Before After
beta-features-menu-windows-before beta-features-menu-windows-after

Copy link
Contributor

@nightnei nightnei left a comment

Choose a reason for hiding this comment

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

LGTM and works as expected. Left just a few NIT comments
Screenshot 2025-10-10 at 17 26 09
Screenshot 2025-10-10 at 17 26 25
Screenshot 2025-10-10 at 17 27 35
Screenshot 2025-10-10 at 17 27 47

enableBlueprints: boolean;
}

// eslint-disable-next-line @typescript-eslint/no-empty-object-type
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems we don't need it. Also we can remove it from FeatureFlags.

Suggested change
// eslint-disable-next-line @typescript-eslint/no-empty-object-type

description?: string;
}

export const BETA_FEATURES_DEFINITION: Record< keyof BetaFeatures, BetaFeatureDefinition > = {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems it's not used outside

Suggested change
export const BETA_FEATURES_DEFINITION: Record< keyof BetaFeatures, BetaFeatureDefinition > = {
const BETA_FEATURES_DEFINITION: Record< keyof BetaFeatures, BetaFeatureDefinition > = {

export const BETA_FEATURES: Record< keyof BetaFeatures, BetaFeatureDefinition > =
BETA_FEATURES_DEFINITION;

export function buildBetaFeatures( userData: BetaFeatures | undefined ): BetaFeatures {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export function buildBetaFeatures( userData: BetaFeatures | undefined ): BetaFeatures {
function buildBetaFeatures( userData: BetaFeatures | undefined ): BetaFeatures {

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.

4 participants