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
4 changes: 4 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ jobs:
extension:
- 'surfsense_browser_extension/**'

- name: Install native build dependencies
if: steps.frontend-changes.outputs.web == 'true'
run: sudo apt-get install -y libreadline-dev

- name: Install dependencies for web
if: steps.frontend-changes.outputs.web == 'true'
working-directory: surfsense_web
Expand Down
4 changes: 4 additions & 0 deletions surfsense_backend/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from app.schemas import UserCreate, UserRead, UserUpdate
from app.tasks.surfsense_docs_indexer import seed_surfsense_docs
from app.users import (
SECRET,
auth_backend,
current_active_user,
fastapi_users,
Comment on lines 45 to 49
Expand Down Expand Up @@ -819,6 +820,7 @@ async def dispatch(
tags=["auth"],
)


# Register /users/me BEFORE fastapi_users.get_users_router so our routes take
# precedence (FastAPI first-match wins). fastapi-users' internal /users/me only
# validates JWT — it does not check request.state.proxy_user set by the proxy
Expand All @@ -842,6 +844,8 @@ async def update_current_user_me(
# JWT-loaded one. user_manager.get() returns the session-attached instance.
db_user = await user_manager.get(user.id)
return await user_manager.update(user_update, db_user, safe=True, request=request)


app.include_router(
fastapi_users.get_users_router(UserRead, UserUpdate),
prefix="/users",
Expand Down
2 changes: 1 addition & 1 deletion surfsense_web/atoms/user/user-query.atoms.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { atomWithQuery } from "jotai-tanstack-query";
import { getBearerToken } from "@/lib/auth-utils";
import { userApiService } from "@/lib/apis/user-api.service";
import { getBearerToken } from "@/lib/auth-utils";

export const USER_QUERY_KEY = ["user", "me"] as const;
const userQueryFn = () => userApiService.getMe();
Expand Down
1 change: 0 additions & 1 deletion surfsense_web/components/TokenHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// To restore native OAuth login, uncomment this file and re-register
// the /auth/callback route.


// "use client";
//
// import { useEffect } from "react";
Expand Down
4 changes: 2 additions & 2 deletions surfsense_web/components/tool-ui/generate-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ export const GenerateImageToolUI = ({
};

export {
GenerateImageArgsSchema,
GenerateImageResultSchema,
type GenerateImageArgs,
GenerateImageArgsSchema,
type GenerateImageResult,
GenerateImageResultSchema,
};
2 changes: 1 addition & 1 deletion surfsense_web/components/tool-ui/sandbox-execute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -419,4 +419,4 @@ export const SandboxExecuteToolUI = ({
return <ExecuteCompleted command={command} parsed={parsed} threadId={threadId} />;
};

export { ExecuteArgsSchema, ExecuteResultSchema, type ExecuteArgs, type ExecuteResult };
export { type ExecuteArgs, ExecuteArgsSchema, type ExecuteResult, ExecuteResultSchema };
4 changes: 2 additions & 2 deletions surfsense_web/components/tool-ui/user-memory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export const UpdateMemoryToolUI = ({
// ============================================================================

export {
UpdateMemoryArgsSchema,
UpdateMemoryResultSchema,
type UpdateMemoryArgs,
UpdateMemoryArgsSchema,
type UpdateMemoryResult,
UpdateMemoryResultSchema,
};
2 changes: 1 addition & 1 deletion surfsense_web/components/tool-ui/write-todos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ export const WriteTodosToolUI = ({
);
};

export { WriteTodosSchema, type WriteTodosData };
export { type WriteTodosData, WriteTodosSchema };
2 changes: 1 addition & 1 deletion surfsense_web/components/ui/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ function AccordionContent({
);
}

export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
14 changes: 7 additions & 7 deletions surfsense_web/components/ui/alert-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ function AlertDialogCancel({

export {
AlertDialog,
AlertDialogPortal,
AlertDialogOverlay,
AlertDialogTrigger,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogHeader,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogOverlay,
AlertDialogPortal,
AlertDialogTitle,
AlertDialogDescription,
AlertDialogAction,
AlertDialogCancel,
AlertDialogTrigger,
};
2 changes: 1 addition & 1 deletion surfsense_web/components/ui/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ function AlertDescription({ className, ...props }: React.ComponentProps<"div">)
);
}

export { Alert, AlertTitle, AlertDescription };
export { Alert, AlertDescription, AlertTitle };
2 changes: 1 addition & 1 deletion surfsense_web/components/ui/animated-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -556,4 +556,4 @@ const TabsContent = forwardRef<
});
TabsContent.displayName = "TabsContent";

export { Tabs, TabsList, TabsTrigger, TabsContent };
export { Tabs, TabsContent, TabsList, TabsTrigger };
2 changes: 1 addition & 1 deletion surfsense_web/components/ui/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ function AvatarGroupCount({ className, ...props }: React.ComponentProps<"span">)
);
}

export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount };
export { Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
2 changes: 1 addition & 1 deletion surfsense_web/components/ui/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDiv
);
CardFooter.displayName = "CardFooter";

export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter };
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
2 changes: 1 addition & 1 deletion surfsense_web/components/ui/collapsible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ function CollapsibleContent({
return <CollapsiblePrimitive.CollapsibleContent data-slot="collapsible-content" {...props} />;
}

export { Collapsible, CollapsibleTrigger, CollapsibleContent };
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
6 changes: 3 additions & 3 deletions surfsense_web/components/ui/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ function CommandShortcut({ className, ...props }: React.ComponentProps<"span">)
export {
Command,
CommandDialog,
CommandInput,
CommandList,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandShortcut,
CommandList,
CommandSeparator,
CommandShortcut,
};
12 changes: 6 additions & 6 deletions surfsense_web/components/ui/context-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,18 +207,18 @@ function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span

export {
ContextMenu,
ContextMenuTrigger,
ContextMenuCheckboxItem,
ContextMenuContent,
ContextMenuGroup,
ContextMenuItem,
ContextMenuCheckboxItem,
ContextMenuRadioItem,
ContextMenuLabel,
ContextMenuPortal,
ContextMenuRadioGroup,
ContextMenuRadioItem,
ContextMenuSeparator,
ContextMenuShortcut,
ContextMenuGroup,
ContextMenuPortal,
ContextMenuSub,
ContextMenuSubContent,
ContextMenuSubTrigger,
ContextMenuRadioGroup,
ContextMenuTrigger,
};
10 changes: 5 additions & 5 deletions surfsense_web/components/ui/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;

export {
Dialog,
DialogPortal,
DialogOverlay,
DialogClose,
DialogTrigger,
DialogContent,
DialogHeader,
DialogDescription,
DialogFooter,
DialogHeader,
DialogOverlay,
DialogPortal,
DialogTitle,
DialogDescription,
DialogTrigger,
};
12 changes: 6 additions & 6 deletions surfsense_web/components/ui/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ DrawerHandle.displayName = "DrawerHandle";

export {
Drawer,
DrawerPortal,
DrawerOverlay,
DrawerTrigger,
DrawerClose,
DrawerContent,
DrawerHeader,
DrawerFooter,
DrawerTitle,
DrawerDescription,
DrawerFooter,
DrawerHandle,
DrawerHeader,
DrawerOverlay,
DrawerPortal,
DrawerTitle,
DrawerTrigger,
};
10 changes: 5 additions & 5 deletions surfsense_web/components/ui/dropdown-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,18 +211,18 @@ function DropdownMenuSubContent({

export {
DropdownMenu,
DropdownMenuPortal,
DropdownMenuTrigger,
DropdownMenuCheckboxItem,
DropdownMenuContent,
DropdownMenuGroup,
DropdownMenuLabel,
DropdownMenuItem,
DropdownMenuCheckboxItem,
DropdownMenuLabel,
DropdownMenuPortal,
DropdownMenuRadioGroup,
DropdownMenuRadioItem,
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuSub,
DropdownMenuSubTrigger,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuTrigger,
};
2 changes: 1 addition & 1 deletion surfsense_web/components/ui/expanded-gif-overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ const ExpandedGifOverlay = ExpandedMediaOverlay;
/** @deprecated Use useExpandedMedia instead */
const useExpandedGif = useExpandedMedia;

export { ExpandedMediaOverlay, useExpandedMedia, ExpandedGifOverlay, useExpandedGif };
export { ExpandedGifOverlay, ExpandedMediaOverlay, useExpandedGif, useExpandedMedia };
8 changes: 4 additions & 4 deletions surfsense_web/components/ui/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ function FormMessage({ className, ...props }: React.ComponentProps<"p">) {
}

export {
useFormField,
Form,
FormItem,
FormLabel,
FormControl,
FormDescription,
FormMessage,
FormField,
FormItem,
FormLabel,
FormMessage,
useFormField,
};
6 changes: 3 additions & 3 deletions surfsense_web/components/ui/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span"
export {
Pagination,
PaginationContent,
PaginationLink,
PaginationEllipsis,
PaginationItem,
PaginationPrevious,
PaginationLink,
PaginationNext,
PaginationEllipsis,
PaginationPrevious,
};
2 changes: 1 addition & 1 deletion surfsense_web/components/ui/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitiv
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
}

export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
6 changes: 3 additions & 3 deletions surfsense_web/components/ui/sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ function SheetDescription({

export {
Sheet,
SheetTrigger,
SheetClose,
SheetContent,
SheetHeader,
SheetDescription,
SheetFooter,
SheetHeader,
SheetTitle,
SheetDescription,
SheetTrigger,
};
2 changes: 1 addition & 1 deletion surfsense_web/components/ui/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ function TableCaption({ className, ...props }: React.ComponentProps<"caption">)
);
}

export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
2 changes: 1 addition & 1 deletion surfsense_web/components/ui/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ const TabsContent = React.forwardRef<
));
TabsContent.displayName = TabsPrimitive.Content.displayName;

export { Tabs, TabsList, TabsTrigger, TabsContent };
export { Tabs, TabsContent, TabsList, TabsTrigger };
2 changes: 1 addition & 1 deletion surfsense_web/components/ui/tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ function TooltipContent({
);
}

export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
2 changes: 1 addition & 1 deletion surfsense_web/lib/apis/connectors-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,6 @@ export interface ObsidianStats {
last_sync_at: string | null;
}

export type { SlackChannel, DiscordChannel };
export type { DiscordChannel, SlackChannel };

export const connectorsApiService = new ConnectorsApiService();
1 change: 1 addition & 0 deletions surfsense_web/svgr.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
declare module "*.svg" {
import type { FC, SVGProps } from "react";

const content: FC<SVGProps<SVGSVGElement>>;
export default content;
}
Loading