Skip to content

Comments

Harden stage environment toggle and env normalization#8475

Merged
atavism merged 12 commits intojigar/stage-envfrom
atavism/stage-env-followups
Feb 17, 2026
Merged

Harden stage environment toggle and env normalization#8475
atavism merged 12 commits intojigar/stage-envfrom
atavism/stage-env-followups

Conversation

@atavism
Copy link
Contributor

@atavism atavism commented Feb 17, 2026

Rebases stage-env follow-ups on the latest jigar/stage-env, normalizes env values to stage/prod and avoids clearing data on env toggle

jigar-f and others added 12 commits February 12, 2026 19:59
* 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
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/prod and 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.

@atavism atavism merged commit d28d9cf into jigar/stage-env Feb 17, 2026
6 checks passed
@atavism atavism deleted the atavism/stage-env-followups branch February 17, 2026 18:20
final markerFile = File('${dir.path}/.radiance_env');

// Delete and recreate the directory
if (dir.existsSync()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@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>
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.

5 participants