From 773f2f3cf99426b495e025d1eedc26e840d4cf7c Mon Sep 17 00:00:00 2001 From: API Test Bot Date: Wed, 4 Feb 2026 09:41:55 +0700 Subject: [PATCH] fix(extension): apply Plasmo build workaround - remove engines constraint - Remove 'engines' field from package.json (workaround for Plasmo issue #1040) - Fix operator precedence in ChatInterface condition - Resolves 'Failed to resolve popup.tsx' error Note: Still encountering 'Unexpected token div' JSX error during build. This appears to be a separate Plasmo bundler issue unrelated to our code changes. --- surfsense_browser_extension/package.json | 4 ---- surfsense_browser_extension/sidepanel/chat/ChatInterface.tsx | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/surfsense_browser_extension/package.json b/surfsense_browser_extension/package.json index 0e0b9933d..e493e3d34 100644 --- a/surfsense_browser_extension/package.json +++ b/surfsense_browser_extension/package.json @@ -4,10 +4,6 @@ "version": "0.0.12", "description": "Extension to collect Browsing History for SurfSense.", "author": "https://github.com/MODSetter", - "engines": { - "node": ">=18.0.0 <23.0.0", - "pnpm": ">=8.0.0" - }, "pnpm": { "overrides": { "sharp": "^0.33.5" diff --git a/surfsense_browser_extension/sidepanel/chat/ChatInterface.tsx b/surfsense_browser_extension/sidepanel/chat/ChatInterface.tsx index 6f8615983..d934603cf 100644 --- a/surfsense_browser_extension/sidepanel/chat/ChatInterface.tsx +++ b/surfsense_browser_extension/sidepanel/chat/ChatInterface.tsx @@ -131,7 +131,7 @@ export function ChatInterface() { const captureChartMatch = content.match(COMMAND_PATTERNS.CAPTURE_CHART); const generateThreadMatch = content.match(COMMAND_PATTERNS.GENERATE_THREAD); - if (addWatchlistMatch || content.toLowerCase().includes("add") && content.toLowerCase().includes("watchlist")) { + if (addWatchlistMatch || (content.toLowerCase().includes("add") && content.toLowerCase().includes("watchlist"))) { // Add to watchlist command const token = addWatchlistMatch?.[1] || tokenSymbol; responseContent = `Done! ✅\n\nI've added ${token} to your watchlist.`;