Merge dev to main - Immich and Terminal fixes #36

Merged
jimmy merged 5 commits from dev into main 2026-03-15 22:50:19 +08:00
Showing only changes of commit d69b744ae7 - Show all commits
@@ -267,7 +267,7 @@
async function connect(forceRefresh = false) {
// Always refresh token before first connection to ensure fresh cookies
const d = tabData.get(tabId);
let d = tabData.get(tabId);
const isFirstConnect = !d?.hasConnectedOnce;
if (forceRefresh || isFirstConnect) {
@@ -343,7 +343,7 @@
};
ws.onclose = async (e) => {
const reason = e.reason || `Connection closed (code ${e.code})`;
const d = tabData.get(tabId);
d = tabData.get(tabId);
if (d) d.ws = null;
// Handle auth failures (code 1008)
@@ -386,13 +386,13 @@
}
};
ws.onerror = () => {
const d = tabData.get(tabId);
d = tabData.get(tabId);
if (d) d.ws = null;
if (!closedManually) scheduleReconnect("Connection failed");
else updateTab(tabId, { connected: false, error: "Connection failed" });
};
const d = tabData.get(tabId);
d = tabData.get(tabId);
if (d) {
d.ws = ws;
d.heartbeat = heartbeat;