Harden stage environment toggle and env normalization#8475
Merged
atavism merged 12 commits intojigar/stage-envfrom Feb 17, 2026
Merged
Harden stage environment toggle and env normalization#8475atavism merged 12 commits intojigar/stage-envfrom
atavism merged 12 commits intojigar/stage-envfrom
Conversation
* Hide onboarding page and datacap in ios and update build number * code review updates
* pull in radiance changes
* update design size for tablets * add cap scaling * update mintextadapt * logo updates and clean-ups * update text fields * clean-ups * clean-ups * fix scaling issue --------- Co-authored-by: Jigar-f <jigar@getlantern.org>
* add support for internal Android releases * use correct name for internal track * update r0adkll/upload-google-play * Fix track name * update versionCode * update foreground service permission * disable exact alarm
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens environment handling (stage vs prod) in-app and modernizes the release pipeline to support multiple build types (production/beta/internal/nightly), including consistent versioning, artifact naming, and publishing.
Changes:
- Normalize persisted environment values to
stage/prodand avoid destructive data-directory clearing on env toggle. - Rework GitHub Actions release automation: centralized metadata/version generation, draft release creation/finalization, artifact uploads to S3 + GitHub Release, and appcast updates (plus removal of the separate nightly workflow).
- UI/UX adjustments for safe areas and tablet scaling caps; Android VPN service hardening for TUN fd lifecycle.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/generate_appcast.py | Adds BUILD_TYPE handling for production vs beta appcast generation. |
| scripts/ci/version.sh | New helper to validate/extract/generate versions for build types. |
| scripts/ci/publish-to-s3.sh | New script to upload per-platform artifacts to versioned + latest S3 paths. |
| scripts/ci/format.sh | New formatter for release notes, job summary, and Slack payloads. |
| pubspec.yaml | Increments build number. |
| lib/main.dart | Removes commented-out timezone code. |
| lib/lantern_app.dart | Uses designSizeFor(context) for ScreenUtil design size. |
| lib/lantern/lantern_ffi_service.dart | Normalizes Radiance env to stage/prod. |
| lib/features/plans/plans.dart | Wraps body in SafeArea. |
| lib/features/onboarding/onboarding.dart | Adjusts onboarding flow to skip slide 3 on iOS. |
| lib/features/home/provider/app_setting_notifier.dart | Normalizes env values and changes staging toggle behavior to a marker-file approach. |
| lib/features/home/home.dart | Hides data usage widget on iOS in one branch. |
| lib/features/developer/developer_mode.dart | Treats stage and legacy staging as staging; awaits env switch then shows restart dialog. |
| lib/core/widgets/lantern_logo.dart | Caps logo sizing using MediaQuery width (tablet-friendly). |
| lib/core/models/entity/app_setting_entity.dart | Defaults environment to prod. |
| lib/core/common/cap_scaling.dart | New capped scaling helpers (sp/h). |
| lib/core/common/app_text_field.dart | Uses capped scaling for font sizes and centers text vertically. |
| lib/core/common/app_dimens.dart | Adds designSizeFor(context) and tablet sizing behavior. |
| lib/core/common/app_buttons.dart | Uses capped scaling for font/icon sizing and refactors button style helpers. |
| ios/Runner.xcodeproj/project.pbxproj | Removes simulator arch exclusion. |
| android/app/src/main/kotlin/.../LanternVpnService.kt | Adds synchronized TUN fd close to prevent races/orphaned TUN. |
| android/app/src/main/AndroidManifest.xml | Changes foreground service permission/type and comments out exact alarm permission. |
| android/app/build.gradle | Changes Android versionCode computation. |
| Makefile | Installer naming now omits -production suffix; adds iOS installer naming. |
| .github/workflows/release.yml | Major release workflow overhaul: schedule/manual builds, draft release create/finalize, S3/GH uploads, appcast update, Play/TestFlight steps. |
| .github/workflows/nightly.yml | Removes separate nightly workflow. |
| .github/workflows/build-windows.yml | Switches to installer_base_name and updates artifact naming; adds caching. |
| .github/workflows/build-macos.yml | Switches to installer_base_name, adds caching (Go/gomobile/Flutter) and env wiring. |
| .github/workflows/build-linux.yml | Switches to installer_base_name, adds caching and env wiring. |
| .github/workflows/build-ios.yml | Switches to installer_base_name, adds caching (Go/gomobile/Flutter) and env wiring. |
| .github/workflows/build-android.yml | Switches to installer_base_name, adds caching (gomobile) and env wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jigar-f
reviewed
Feb 18, 2026
| final markerFile = File('${dir.path}/.radiance_env'); | ||
|
|
||
| // Delete and recreate the directory | ||
| if (dir.existsSync()) { |
Contributor
There was a problem hiding this comment.
@atavism Why were these changes removed? Any reason? This is the change actually needed to make staging work.
jigar-f
added a commit
that referenced
this pull request
Feb 20, 2026
* work for stage env * update var name * use output var * set output * Update nightly.yml * try to use as env variable * Update build-macos.yml * update name * Remove stage for now & add default value * keep default and pass value * Simplify macos changes * Remove stage again * More debugging * compare it as string * added debug log * update radiance. * updated radiance * update radiance * use remote source * more stage changes * use radiance remote * Add stage env connection. * Revert workflows * generate ffi * use radiance remote and remove duplication logic * ran make format * use in app purchase for macos. * back to storekit one. * Switch to user on acknowledge purchase if found. * use new radiance. * update radiance. * do not clear all data * Harden stage environment toggle and env normalization (#8475) * Hide onboarding and datacap in ios (#8466) * Hide onboarding page and datacap in ios and update build number * code review updates * Garmr/ipc auth update (#8468) * pull in radiance changes * remove exclude arch in debug mode * Update to latest radiance with no DNSTT since its breaking stuff (#8470) * build and release updates (#8455) * add safe area in plans * Fix tablet upscaling and cap shared component sizing (#8457) * update design size for tablets * add cap scaling * update mintextadapt * logo updates and clean-ups * update text fields * clean-ups * clean-ups * fix scaling issue --------- Co-authored-by: Jigar-f <jigar@getlantern.org> * Fix for closing TUN (#8471) * Fix stage env toggle and store gating * Narrow followups to staging env * Enable Play store uploads for internal Android releases (#8467) * add support for internal Android releases * use correct name for internal track * update r0adkll/upload-google-play * Fix track name * update versionCode * update foreground service permission * disable exact alarm --------- Co-authored-by: jigar-f <132374182+jigar-f@users.noreply.github.com> Co-authored-by: garmr-ulfr <104022054+garmr-ulfr@users.noreply.github.com> Co-authored-by: Jigar-f <jigar@getlantern.org> Co-authored-by: Myles Horton <afisk@getlantern.org> Co-authored-by: Jay <110402935+jay-418@users.noreply.github.com> * Revert back some changes * Fix issue with stage * Fix stage issue on windows * update logs * revert back macos in app purchase changes --------- Co-authored-by: atavism <atavism@users.noreply.github.com> Co-authored-by: garmr-ulfr <104022054+garmr-ulfr@users.noreply.github.com> Co-authored-by: Myles Horton <afisk@getlantern.org> Co-authored-by: Jay <110402935+jay-418@users.noreply.github.com> Co-authored-by: atavism <paul@getlantern.org>
atavism
added a commit
that referenced
this pull request
Feb 20, 2026
* work for stage env * update var name * use output var * set output * Update nightly.yml * try to use as env variable * Update build-macos.yml * update name * Remove stage for now & add default value * keep default and pass value * Simplify macos changes * Remove stage again * More debugging * compare it as string * added debug log * update radiance. * updated radiance * update radiance * use remote source * more stage changes * use radiance remote * Add stage env connection. * Revert workflows * generate ffi * use radiance remote and remove duplication logic * ran make format * use in app purchase for macos. * back to storekit one. * Switch to user on acknowledge purchase if found. * use new radiance. * update radiance. * do not clear all data * Harden stage environment toggle and env normalization (#8475) * Hide onboarding and datacap in ios (#8466) * Hide onboarding page and datacap in ios and update build number * code review updates * Garmr/ipc auth update (#8468) * pull in radiance changes * remove exclude arch in debug mode * Update to latest radiance with no DNSTT since its breaking stuff (#8470) * build and release updates (#8455) * add safe area in plans * Fix tablet upscaling and cap shared component sizing (#8457) * update design size for tablets * add cap scaling * update mintextadapt * logo updates and clean-ups * update text fields * clean-ups * clean-ups * fix scaling issue --------- Co-authored-by: Jigar-f <jigar@getlantern.org> * Fix for closing TUN (#8471) * Fix stage env toggle and store gating * Narrow followups to staging env * Enable Play store uploads for internal Android releases (#8467) * add support for internal Android releases * use correct name for internal track * update r0adkll/upload-google-play * Fix track name * update versionCode * update foreground service permission * disable exact alarm --------- Co-authored-by: jigar-f <132374182+jigar-f@users.noreply.github.com> Co-authored-by: garmr-ulfr <104022054+garmr-ulfr@users.noreply.github.com> Co-authored-by: Jigar-f <jigar@getlantern.org> Co-authored-by: Myles Horton <afisk@getlantern.org> Co-authored-by: Jay <110402935+jay-418@users.noreply.github.com> * Revert back some changes * Fix issue with stage * Fix stage issue on windows * update logs * revert back macos in app purchase changes --------- Co-authored-by: atavism <atavism@users.noreply.github.com> Co-authored-by: garmr-ulfr <104022054+garmr-ulfr@users.noreply.github.com> Co-authored-by: Myles Horton <afisk@getlantern.org> Co-authored-by: Jay <110402935+jay-418@users.noreply.github.com> Co-authored-by: atavism <paul@getlantern.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rebases stage-env follow-ups on the latest jigar/stage-env, normalizes env values to stage/prod and avoids clearing data on env toggle