The agent that turns websites into APIs!
fix: address remaining PR review comments
kalil0321bca4c2b0993d
diff --git a/chrome-extension/public/manifest.json b/chrome-extension/public/manifest.jsonindex 34fde9a..aca0b0b 100644--- a/chrome-extension/public/manifest.json+++ b/chrome-extension/public/manifest.json@@ -15,8 +15,7 @@"storage","sidePanel","nativeMessaging",- "tabs",- "scripting"+ "tabs"],"host_permissions": ["<all_urls>"diff --git a/chrome-extension/src/components/icons.tsx b/chrome-extension/src/components/icons.tsxindex 68d7ce2..089cf6e 100644--- a/chrome-extension/src/components/icons.tsx+++ b/chrome-extension/src/components/icons.tsx@@ -41,17 +41,17 @@ export function HugeiconsIcon({ className, size = 24 }: IconProps) {)}-export function PlayIcon({ className }: IconProps) {+export function PlayIcon({ className, size = 24 }: IconProps) {return (- <svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round">+ <svg className={className} width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round"><polygon points="5 3 19 12 5 21 5 3" /></svg>)}-export function StopIcon({ className }: IconProps) {+export function StopIcon({ className, size = 24 }: IconProps) {return (- <svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round">+ <svg className={className} width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round"><rect width="14" height="14" x="5" y="5" rx="1" /></svg>)diff --git a/chrome-extension/src/content/codegen-recorder.ts b/chrome-extension/src/content/codegen-recorder.tsindex 5e382b0..c09d16b 100644--- a/chrome-extension/src/content/codegen-recorder.ts+++ b/chrome-extension/src/content/codegen-recorder.ts@@ -14,7 +14,7 @@ function getSelector(element: Element, depth: number = 0): string {}// Try data-testid firstif (element.hasAttribute('data-testid')) {- return `[data-testid="${element.getAttribute('data-testid')}"]`+ return `[data-testid="${CSS.escape(element.getAttribute('data-testid') || '')}"]`}// Try id@@ -40,7 +40,7 @@ function getSelector(element: Element, depth: number = 0): string {if (element.hasAttribute('name')) {const name = element.getAttribute('name')const tag = element.tagName.toLowerCase()- const selector = `${tag}[name="${name}"]`+ const selector = `${tag}[name="${CSS.escape(name || '')}"]`const matches = document.querySelectorAll(selector)if (matches.length === 1) {return selectordiff --git a/chrome-extension/src/sidepanel/index.html b/chrome-extension/src/sidepanel/index.htmlindex 07daef6..50e95d6 100644--- a/chrome-extension/src/sidepanel/index.html+++ b/chrome-extension/src/sidepanel/index.html@@ -5,7 +5,7 @@<meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Reverse API Engineer</title><!-- Devicon for language icons in code blocks -->- <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/devicon.min.css">+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/[email protected]/devicon.min.css"></head><body><div id="root"></div>diff --git a/chrome-extension/src/sidepanel/side-panel.tsx b/chrome-extension/src/sidepanel/side-panel.tsxindex c303866..57328d3 100644--- a/chrome-extension/src/sidepanel/side-panel.tsx+++ b/chrome-extension/src/sidepanel/side-panel.tsx@@ -189,7 +189,7 @@ export function SidePanel() {setCodegenVisibleDirectory(null)}}- })+ }).catch(() => {})breakcase 'trafficCleared':chrome.runtime.sendMessage({ type: 'getState' }).then(res => {