Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .omni/e42f8a19-untitled/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
## Key Discoveries

- Selection capture is coordinated in `src/background/service-worker.ts`: popup sends `CAPTURE_SCREENSHOT`, service worker injects the selection overlay, then receives `SELECTION_COMPLETE` and crops via the offscreen document.
- Popup runtime message listeners must ignore unrelated messages synchronously; an async listener can interfere with offscreen `ADD_WATERMARK` responses while the popup is open.

---
_Last system refresh: 2026-05-06 06:33 UTC_
_Last system refresh: 2026-05-06 07:09 UTC_
12 changes: 9 additions & 3 deletions src/popup/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* Main Popup Component
*/
function PopupApp() {

Check warning on line 28 in src/popup/popup.tsx

View workflow job for this annotation

GitHub Actions / ci

Fast refresh only works when a file has exports. Move your component(s) to a separate file
const [isAuthenticated, setIsAuthenticated] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [assets, setAssets] = useState<Asset[]>([]);
Expand All @@ -40,7 +40,7 @@

useEffect(() => {
loadInitialData();
}, []);

Check warning on line 43 in src/popup/popup.tsx

View workflow job for this annotation

GitHub Actions / ci

React Hook useEffect has a missing dependency: 'loadInitialData'. Either include it or remove the dependency array

async function loadInitialData() {
setIsLoading(true);
Expand Down Expand Up @@ -271,8 +271,12 @@

// Listen for upload progress updates
useEffect(() => {
const handleMessage = async (message: any) => {
if (message.type === 'UPLOAD_PROGRESS') {
const handleMessage = (message: any) => {
if (message.type !== 'UPLOAD_PROGRESS') {
return false;
}

void (async () => {
const payload = message.payload;

// Reload assets to show updated progress
Expand All @@ -291,12 +295,14 @@
metadata: { nid: payload.nid },
} as any);
}
}
})();

return false;
};

chrome.runtime.onMessage.addListener(handleMessage);
return () => chrome.runtime.onMessage.removeListener(handleMessage);
}, [showInsufficientCreditsNotification, huntMode.enabled]); // Add huntMode dependency

Check warning on line 305 in src/popup/popup.tsx

View workflow job for this annotation

GitHub Actions / ci

React Hook useEffect has a missing dependency: 'checkCreditStatus'. Either include it or remove the dependency array

if (isLoading) {
return (
Expand Down
Loading