Skip to content

feat(featureflags): add typed FeatureFlag<T> and background reset behavior#709

Merged
bmc08gt merged 1 commit into
code/cashfrom
feat/background-idle-reset
May 14, 2026
Merged

feat(featureflags): add typed FeatureFlag<T> and background reset behavior#709
bmc08gt merged 1 commit into
code/cashfrom
feat/background-idle-reset

Conversation

@bmc08gt
Copy link
Copy Markdown
Collaborator

@bmc08gt bmc08gt commented May 14, 2026

Make FeatureFlag generic (FeatureFlag<T: Any>) so option-based flags carry their typed default directly (e.g. BackgroundResetTimeout.FiveMinutes) instead of a raw string. Boolean flags use FeatureFlag<Boolean> unchanged.

Add FlagOption.isDisabled for generic disabled-option detection, replacing hardcoded "never" string checks in the controller. Add defaultEnabled and defaultOption as computed properties derived from the typed default.

Add BackgroundResetEffect composable that records a timestamp on ON_STOP and dismisses all sheets via popUntil when the configured timeout elapses on ON_RESUME. Only triggers on true backgrounding, not ON_PAUSE.

@bmc08gt bmc08gt self-assigned this May 14, 2026
@github-actions github-actions Bot added type: feature New functionality area: ui Compose UI, theme, components, resources labels May 14, 2026
@bmc08gt bmc08gt force-pushed the feat/background-idle-reset branch from 44c6eb4 to fd14f5a Compare May 14, 2026 19:54
…avior

Make FeatureFlag generic (FeatureFlag<T: Any>) so option-based flags
carry their typed default directly (e.g. BackgroundResetTimeout.FiveMinutes)
instead of a raw string. Boolean flags use FeatureFlag<Boolean> unchanged.

Add FlagOption.isDisabled for generic disabled-option detection, replacing
hardcoded never string checks in the controller. Add defaultEnabled and
defaultOption as computed properties derived from the typed default.

Add BackgroundResetEffect composable that records a timestamp on ON_STOP
and dismisses all sheets via popUntil when the configured timeout elapses
on ON_RESUME. Only triggers on true backgrounding, not ON_PAUSE. Defers the
reset when a deeplink is pending — waits for it to be consumed and only pops
sheets if the deeplink did not result in any routing.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
@bmc08gt bmc08gt force-pushed the feat/background-idle-reset branch from fd14f5a to 2329bd7 Compare May 14, 2026 21:56
@bmc08gt bmc08gt merged commit def8e4e into code/cash May 14, 2026
2 of 3 checks passed
@bmc08gt bmc08gt deleted the feat/background-idle-reset branch May 14, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Compose UI, theme, components, resources type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant