mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-28 18:36:23 +02:00
docs: update PRD with comprehensive extension features and UX integration strategy
- Added UX strategy: Extension for Quick Actions, Frontend for Management - Organized features into 4 phases (Phase 1 completed) - Added 14 new extension features (FR-EXT-07 to FR-EXT-17): * Smart Monitoring: Price alerts, whale tracking, rug pull detection * Trading Intelligence: Token analysis, entry/exit suggestions, portfolio tracker * Content Creation: Chart screenshots, AI thread generator * Productivity: Quick actions, notifications, keyboard shortcuts - Added Feature Responsibility Matrix showing Extension vs Frontend roles - Added Settings Sync strategy (FR-EXT-06) with deep links to frontend - Documented state sync architecture: Extension ↔ Backend API ↔ Frontend
This commit is contained in:
parent
fd9eddf7fa
commit
a052b01a68
27 changed files with 5163 additions and 88 deletions
49
surfsense_browser_extension/sidepanel/chat/QuickCapture.tsx
Normal file
49
surfsense_browser_extension/sidepanel/chat/QuickCapture.tsx
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
import { Camera } from "lucide-react";
|
||||
import { Button } from "@/routes/ui/button";
|
||||
import { useToast } from "@/routes/ui/use-toast";
|
||||
|
||||
/**
|
||||
* Quick capture button (sticky at bottom)
|
||||
* Reuses existing capture functionality
|
||||
*/
|
||||
export function QuickCapture() {
|
||||
const { toast } = useToast();
|
||||
|
||||
const handleCapture = async () => {
|
||||
try {
|
||||
// Get active tab
|
||||
const [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
|
||||
|
||||
if (!tab.id) {
|
||||
throw new Error("No active tab");
|
||||
}
|
||||
|
||||
// Send message to background to capture page
|
||||
chrome.runtime.sendMessage({
|
||||
type: "CAPTURE_PAGE",
|
||||
tabId: tab.id,
|
||||
});
|
||||
|
||||
toast({
|
||||
title: "Page captured!",
|
||||
description: "Saved to your search space",
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Failed to capture page:", error);
|
||||
toast({
|
||||
title: "Capture failed",
|
||||
description: "Please try again",
|
||||
variant: "destructive",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="sticky bottom-0 border-t p-3 bg-background">
|
||||
<Button className="w-full" onClick={handleCapture}>
|
||||
<Camera className="mr-2 h-4 w-4" />
|
||||
Save Current Page
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue