diff --git a/surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx b/surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx index 16af9ac6b..eceb46231 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx @@ -154,11 +154,14 @@ export function DashboardClientLayout({ // Sync to Electron store if stored value is null (first navigation) if (electronAPI?.setActiveSearchSpace) { - electronAPI.getActiveSearchSpace?.().then((stored) => { - if (!stored) { - electronAPI.setActiveSearchSpace!(activeSeacrhSpaceId); - } - }).catch(() => {}); + electronAPI + .getActiveSearchSpace?.() + .then((stored) => { + if (!stored) { + electronAPI.setActiveSearchSpace!(activeSeacrhSpaceId); + } + }) + .catch(() => {}); } }, [search_space_id, setActiveSearchSpaceIdState, electronAPI]); diff --git a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/DesktopContent.tsx b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/DesktopContent.tsx index 596ed3e8b..c3f457f96 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/DesktopContent.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/DesktopContent.tsx @@ -6,12 +6,18 @@ import { toast } from "sonner"; import { DEFAULT_SHORTCUTS, ShortcutRecorder } from "@/components/desktop/shortcut-recorder"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Label } from "@/components/ui/label"; -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; import { Spinner } from "@/components/ui/spinner"; import { Switch } from "@/components/ui/switch"; +import type { SearchSpace } from "@/contracts/types/search-space.types"; import { useElectronAPI } from "@/hooks/use-platform"; import { searchSpacesApiService } from "@/lib/apis/search-spaces-api.service"; -import type { SearchSpace } from "@/contracts/types/search-space.types"; export function DesktopContent() { const api = useElectronAPI(); @@ -82,7 +88,10 @@ export function DesktopContent() { await api.setAutocompleteEnabled(checked); }; - const updateShortcut = (key: "generalAssist" | "quickAsk" | "autocomplete", accelerator: string) => { + const updateShortcut = ( + key: "generalAssist" | "quickAsk" | "autocomplete", + accelerator: string + ) => { setShortcuts((prev) => { const updated = { ...prev, [key]: accelerator }; api.setShortcuts?.({ [key]: accelerator }).catch(() => { @@ -110,7 +119,8 @@ export function DesktopContent() { Default Search Space - Choose which search space General Assist, Quick Assist, and Extreme Assist operate against. + Choose which search space General Assist, Quick Assist, and Extreme Assist operate + against. @@ -128,7 +138,9 @@ export function DesktopContent() { ) : ( -

No search spaces found. Create one first.

+

+ No search spaces found. Create one first. +

)}
@@ -143,34 +155,34 @@ export function DesktopContent() { {shortcutsLoaded ? ( -
- updateShortcut("generalAssist", accel)} - onReset={() => resetShortcut("generalAssist")} - defaultValue={DEFAULT_SHORTCUTS.generalAssist} - label="General Assist" - description="Launch SurfSense instantly from any application" - icon={Rocket} - /> - updateShortcut("quickAsk", accel)} - onReset={() => resetShortcut("quickAsk")} - defaultValue={DEFAULT_SHORTCUTS.quickAsk} - label="Quick Assist" - description="Select text anywhere, then ask AI to explain, rewrite, or act on it" - icon={Zap} - /> - updateShortcut("autocomplete", accel)} - onReset={() => resetShortcut("autocomplete")} - defaultValue={DEFAULT_SHORTCUTS.autocomplete} - label="Extreme Assist" - description="AI drafts text using your screen context and knowledge base" - icon={BrainCog} - /> +
+ updateShortcut("generalAssist", accel)} + onReset={() => resetShortcut("generalAssist")} + defaultValue={DEFAULT_SHORTCUTS.generalAssist} + label="General Assist" + description="Launch SurfSense instantly from any application" + icon={Rocket} + /> + updateShortcut("quickAsk", accel)} + onReset={() => resetShortcut("quickAsk")} + defaultValue={DEFAULT_SHORTCUTS.quickAsk} + label="Quick Assist" + description="Select text anywhere, then ask AI to explain, rewrite, or act on it" + icon={Zap} + /> + updateShortcut("autocomplete", accel)} + onReset={() => resetShortcut("autocomplete")} + defaultValue={DEFAULT_SHORTCUTS.autocomplete} + label="Extreme Assist" + description="AI drafts text using your screen context and knowledge base" + icon={BrainCog} + />

Click a shortcut and press a new key combination to change it.

diff --git a/surfsense_web/app/desktop/login/page.tsx b/surfsense_web/app/desktop/login/page.tsx index 744680010..8f68d20c1 100644 --- a/surfsense_web/app/desktop/login/page.tsx +++ b/surfsense_web/app/desktop/login/page.tsx @@ -139,9 +139,7 @@ export default function DesktopLoginPage() { height={48} priority /> -

- Welcome to SurfSense Desktop -

+

Welcome to SurfSense Desktop

Configure shortcuts, then sign in to get started.

diff --git a/surfsense_web/app/desktop/suggestion/page.tsx b/surfsense_web/app/desktop/suggestion/page.tsx index e458f6615..0815ba622 100644 --- a/surfsense_web/app/desktop/suggestion/page.tsx +++ b/surfsense_web/app/desktop/suggestion/page.tsx @@ -297,9 +297,7 @@ export default function SuggestionPage() { const isExpanded = expandedOption === index; const needsTruncation = option.length > TRUNCATE_LENGTH; const displayText = - needsTruncation && !isExpanded - ? option.slice(0, TRUNCATE_LENGTH) + "…" - : option; + needsTruncation && !isExpanded ? option.slice(0, TRUNCATE_LENGTH) + "…" : option; return (
{recording ? ( - Press keys… + + Press keys… + ) : ( )}