Resolves once the date has been backfilled (or was already present).
await ensureInstallDate(); // sets installedAt on a profile that had none
export async function ensureInstallDate(): Promise<void> {
const state = await getReviewPromptState();
if (state.installedAt > 0) return;
await cstorage.local.set({
[CACHE.REVIEW_PROMPT]: { ...state, installedAt: Date.now() },
});
}
Records the install date the first time it's seen. New installs get an exact date from the service worker; pre-existing users are backfilled with "now" on their first open after this ships. A no-op once
installedAtis set.