MetaMask / MetaMask/metamask-extension
Define the idle heuristic used by persistence telemetry
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
**What is this about?**
An open popup, full-screen tab, or side panel does not by itself make MetaMask active. An open UI can become idle when the user is not interacting with it. Pending transactions and recent dapp RPC activity also affect the idle value. E4 proposes a 30-second window for dapp RPC activity. The UI inactivity window still needs to be defined.
## Goal
Define and test the idle value that E0 will attach to persistence writes.
## Open questions
- Which interactions count as user activity in the popup, full-screen tab, and side panel?
- How long after the last user interaction should an open UI become idle?
- Which existing source reports UI activity, pending transactions, and recent dapp RPC activity?
- Does any startup or migration period need an explicit classification?
**Technical Details**
The implementation must provide one idle value at the persistence telemetry boundary.
**Acceptance Criteria**
- [ ] One documented idle value is available at the persistence telemetry boundary.
- [ ] An open UI with no recent user interaction can be classified as idle.
- [ ] Tests cover UI activity and inactivity, pending transactions, recent dapp RPC activity, and each time-based transition.
- [ ] The E0 instrumentation in #44250 uses the same value.
**Stakeholder review needed before the work gets merged**
- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)
**References**
- Parent: #44253
- E0 instrumentation: #44250
Contributor guide
Assessment
This issue has not been assessed yet.