Content
View differences
Updated by Marc Alcobé about 14 hours ago
### User Story
**As an** app user **As** a \[enter role of user\]
**I want** to be informed when the app is caching data in the background want to** \[enter objective\]
**so that I** understand why the app may be doing work and how it improves performance. that** \[enter desired result\]
### Acceptance Criteria **Acceptance criteria**
* When the app starts a background caching process that is intended to speed up future app usage, a toast banner is displayed to the user.
<br>
**Technical notes**
* The toast banner is displayed only while background caching is actively in progress.
<br>
**Permissions and visibility considerations**
* The toast banner automatically disappears immediately after the caching process completes successfully. Followed by another success banner that also gets automatically dismissed after some seconds or the user press on the X action.
* The toast banner _To whom is not shown if no caching is needed.
* The toast banner is presented as a non-blocking UI element that does not prevent navigation or interaction with the app.
* The toast banner content matches the mockups:
* Title: **“Optimizing your experience”**
* Body: **“We’re saving data to help the app load faster next time. Please don’t close the app while this finishes.”**
* The toast banner includes a leading download/processing icon as shown in the mockups. feature visible?_
* The toast banner appears anchored at the bottom of the screen above the bottom navigation bar (does not overlap the nav items).
* The toast banner respects device safe areas and does not get clipped by screen corners or home indicator areas.
* The toast banner _When is readable in both light and dark mode (or uses the app’s standard toast styling that meets contrast requirements).
* The toast banner does not stack multiple times if multiple caching subtasks start while one caching session is already in progress.
* If caching is restarted while the toast is visible (e.g., additional data caching is triggered), the toast remains visible without flickering or resetting animations.
* If caching fails:
* The toast banner is dismissed.
* No error toast is shown unless explicitly specified elsewhere (failure handling is limited to removal of this informational banner).
* If the user backgrounds the app while caching is in progress and returns before completion:
* The toast banner is visible again on return until caching completes.
* If the user backgrounds the app and the OS terminates it during caching:
* On next launch, the toast banner is shown again only if caching resumes or is required.
* The toast banner is not displayed on screens where toast banners are explicitly disallowed by platform guidelines (if such screens exist), otherwise it can appear on any screen.
* The toast banner behavior is consistent across iOS and Android. visible?_
### Technical Notes **Translation considerations**
* Assumptions:
* “Caching” refers to downloading _Key terms and persisting data locally (e.g., API responses, metadata, configuration) to improve subsequent load times.
* There is a single logical “caching session” that may consist of multiple subtasks.
* State model:
* Maintain a global observable state, e.g. `cacheWarmupState = idle | in_progress | completed | failed`.
* The toast is visible iff `cacheWarmupState == in_progress`.
* Triggering conditions:
* The toast is shown when the caching session starts (transition to `in_progress`).
* The toast is hidden when the session transitions to `completed` or `failed`.
* Concurrency and de-duplication:
* Ensure multiple triggers for caching do not create multiple toasts.
* If multiple subtasks exist, aggregate them under one session and only transition to `completed` when all required subtasks finish.
* Persistence and lifecycle:
* The toast visibility should be derived from runtime state, not persisted storage.
* If the app resumes and caching is still running, the state should rehydrate to `in_progress` so the toast shows again.
* Performance:
* Toast rendering must not block caching work.
* Avoid frequent UI updates; update only on state transitions, not on per-item caching progress unless a progress UI is explicitly requested.
* Telemetry (optional, if existing analytics permits):
* Track `cache_warmup_started`, `cache_warmup_completed`, `cache_warmup_failed` with duration to assess performance wins and failure rates.
### Permissions and Visibility Considerations
* The toast is visible to any user using the app when background caching is phrases in progress.
* No role-based restrictions apply unless the caching feature itself is restricted (not implied by the input). key languages_
### 5\. Translation Considerations **Out of scope**
* Strings requiring localization:
* “Optimizing your experience”
* “We’re saving data <br>
_Set the_ **To be informed/consulted teams** _field to help the app load faster next time. Please don’t close the app while this finishes.”
* "App optimized"
* Must NOT include all teams necessary to be translated:
* Any internal state keys or event names (e.g., `cacheWarmupState`, `cache_warmup_started`)
* Icon identifiers (asset names)
### 6\. Out informed of Scope
* Showing a progress bar, percentage, or detailed list of what is being cached.
* Allowing the user to dismiss the toast manually (not requested; toast is state-driven).
* Adding retry UI or explicit error messaging for caching failures.
* Adding a settings toggle to disable caching or disable the toast. changes._
**As an** app user
**I want** to be informed when the app is caching data in the background
**so that I** understand why the app may be doing work and how it improves performance.
### Acceptance Criteria
* When the app starts a background caching process that is intended to speed up future app usage, a toast banner is displayed to the user.
**Technical notes**
**Permissions and visibility considerations**
* The toast banner
* The toast banner is presented as a non-blocking UI element that does not prevent navigation or interaction with the app.
* The toast banner content matches the mockups:
* Title: **“Optimizing your experience”**
* Body: **“We’re saving data to help the app load faster next time. Please don’t close the app while this finishes.”**
* The toast banner includes a leading download/processing icon as shown in the mockups.
* The toast banner appears anchored at the bottom of the screen above the bottom navigation bar (does not overlap the nav items).
* The toast banner respects device safe areas and does not get clipped by screen corners or home indicator areas.
* The toast banner
* The toast banner does not stack multiple times if multiple caching subtasks start while one caching session is already in progress.
* If caching is restarted while the toast is visible (e.g., additional data caching is triggered), the toast remains visible without flickering or resetting animations.
* If caching fails:
* The toast banner is dismissed.
* No error toast is shown unless explicitly specified elsewhere (failure handling is limited to removal of this informational banner).
* If the user backgrounds the app while caching is in progress and returns before completion:
* The toast banner is visible again on return until caching completes.
* If the user backgrounds the app and the OS terminates it during caching:
* On next launch, the toast banner is shown again only if caching resumes or is required.
* The toast banner is not displayed on screens where toast banners are explicitly disallowed by platform guidelines (if such screens exist), otherwise it can appear on any screen.
* The toast banner behavior is consistent across iOS and Android.
### Technical Notes
* Assumptions:
* “Caching” refers to downloading
* There is a single logical “caching session” that may consist of multiple subtasks.
* State model:
* Maintain a global observable state, e.g. `cacheWarmupState = idle | in_progress | completed | failed`.
* The toast is visible iff `cacheWarmupState == in_progress`.
* Triggering conditions:
* The toast is shown when the caching session starts (transition to `in_progress`).
* The toast is hidden when the session transitions to `completed` or `failed`.
* Concurrency and de-duplication:
* Ensure multiple triggers for caching do not create multiple toasts.
* If multiple subtasks exist, aggregate them under one session and only transition to `completed` when all required subtasks finish.
* Persistence and lifecycle:
* The toast visibility should be derived from runtime state, not persisted storage.
* If the app resumes and caching is still running, the state should rehydrate to `in_progress` so the toast shows again.
* Performance:
* Toast rendering must not block caching work.
* Avoid frequent UI updates; update only on state transitions, not on per-item caching progress unless a progress UI is explicitly requested.
* Telemetry (optional, if existing analytics permits):
* Track `cache_warmup_started`, `cache_warmup_completed`, `cache_warmup_failed` with duration to assess performance wins and failure rates.
### Permissions and Visibility Considerations
* The toast is visible to any user using the app when background caching is
* No role-based restrictions apply unless the caching feature itself is restricted (not implied by the input).
### 5\. Translation Considerations
* Strings requiring localization:
* “Optimizing your experience”
* “We’re saving data
_Set the_ **To be informed/consulted teams** _field
* "App optimized"
* Must NOT
* Any internal state keys or event names (e.g., `cacheWarmupState`, `cache_warmup_started`)
* Icon identifiers (asset names)
### 6\. Out
* Showing a progress bar, percentage, or detailed list of what is being cached.
* Allowing the user to dismiss the toast manually (not requested; toast is state-driven).
* Adding retry UI or explicit error messaging for caching failures.
* Adding a settings toggle to disable caching or disable the toast.