π¬ 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: UI consistency audit β tokens, exit confirmation, always-visible actions
Luis Ortiz6e6e968ce198
diff --git a/src/stores/fullview.ts b/src/stores/fullview.tsindex 10b6cec..8bc94ba 100644--- a/src/stores/fullview.ts+++ b/src/stores/fullview.ts@@ -10,7 +10,6 @@ interface GuideExportData {}interface FullviewStore {- // Libraryguides: Guide[];setGuides: (guides: Guide[]) => void;updateGuide: (id: string, patch: Partial<Guide>) => void;@@ -21,12 +20,10 @@ interface FullviewStore {counts: { all: number; starred: number; trash: number };setCounts: (counts: { all: number; starred: number; trash: number }) => void;- // Search modalsearchOpen: boolean;setSearchOpen: (open: boolean) => void;toggleSearch: () => void;- // Guide viewguideTitle: string;setGuideTitle: (title: string) => void;guideStepCount: number;diff --git a/src/ui/fullview/GuideContent.tsx b/src/ui/fullview/GuideContent.tsxindex 8c0f9f8..1a27143 100644--- a/src/ui/fullview/GuideContent.tsx+++ b/src/ui/fullview/GuideContent.tsx@@ -187,18 +187,18 @@ export default function GuideContent({ guideId }: GuideContentProps) {</div><div className="flex items-center gap-1.5 mt-2 mb-4 flex-wrap">- <span className="inline-flex items-center text-[11px] font-medium text-muted-foreground bg-white border border-border px-2.5 py-0.5 rounded-full">+ <span className="inline-flex items-center text-[11px] font-medium text-muted-foreground bg-card border border-border px-2.5 py-0.5 rounded-full">{new Date(data.guide.createdAt).toLocaleDateString('en-US', {month: 'short',day: 'numeric',year: 'numeric',})}</span>- <span className="inline-flex items-center text-[11px] font-medium text-muted-foreground bg-white border border-border px-2.5 py-0.5 rounded-full">+ <span className="inline-flex items-center text-[11px] font-medium text-muted-foreground bg-card border border-border px-2.5 py-0.5 rounded-full">{data.steps.length} step{data.steps.length !== 1 ? 's' : ''}</span>{domain && (- <span className="inline-flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground bg-white border border-border pl-1.5 pr-2.5 py-0.5 rounded-full">+ <span className="inline-flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground bg-card border border-border pl-1.5 pr-2.5 py-0.5 rounded-full"><imgsrc={getFaviconUrl(domain, 16)}alt=""@@ -210,16 +210,18 @@ export default function GuideContent({ guideId }: GuideContentProps) {{domain}</span>)}- <button- onClick={async () => {- await sendMessage('startGuideMe', { guideId });- }}- disabled={!data.steps.some((s) => s.elementMeta)}- className="inline-flex items-center gap-1.5 text-[11px] font-semibold text-primary-foreground bg-primary hover:bg-primary/90 px-3 py-0.5 rounded-full transition-colors disabled:opacity-30 disabled:cursor-not-allowed ml-auto"- >- <Play size={11} />- Guide Me- </button>+ {data.steps.length > 0 && (+ <button+ onClick={async () => {+ await sendMessage('startGuideMe', { guideId });+ }}+ disabled={!data.steps.some((s) => s.elementMeta)}+ className="inline-flex items-center gap-1.5 text-[11px] font-semibold text-primary-foreground bg-primary hover:bg-primary/90 px-3 py-0.5 rounded-full transition-colors disabled:opacity-30 disabled:cursor-not-allowed ml-auto"+ >+ <Play size={11} />+ Guide Me+ </button>+ )}</div><GuideStepListdiff --git a/src/ui/global.css b/src/ui/global.cssindex 9973b0c..eaafd19 100644--- a/src/ui/global.css+++ b/src/ui/global.css@@ -37,6 +37,7 @@--color-warm: #B45309;--color-brown: #78350F;--color-brown-dark: #572508;+ --color-success: #059669;}body {diff --git a/src/ui/sidepanel/App.tsx b/src/ui/sidepanel/App.tsxindex 62c314f..b575b18 100644--- a/src/ui/sidepanel/App.tsx+++ b/src/ui/sidepanel/App.tsx@@ -228,7 +228,7 @@ export default function App() {placeholder="Search guides..."value={search}onChange={(e) => setSearch(e.target.value)}- className="w-full pl-10 pr-3 rounded-xl border-[#ede8e0] bg-white !text-[13px]"+ className="w-full pl-10 pr-3 rounded-xl border-border bg-card !text-[13px]"/></div>diff --git a/src/ui/sidepanel/GuideEditor.tsx b/src/ui/sidepanel/GuideEditor.tsxindex 9d54595..627419b 100644--- a/src/ui/sidepanel/GuideEditor.tsx+++ b/src/ui/sidepanel/GuideEditor.tsx@@ -155,17 +155,19 @@ export default function GuideEditor({ guideId, onBack, onGuideMe }: GuideEditorP><Maximize2 size={15} /></button>- <button- onClick={async () => {- await sendMessage('startGuideMe', { guideId });- onGuideMe?.(guideId);- }}- disabled={!data.steps.some((s) => s.elementMeta)}- className="shrink-0 p-1.5 rounded-md transition-colors text-warm hover:text-accent hover:bg-secondary disabled:opacity-30 disabled:cursor-not-allowed"- title="Guide Me"- >- <Play size={15} />- </button>+ {data.steps.length > 0 && (+ <button+ onClick={async () => {+ await sendMessage('startGuideMe', { guideId });+ onGuideMe?.(guideId);+ }}+ disabled={!data.steps.some((s) => s.elementMeta)}+ className="shrink-0 p-1.5 rounded-md transition-colors text-warm hover:text-accent hover:bg-secondary disabled:opacity-30 disabled:cursor-not-allowed"+ title="Guide Me"+ >+ <Play size={15} />+ </button>+ )}<div className="ml-auto shrink-0"><ExportMenu guideId={guideId} guide={data.guide} steps={data.steps} screenshots={data.screenshots} /></div>diff --git a/src/ui/sidepanel/GuideMeCompletion.tsx b/src/ui/sidepanel/GuideMeCompletion.tsxindex 67a68a3..76342b9 100644--- a/src/ui/sidepanel/GuideMeCompletion.tsx+++ b/src/ui/sidepanel/GuideMeCompletion.tsx@@ -53,7 +53,7 @@ export default function GuideMeCompletion({ guideId, onDone, onRunAgain }: Guide<div className="flex flex-col gap-2">{steps.map((step) => (<div key={step.id} className="flex items-center gap-2.5 text-left">- <div className="w-[22px] h-[22px] rounded-full bg-[#059669] flex items-center justify-center shrink-0">+ <div className="w-[22px] h-[22px] rounded-full bg-success flex items-center justify-center shrink-0"><CheckIcon /></div><span className="text-[13px] text-muted-foreground">{step.description}</span>@@ -65,13 +65,13 @@ export default function GuideMeCompletion({ guideId, onDone, onRunAgain }: Guide<div className="flex gap-2.5 py-5"><buttononClick={onDone}- className="flex-1 py-3.5 rounded-xl font-semibold text-sm bg-secondary border border-border text-foreground"+ className="flex-1 py-3.5 rounded-lg font-semibold text-sm bg-secondary border border-border text-foreground hover:bg-secondary/80 transition-colors">All Done</button><buttononClick={() => onRunAgain(guideId)}- className="flex-1 py-3.5 rounded-xl font-semibold text-sm bg-primary text-primary-foreground"+ className="flex-1 py-3.5 rounded-lg font-semibold text-sm bg-primary text-primary-foreground hover:bg-primary/90 transition-colors">Run Again</button>diff --git a/src/ui/sidepanel/GuideMeView.tsx b/src/ui/sidepanel/GuideMeView.tsxindex 5994e12..88981d0 100644--- a/src/ui/sidepanel/GuideMeView.tsx+++ b/src/ui/sidepanel/GuideMeView.tsx@@ -20,11 +20,55 @@ interface GuideData {screenshots: Map<string, Screenshot>;}+function SadMascot() {+ return (+ <svg width="64" height="54" viewBox="20 55 160 108">+ <rect x="30" y="95" width="140" height="68" rx="8" fill="#451a03" />+ <path d="M30 95 L30 80 Q30 58, 100 58 Q170 58, 170 80 L170 95 Z" fill="#572508" />+ <rect x="30" y="93" width="140" height="3" fill="#FDE68A" />+ <circle cx="74" cy="118" r="10" fill="#2D1305" />+ <circle cx="126" cy="118" r="10" fill="#2D1305" />+ <circle cx="74" cy="120" r="6" fill="#FDE68A" />+ <circle cx="126" cy="120" r="6" fill="#FDE68A" />+ <path d="M88 146 Q100 138 112 146" stroke="#FDE68A" strokeWidth="2.5" fill="none" strokeLinecap="round" />+ </svg>+ );+}++function ExitConfirmation({ onCancel, onConfirm }: { onCancel: () => void; onConfirm: () => void }) {+ return (+ <div className="fixed inset-0 z-20 flex items-center justify-center bg-card/80 backdrop-blur-[2px]">+ <div className="bg-card rounded-2xl border border-border shadow-lg p-6 w-[280px] text-center flex flex-col items-center">+ <SadMascot />+ <h3 className="text-[15px] font-bold text-foreground mt-3 mb-1">Heading out?</h3>+ <p className="text-[12px] text-muted-foreground leading-relaxed mb-5">+ Your walkthrough will stop and the page overlay will be removed.+ </p>+ <div className="flex gap-2.5 w-full">+ <button+ onClick={onCancel}+ className="flex-1 py-2.5 rounded-lg font-semibold text-sm bg-secondary text-foreground hover:bg-secondary/80 transition-colors"+ >+ Stay+ </button>+ <button+ onClick={onConfirm}+ className="flex-1 py-2.5 rounded-lg font-semibold text-sm bg-primary text-primary-foreground hover:bg-primary/90 transition-colors"+ >+ Exit+ </button>+ </div>+ </div>+ </div>+ );+}+export default function GuideMeView({ guideId, onExit, onComplete }: GuideMeViewProps) {const [data, setData] = useState<GuideData | null>(null);const [loading, setLoading] = useState(true);const [activeStepIndex, setActiveStepIndex] = useState(0);const [viewedStepIndex, setViewedStepIndex] = useState(0);+ const [showExitConfirm, setShowExitConfirm] = useState(false);const objectUrlsRef = useRef<Map<string, string>>(new Map());const loadGuide = useCallback(async () => {@@ -116,9 +160,13 @@ export default function GuideMeView({ guideId, onExit, onComplete }: GuideMeViewconst totalSteps = data.steps.length;return (- <div className="min-h-screen bg-card flex flex-col">+ <div className="min-h-screen bg-card flex flex-col relative">+ {showExitConfirm && <ExitConfirmation onCancel={() => setShowExitConfirm(false)} onConfirm={onExit} />}<div className="px-4 pt-3 pb-2 flex items-center gap-2">- <button onClick={onExit} className="shrink-0 p-1 rounded text-warm hover:text-foreground">+ <button+ onClick={() => setShowExitConfirm(true)}+ className="shrink-0 p-1 rounded text-warm hover:text-foreground"+ ><ArrowLeft size={18} /></button><span className="flex-1 text-sm font-semibold text-foreground truncate">{data.guide.title}</span>@@ -133,14 +181,14 @@ export default function GuideMeView({ guideId, onExit, onComplete }: GuideMeView<divkey={step.id}className={`flex-1 h-[3px] rounded-[1.5px] ${- idx < activeStepIndex ? 'bg-[#059669]' : idx === activeStepIndex ? 'bg-amber' : 'bg-border'+ idx < activeStepIndex ? 'bg-success' : idx === activeStepIndex ? 'bg-amber' : 'bg-border'}`}/>))}</div><div className="px-4 pb-3">- <div className="bg-white rounded-2xl border border-border shadow-sm overflow-hidden">+ <div className="bg-card rounded-2xl border border-border shadow-sm overflow-hidden"><div className="p-4 pb-3"><span className="inline-flex items-center gap-1.5 text-[11px] font-semibold bg-secondary text-amber-800 px-2.5 py-1 rounded-full mb-2.5"><span className="w-5 h-5 rounded-full bg-amber text-white flex items-center justify-center text-[10px] font-bold">@@ -224,7 +272,7 @@ export default function GuideMeView({ guideId, onExit, onComplete }: GuideMeView}`}>{isDone ? (- <span className="shrink-0 w-5 h-5 rounded-full bg-[#059669] flex items-center justify-center mt-0.5">+ <span className="shrink-0 w-5 h-5 rounded-full bg-success flex items-center justify-center mt-0.5"><Check size={12} className="text-white" strokeWidth={3} /></span>) : isActive ? (diff --git a/src/ui/sidepanel/LibraryView.tsx b/src/ui/sidepanel/LibraryView.tsxindex b2e7173..a30f356 100644--- a/src/ui/sidepanel/LibraryView.tsx+++ b/src/ui/sidepanel/LibraryView.tsx@@ -113,7 +113,7 @@ export default function LibraryView({ onOpen, searchQuery = '' }: LibraryViewProreturn (<divkey={guide.id}- className="flex items-start gap-3 px-3.5 py-2.5 rounded-xl cursor-pointer group transition-all bg-white border border-[#ede8e0] hover:border-amber hover:shadow-sm"+ className="flex items-start gap-3 px-3.5 py-2.5 rounded-xl cursor-pointer group transition-all bg-card border border-border hover:border-amber hover:shadow-sm"onClick={() => onOpen(guide.id)}><div className="w-7 h-7 mt-0.5 rounded-full flex items-center justify-center shrink-0 overflow-hidden">@@ -148,14 +148,14 @@ export default function LibraryView({ onOpen, searchQuery = '' }: LibraryViewPro<div className="flex items-center gap-0.5 shrink-0"><buttononClick={(e) => handleStar(e, guide.id)}- className={`p-1.5 rounded-lg transition-all hover:text-accent ${guide.starred ? 'opacity-100 text-accent' : 'opacity-0 group-hover:opacity-100 text-border'}`}+ className={`p-1.5 rounded-lg transition-all hover:text-accent ${guide.starred ? 'text-accent' : 'text-border'}`}title={guide.starred ? 'Unstar' : 'Star'}><Star size={13} fill={guide.starred ? 'currentColor' : 'none'} /></button><buttononClick={(e) => handleDelete(e, guide.id)}- className="p-1.5 rounded-lg opacity-0 group-hover:opacity-100 transition-all text-border hover:text-red-500"+ className="p-1.5 rounded-lg transition-all text-border hover:text-red-500"title="Move to trash"><Trash2 size={13} />