fix(ext/sw): inactivity timer resets on all non-passive messages (Plan C Phase 5)
DEV-C P2: an active autofiller never opens the popup, so under the old rule it got force-locked despite continuous use. Inverts the rule: reset on all messages except a documented exclusion set (only get_autofill_candidates today). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -48,3 +48,17 @@ export function stopTimer(): void {
|
||||
timerId = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Content-callable message types that should NOT reset the inactivity timer.
|
||||
*
|
||||
* Rationale: a content script reading available autofill candidates is a
|
||||
* passive query — it shouldn't keep the vault alive indefinitely while the
|
||||
* user isn't actually interacting with it.
|
||||
*
|
||||
* Today this is the only known passive read; if a future content message
|
||||
* is also passive, add it here with a one-line justification.
|
||||
*/
|
||||
export const READ_ONLY_CONTENT_CALLABLE: ReadonlySet<string> = new Set([
|
||||
'get_autofill_candidates',
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user