Skip to content

Improve minimal mode detection: drop ConfigCat, use isDedicatedInstallation#21289

Merged
geropl merged 1 commit intomainfrom
improve-minimal-mode-detection
Feb 5, 2026
Merged

Improve minimal mode detection: drop ConfigCat, use isDedicatedInstallation#21289
geropl merged 1 commit intomainfrom
improve-minimal-mode-detection

Conversation

@geropl
Copy link
Member

@geropl geropl commented Feb 3, 2026

Summary

Improves the minimal mode detection logic by removing the ConfigCat feature flag dependency and using environment-based detection instead.

Changes

Detection Logic

  • gitpod.io: Always use minimal mode (synchronous, no network call needed)
  • Preview environments: Use isDedicatedInstallation with localStorage caching
  • Dedicated/self-hosted: Never use minimal mode

Technical Improvements

  • Remove async ConfigCat flag check that caused blank page while loading
  • Replace document.write() with innerHTML to avoid deprecation issues
  • Add localStorage caching for isDedicatedInstallation in preview environments (instant on subsequent loads)

Preview Environment Default

  • Change GITPOD_WITH_DEDICATED_EMU default from false to true
  • This means preview environments now default to isDedicatedInstallation=true (minimal mode OFF)
  • Set GITPOD_WITH_DEDICATED_EMU=false to test minimal mode in preview

Testing

The localStorage override still works for manual testing:

  • localStorage.setItem('minimal_gitpod_io_mode', 'true') - force minimal mode
  • localStorage.setItem('minimal_gitpod_io_mode', 'false') - force full app

Behavior Matrix

Environment Minimal Mode
gitpod.io Always ON
Preview (default) OFF (isDedicatedInstallation=true)
Preview (GITPOD_WITH_DEDICATED_EMU=false) ON
Dedicated/self-hosted Always OFF

@geropl geropl force-pushed the improve-minimal-mode-detection branch from fac1fa4 to cae9341 Compare February 5, 2026 07:08
@geropl geropl force-pushed the improve-minimal-mode-detection branch from cae9341 to 2fa2555 Compare February 5, 2026 07:12
@geropl geropl force-pushed the improve-minimal-mode-detection branch from 2fa2555 to 1824430 Compare February 5, 2026 08:14
return;
}
// Production gitpod.io - always minimal mode
if (isProductionGitpodIo()) {
Copy link
Contributor

@mustard-mh mustard-mh Feb 5, 2026

Choose a reason for hiding this comment

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

&& !isWebsiteSlug

Otherwise the website redirection doesn't work

Copy link
Member Author

Choose a reason for hiding this comment

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

@mustard-mh Cleaned up the mess, would appreciate your re-review! 🙏

@geropl geropl force-pushed the improve-minimal-mode-detection branch from 1824430 to 7e76d15 Compare February 5, 2026 09:46
…lation

- Remove ConfigCat feature flag dependency for minimal mode detection
- gitpod.io: always use minimal mode (synchronous, no network call)
- Preview environments: use isDedicatedInstallation with localStorage caching
- Dedicated/self-hosted: never use minimal mode
- Replace document.write() with innerHTML to avoid deprecation issues
- Change GITPOD_WITH_DEDICATED_EMU default to true in preview deployments

The localStorage override (minimal_gitpod_io_mode=true/false) still works for testing.

Co-authored-by: Ona <no-reply@ona.com>
@geropl geropl force-pushed the improve-minimal-mode-detection branch from 7e76d15 to 8b06b57 Compare February 5, 2026 10:03
@geropl geropl marked this pull request as ready for review February 5, 2026 10:04
@geropl geropl requested a review from a team as a code owner February 5, 2026 10:04
Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

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

LGTM

@geropl geropl merged commit f881393 into main Feb 5, 2026
15 checks passed
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