* feat: add host list sort

* feat: fixed rdp truncating (taskbar invisible unless resizing window) and improved split screen system

* feat: revamp conneciton persistance system to save to backend with a new connections panel to restore old connections and view current ones. Also added new user profile toggle to reopen all tabs (saves and loads from backend). Added user profile toggle for host tray click vs hover.

* feat: added WOL button, added proper use of BASE_PATH, toggles/buttons in admin/user profile now are always visible regardless of sidebar width, duplicating hosts not adding jumphost/socks5, keepalive internal not mulitplying into seconds causing a keepalive error, and finally guacamole giving 1_0_0 and 1_1_0 errors

* feat: add filter host button, improve alert system UI, save sidebar width to localstorage, and fix host toolbar row overflow (add host going off screen on small sidebar width)

* feat: add pin rail toggle, fix command pallete toggle not working, fixed command pallete toggling when typing in a field, made file manager not uppercase, host manager custom ports not loading, guacd hosts made on >=2.2.1, fixed host tags toggling, added reorder snippet sfeature, made snippet folder clllapse and require confimration toggle work, removed file manager color toggle, and fixed macos not displaying GUI until switching to another app and coming back, and jump host servers failing.

* feat: use blacksmith caching for docker compile and improve keepalive system for ssh to all match the same implementation and use the data from the host config instead of a predefined value

* feat: reset host manager state if the form is left and remove file manager color logic from the removed toggle

* feat: update electron version check to use new ui

* feat: improve duplication system to proplery map all fields
This commit is contained in:
Luke Gustafson
2026-05-28 22:05:25 -04:00
committed by GitHub
parent eeb0f64c8d
commit 8a4172c14d
50 changed files with 3337 additions and 577 deletions
+30 -42
View File
@@ -96,6 +96,7 @@ function resolveTermixThemeColors(activeTheme: string, appTheme: string) {
interface HostConfig {
id?: number;
instanceId?: string;
restoredSessionId?: string | null;
ip: string;
port: number;
username: string;
@@ -231,6 +232,8 @@ const TerminalInner = forwardRef<TerminalHandle, SSHTerminalProps>(
const sessionIdRef = useRef<string | null>(null);
const isAttachingSessionRef = useRef<boolean>(false);
// Consumed on first connectToHost call so retries don't re-attempt a stale session
const pendingRestoredSessionIdRef = useRef<string | null>(hostConfig.restoredSessionId ?? null);
const [tmuxSessionPicker, setTmuxSessionPicker] = useState<{
sessions: Array<{
name: string;
@@ -254,6 +257,7 @@ const TerminalInner = forwardRef<TerminalHandle, SSHTerminalProps>(
const isReconnectingRef = useRef(false);
const isConnectingRef = useRef(false);
const wasConnectedRef = useRef(false);
const wasSessionExpiredRef = useRef(false);
useEffect(() => {
isUnmountingRef.current = false;
@@ -685,8 +689,6 @@ const TerminalInner = forwardRef<TerminalHandle, SSHTerminalProps>(
if (webSocketRef.current?.readyState === WebSocket.OPEN) {
webSocketRef.current.send(JSON.stringify({ type: "disconnect" }));
}
const tabId = hostConfig.id ?? "default";
localStorage.removeItem(`termix_session_${tabId}`);
sessionIdRef.current = null;
webSocketRef.current?.close();
setIsConnected(false);
@@ -983,23 +985,19 @@ const TerminalInner = forwardRef<TerminalHandle, SSHTerminalProps>(
currentHostIdRef.current = hostConfig.id;
currentHostConfigRef.current = hostConfig;
const persistenceEnabled =
localStorage.getItem("enableTerminalSessionPersistence") !== "false";
const tabId = hostConfig.instanceId
? `${hostConfig.id}_${hostConfig.instanceId}`
: `${hostConfig.id}_${Date.now()}`;
const savedSessionId = persistenceEnabled
? localStorage.getItem(`termix_session_${tabId}`)
: null;
if (savedSessionId) {
sessionIdRef.current = savedSessionId;
// Consume the pending restored session ID once; retries get null so they create fresh connections
const restoredSessionId = pendingRestoredSessionIdRef.current;
pendingRestoredSessionIdRef.current = null;
if (restoredSessionId) {
sessionIdRef.current = restoredSessionId;
isAttachingSessionRef.current = true;
ws.send(
JSON.stringify({
type: "attachSession",
data: {
sessionId: savedSessionId,
sessionId: restoredSessionId,
cols,
rows,
tabInstanceId: hostConfig.instanceId,
@@ -1484,12 +1482,10 @@ const TerminalInner = forwardRef<TerminalHandle, SSHTerminalProps>(
}
} else if (msg.type === "sessionCreated") {
sessionIdRef.current = msg.sessionId;
const persistenceEnabled =
localStorage.getItem("enableTerminalSessionPersistence") !==
"false";
if (persistenceEnabled && hostConfig.instanceId) {
const tabId = `${hostConfig.id}_${hostConfig.instanceId}`;
localStorage.setItem(`termix_session_${tabId}`, msg.sessionId);
if (hostConfig.instanceId) {
import("@/main-axios").then(({ patchOpenTab }) => {
patchOpenTab(hostConfig.instanceId!, { backendSessionId: msg.sessionId }).catch(() => {});
});
}
} else if (msg.type === "sessionAttached") {
isAttachingSessionRef.current = false;
@@ -1520,22 +1516,18 @@ const TerminalInner = forwardRef<TerminalHandle, SSHTerminalProps>(
});
} else if (msg.type === "sessionExpired") {
isAttachingSessionRef.current = false;
shouldNotReconnectRef.current = false;
if (hostConfig.instanceId) {
const tabId = `${hostConfig.id}_${hostConfig.instanceId}`;
localStorage.removeItem(`termix_session_${tabId}`);
}
sessionIdRef.current = null;
wasSessionExpiredRef.current = true;
if (hostConfig.instanceId) {
import("@/main-axios").then(({ patchOpenTab }) => {
patchOpenTab(hostConfig.instanceId!, { backendSessionId: null }).catch(() => {});
});
}
if (webSocketRef.current) {
webSocketRef.current.close();
}
} else if (msg.type === "sessionTakenOver") {
if (sessionIdRef.current && hostConfig.instanceId) {
const tabId = `${hostConfig.id}_${hostConfig.instanceId}`;
localStorage.removeItem(`termix_session_${tabId}`);
sessionIdRef.current = null;
}
sessionIdRef.current = null;
if (terminal) {
terminal.clear();
@@ -1631,6 +1623,14 @@ const TerminalInner = forwardRef<TerminalHandle, SSHTerminalProps>(
totpTimeoutRef.current = null;
}
if (wasSessionExpiredRef.current) {
wasSessionExpiredRef.current = false;
const cols = terminal?.cols || 80;
const rows = terminal?.rows || 24;
connectToHost(cols, rows);
return;
}
if (event.code === 1006) {
console.warn(
"[WebSocket] Abnormal closure detected - attempting reconnection",
@@ -2164,18 +2164,6 @@ const TerminalInner = forwardRef<TerminalHandle, SSHTerminalProps>(
pongTimeoutRef.current = null;
}
const persistenceEnabled =
localStorage.getItem("enableTerminalSessionPersistence") !==
"false";
if (
!persistenceEnabled &&
sessionIdRef.current &&
currentInstanceId
) {
const tabId = `${currentHostId}_${currentInstanceId}`;
localStorage.removeItem(`termix_session_${tabId}`);
}
if (webSocketRef.current) {
webSocketRef.current.close();
}