The design language that makes your AI harness better at design.
JavaScript
fix(extension): popup scan stuck on Scanning after page reload (v1.0.2)
Paul Bakausd154a5feb35c
diff --git a/extension/background/service-worker.js b/extension/background/service-worker.jsindex 1b8b4c768..060e74af1 100644--- a/extension/background/service-worker.js+++ b/extension/background/service-worker.js@@ -238,20 +238,29 @@ chrome.runtime.onConnect.addListener((port) => {}});-// Re-scan on navigation (only if DevTools is open AND user was actively scanning)+// On navigation, reset content-script state for any tracked tab (page reload destroys+// the content script regardless of which UI surfaced it). Auto-rescan is gated separately+// on DevTools being open AND the user having previously engaged.chrome.webNavigation?.onCompleted?.addListener((details) => {if (details.frameId !== 0) return;- if (!devtoolsTabs.has(details.tabId)) return;const state = tabState.get(details.tabId);if (!state) return;- // Only re-scan if the user has actively engaged (had findings or injected previously)++ // Capture engagement state BEFORE clearing (used by the auto-rescan branch).const wasActive = state.injected || state.findings.length > 0;++ // Always clear: the content script is gone after reload, full stop. Skipping this when+ // DevTools wasn't open meant the popup-only flow saw a stale csInjected: true on the+ // second click and silently no-op'd against a tab that had no listener.state.findings = [];state.injected = false;- state.csInjected = false; // page reload destroys the content script+ state.csInjected = false;updateBadge(details.tabId);notifyPanels(details.tabId, { action: 'navigated' });- if (wasActive) {++ // Auto-rescan only when DevTools is the driver — the popup is user-triggered and+ // shouldn't fire scans the user didn't ask for.+ if (devtoolsTabs.has(details.tabId) && wasActive) {setTimeout(() => sendScanToTab(details.tabId), 300);}});diff --git a/extension/manifest.json b/extension/manifest.jsonindex 2a9bb5eea..7b5fb3e9c 100644--- a/extension/manifest.json+++ b/extension/manifest.json@@ -2,7 +2,7 @@"manifest_version": 3,"name": "Impeccable","description": "Detect common UI anti-patterns in any web page",- "version": "1.0.1",+ "version": "1.0.2","permissions": ["activeTab", "scripting", "storage", "webNavigation"],"host_permissions": ["<all_urls>"],"background": {diff --git a/public/index.html b/public/index.htmlindex 44adfee10..baf1aebec 100644--- a/public/index.html+++ b/public/index.html@@ -933,6 +933,17 @@</div><div class="changelog-list" data-reveal>+ <div class="changelog-entry">+ <div class="changelog-version-header">+ <span class="changelog-version">Extension v1.0.2</span>+ <span class="changelog-date">April 29, 2026</span>+ </div>+ <ul class="changelog-items">+ <li><strong>Popup scan no longer hangs after a page reload.</strong> The toolbar-icon flow worked the first time but got stuck on "Scanning…" on subsequent clicks if the page had been reloaded in between. The service worker only cleared its content-script-injected flag when DevTools was open, so the popup-only path saw a stale flag and silently sent its scan request to a tab whose content script had already been wiped. Reset is now unconditional; auto-rescan stays gated to DevTools.</li>+ <li><strong>Detector flags the new monoculture.</strong> The overused-font rule now catches Fraunces, Geist, Mona Sans, Plus Jakarta Sans, Space Grotesk, Recoleta, and Instrument Sans alongside Inter and the older defaults. Brand exceptions for Vercel, Next.js, and GitHub on their own domains.</li>+ </ul>+ </div>+<div class="changelog-entry"><div class="changelog-version-header"><span class="changelog-version">CLI v2.1.8</span>