feat(push): gate Live Activity push behind a feature flag, off by default - #545
Open
RonenMars wants to merge 1 commit into
Open
feat(push): gate Live Activity push behind a feature flag, off by default#545RonenMars wants to merge 1 commit into
RonenMars wants to merge 1 commit into
Conversation
…ault Live Activity push came up whenever APNS_KEY was set, which made a credential the only switch. That is the wrong switch: the surface needs a registered push-to-start token as well, and without one mobile falls back to starting the activity locally, where it only updates while the app is foregrounded and expires silently at iOS's ~8h cap. initLiveActivityPush() now checks the liveActivityPush flag before reading the environment, so a box with a valid p8 stays off until someone asks for it. The early return logs at live_activity.disabled naming the flag, because this box used to print "Live Activity push enabled" at the same point and an ignored credential must not look like a missing one. tb-mobile reads the flag over GET /api/config/feature-flags and skips its own local path, so one switch governs both halves; that side ships separately.
RonenMars
force-pushed
the
feat/live-activity-push-flag
branch
from
August 12, 2026 14:17
16f36dd to
770fc31
Compare
This was referenced Aug 12, 2026
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.
Live Activity push came up whenever
APNS_KEYwas set, which made a credential the only switch.That is the wrong switch: the surface also needs a registered push-to-start token, and without one tb-mobile falls back to starting the activity locally — where it only updates while the app is foregrounded, freezes on backgrounding, and expires silently at iOS's ~8h cap.
initLiveActivityPush()now checks the newliveActivityPushfeature flag before it reads the environment, so a box with a valid p8 stays off until someone asks for it.Default off, env
THREADBASE_FEATURE_LIVE_ACTIVITY_PUSH, same registry and precedence as the existing flags.The early return logs at
live_activity.disabledand names the flag.This box previously printed "Live Activity push enabled" at exactly that point, so an ignored credential must not look like a missing one.
Both halves, one switch
tb-mobile reads this flag over
GET /api/config/feature-flagsand skips its own local ActivityKit path — and the Android ongoing-notification equivalent — when it is off.That side ships in RonenMars/tb-mobile as a separate PR on the same branch name; this PR alone only stops the server pushing.
Verified state
npm run lintclean (tsc + biome).__tests__/live-activity-flag.test.tspasses 3/3, and I confirmed the gate is load-bearing by neutering it and watching the off-case go red before restoring it.The test carries a positive control: with the flag on and the same fake credentials,
live_activity.enabledfires; with it off, onlylive_activity.disableddoes.Full suite: 1918 passed, 19 failed.
All 19 failures are timeouts (4 test, 3 hook, the rest cascading) across
cors-middleware,pair-endpoints,security-hardeningandwebhook-update, with zero assertion failures.The same four files fail on
origin/mainwith a different random subset (8 failed / 27 passed), so this is pre-existing flakiness under host load rather than a regression from this branch.