fix: Server stats not respecting interval and fixed SSH toool type issues

This commit is contained in:
LukeGus
2025-11-13 23:00:23 -06:00
parent e564748d01
commit f18fdb0a31
7 changed files with 119 additions and 67 deletions

View File

@@ -827,13 +827,10 @@ export function CredentialsManager({
)}
<Sheet open={showDeployDialog} onOpenChange={setShowDeployDialog}>
<SheetContent className="w-[500px] max-w-[50vw] overflow-y-auto">
<SheetContent className="w-[500px] max-w-[50vw] overflow-y-auto bg-dark-bg">
<div className="px-4 py-4">
<div className="space-y-3 pb-4">
<div className="flex items-center space-x-3">
<div className="p-2 rounded-lg bg-green-100 dark:bg-green-900/30">
<Upload className="h-5 w-5 text-green-600 dark:text-green-400" />
</div>
<div className="flex-1">
<div className="text-lg font-semibold">
{t("credentials.deploySSHKey")}
@@ -1009,7 +1006,7 @@ export function CredentialsManager({
<Button
onClick={performDeploy}
disabled={!selectedHostId || deployLoading}
className="flex-1 bg-green-600 hover:bg-green-700 text-white"
className="flex-1"
>
{deployLoading ? (
<div className="flex items-center">

View File

@@ -193,15 +193,16 @@ export function SSHToolsSidebar({
getCommandHistory(activeTerminalHostId)
.then((history) => {
setCommandHistory((prevHistory) => {
const newHistory = Array.isArray(history) ? history : [];
// Only update if history actually changed
if (JSON.stringify(prevHistory) !== JSON.stringify(history)) {
if (JSON.stringify(prevHistory) !== JSON.stringify(newHistory)) {
// Use requestAnimationFrame to restore scroll after React finishes rendering
requestAnimationFrame(() => {
if (commandHistoryScrollRef.current) {
commandHistoryScrollRef.current.scrollTop = scrollTop;
}
});
return history;
return newHistory;
}
return prevHistory;
});