π¬ A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots π
TypeScript browser-extensionchrome-extensiondocumentationfirefox-extensionguide-generatorlocal-firstmanifest-v3privacy-firstproductivityreactscreenshotstep-by-step-guidetutorialtypescriptworkflowwxt
fix(firefox): permissions UX + capture reliability + UI truncation
Luis Ortize5cbc9369d8c
diff --git a/package.json b/package.jsonindex 60846c2..57664e4 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "mimik",- "version": "1.0.1",+ "version": "1.0.3","description": "","main": "index.js","packageManager": "[email protected]",diff --git a/src/entrypoints/background/index.ts b/src/entrypoints/background/index.tsindex 8ddf4b5..c39c53c 100644--- a/src/entrypoints/background/index.ts+++ b/src/entrypoints/background/index.ts@@ -54,10 +54,25 @@ async function generateTitleInBackground(guideId: string) {export default defineBackground(() => {logger.info('Background service worker started');- browser.runtime.onInstalled.addListener((details) => {- if (details.reason === 'install') {- browser.tabs.create({ url: browser.runtime.getURL('/onboarding.html') });+ browser.runtime.onInstalled.addListener(async (details) => {+ if (details.reason !== 'install') return;+ if (import.meta.env.BROWSER === 'firefox') {+ // Firefox MV3 bug 1758306: the <all_urls> grant lands in the origin+ // store but is missed by _setupStartupPermissions when populating the+ // API-permission resolution table that captureVisibleTab consults.+ // Result: permissions.contains() returns true but captureVisibleTab+ // silently rejects. Removing the permission here forces a clean state+ // so the user-gesture permissions.request() in onboarding's "Get+ // Started" / sidepanel's "Start Recording" goes through the working+ // re-grant code path. Remove this when Mozilla ships:+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1758306+ try {+ await browser.permissions.remove({ origins: ['<all_urls>'] });+ } catch (err) {+ logger.warn('Failed to clear stale host permission on install', err);+ }}+ browser.tabs.create({ url: browser.runtime.getURL('/onboarding.html') });});setSidePanelBehavior(true);diff --git a/src/ui/sidepanel/LibraryView.tsx b/src/ui/sidepanel/LibraryView.tsxindex b7bad5e..d6d2a95 100644--- a/src/ui/sidepanel/LibraryView.tsx+++ b/src/ui/sidepanel/LibraryView.tsx@@ -157,17 +157,18 @@ export default function LibraryView({ onOpen, searchQuery = '' }: LibraryViewPro<p className={`text-[13px] font-medium truncate ${isEmpty ? 'text-[#8B92A8]' : 'text-foreground'}`}>{guide.title}</p>- <p className="text-[10px] mt-0.5 text-[#8B92A8]">{formatRelativeTime(guide.updatedAt)}</p>+ <div className="flex items-center gap-2 mt-0.5">+ <span className="text-[10px] text-[#8B92A8]">{formatRelativeTime(guide.updatedAt)}</span>+ {guide.stepIds.length > 0 && (+ <span className="text-[9px] font-semibold text-muted-foreground bg-secondary px-2 py-0.5 rounded-full leading-none">+ {guide.stepIds.length !== 1+ ? i18n.t('fullview.stepCountPlural', [String(guide.stepIds.length)])+ : i18n.t('fullview.stepCount', [String(guide.stepIds.length)])}+ </span>+ )}+ </div></div>- {guide.stepIds.length > 0 && (- <span className="text-[9px] font-semibold text-muted-foreground bg-secondary px-2 py-1 rounded-full shrink-0 leading-none mt-0.5">- {guide.stepIds.length !== 1- ? i18n.t('fullview.stepCountPlural', [String(guide.stepIds.length)])- : i18n.t('fullview.stepCount', [String(guide.stepIds.length)])}- </span>- )}-<div className="flex items-center gap-0.5 shrink-0"><buttononClick={(e) => handleStar(e, guide.id)}diff --git a/wxt.config.ts b/wxt.config.tsindex d386c05..fabbaa1 100644--- a/wxt.config.ts+++ b/wxt.config.ts@@ -37,8 +37,9 @@ export default defineConfig({"webNavigation",...(isFirefox ? [] : ["sidePanel"]),],- ...(isFirefox ? {} : { host_permissions: ["<all_urls>"] }),- ...(isFirefox ? {} : { minimum_chrome_version: "118" }),+ ...(isFirefox+ ? { optional_host_permissions: ["<all_urls>"] }+ : { host_permissions: ["<all_urls>"], minimum_chrome_version: "118" }),icons: {16: 'icon16.png',32: 'icon32.png',@@ -57,7 +58,7 @@ export default defineConfig({browser_specific_settings: {gecko: {id: "[email protected]",- strict_min_version: "112.0",+ strict_min_version: "128.0",data_collection_permissions: {required: ["none"],},