MetaMask / MetaMask/snaps

Revisit `onActive` and `onInactive`

Open
#3,620 0 comments 0 reactions 0 assignees View on GitHub
snaps-refined-backlog
Dominant language
TypeScript
Stars
853
Forks
662
Avg merge
2d 8h
Merged PRs (30d)
8

Description

We should revisit the `onActive` and `onInactive` handlers at some point to come up with a better signal for the client being inactive.

Currently it is flagged as inactive as soon as the extension window is closed, but users may close it to view a dapp, opening it seconds/minutes later.

We may also choose to implement new handlers for this case.

Blocked for now.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing `onActive` and `onInactive` handlers and how closing the extension window currently marks the client inactive. Determine whether improved signaling or new handlers can distinguish closing the window to view a dapp from genuine inactivity; the issue is done when that behavior is resolved and the chosen handler approach is implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.