diff --git a/src/backend/database/routes/terminal.ts b/src/backend/database/routes/terminal.ts index f2e3100b..3349a300 100644 --- a/src/backend/database/routes/terminal.ts +++ b/src/backend/database/routes/terminal.ts @@ -49,12 +49,6 @@ router.post( .values(insertData) .returning(); - authLogger.info(`Command saved to history for host ${hostId}`, { - operation: "command_history_save_success", - userId, - hostId: parseInt(hostId, 10), - }); - res.status(201).json(result[0]); } catch (err) { authLogger.error("Failed to save command to history", err); @@ -99,13 +93,6 @@ router.get( const uniqueCommands = Array.from(new Set(result.map((r) => r.command))); - authLogger.info(`Fetched command history for host ${hostId}`, { - operation: "command_history_fetch_success", - userId, - hostId: hostIdNum, - count: uniqueCommands.length, - }); - res.json(uniqueCommands); } catch (err) { authLogger.error("Failed to fetch command history", err); @@ -149,12 +136,6 @@ router.post( ), ); - authLogger.info(`Command deleted from history for host ${hostId}`, { - operation: "command_history_delete_success", - userId, - hostId: hostIdNum, - }); - res.json({ success: true }); } catch (err) { authLogger.error("Failed to delete command from history", err); diff --git a/src/ui/desktop/apps/file-manager/FileManager.tsx b/src/ui/desktop/apps/file-manager/FileManager.tsx index 0d33a0ba..214ee4ac 100644 --- a/src/ui/desktop/apps/file-manager/FileManager.tsx +++ b/src/ui/desktop/apps/file-manager/FileManager.tsx @@ -102,7 +102,10 @@ function FileManagerContent({ initialHost, onClose }: FileManagerProps) { const [isReconnecting, setIsReconnecting] = useState(false); const [searchQuery, setSearchQuery] = useState(""); const [lastRefreshTime, setLastRefreshTime] = useState(0); - const [viewMode, setViewMode] = useState<"grid" | "list">("grid"); + const [viewMode, setViewMode] = useState<"grid" | "list">(() => { + const saved = localStorage.getItem("fileManagerViewMode"); + return saved === "grid" || saved === "list" ? saved : "grid"; + }); const [totpRequired, setTotpRequired] = useState(false); const [totpSessionId, setTotpSessionId] = useState(null); const [totpPrompt, setTotpPrompt] = useState(""); @@ -1886,6 +1889,12 @@ function FileManagerContent({ initialHost, onClose }: FileManagerProps) { } }, [currentHost?.id]); + useEffect(() => { + console.log("Saving viewMode to localStorage:", viewMode); + localStorage.setItem("fileManagerViewMode", viewMode); + console.log("Saved value:", localStorage.getItem("fileManagerViewMode")); + }, [viewMode]); + const filteredFiles = files.filter((file) => file.name.toLowerCase().includes(searchQuery.toLowerCase()), ); diff --git a/src/ui/desktop/navigation/TopNavbar.tsx b/src/ui/desktop/navigation/TopNavbar.tsx index e85e91d6..2cb11ef4 100644 --- a/src/ui/desktop/navigation/TopNavbar.tsx +++ b/src/ui/desktop/navigation/TopNavbar.tsx @@ -470,6 +470,7 @@ export function TopNavbar({ WebkitUserSelect: "none", flex: tab.type === "home" ? "0 0 auto" : "1 1 150px", minWidth: tab.type === "home" ? "auto" : "150px", + maxWidth: tab.type === "home" ? "auto" : "450px", display: "flex", }} >