diff --git a/App.tsx b/App.tsx
index ca570a467..f1ffe1567 100755
--- a/App.tsx
+++ b/App.tsx
@@ -201,7 +201,6 @@ function App({ settings }: { settings: SettingsState }) {
sessionLogsDir,
sessionLogsFormat,
reapplyCurrentTheme,
- immersiveMode,
workspaceFocusStyle,
} = settings;
@@ -358,7 +357,6 @@ function App({ settings }: { settings: SettingsState }) {
}, [activeTabId, currentTerminalTheme, hostById, sessionById, themeById, workspaceById]);
useImmersiveMode({
- isImmersive: immersiveMode,
activeTabId,
activeTerminalTheme,
restoreOriginalTheme: reapplyCurrentTheme,
@@ -1312,7 +1310,7 @@ function App({ settings }: { settings: SettingsState }) {
}, []);
return (
-
+
void;
@@ -170,14 +168,14 @@ export function useImmersiveMode({
// APPLY: useLayoutEffect — runs before paint, O(1) Map lookup, single DOM write
useLayoutEffect(() => {
- if (isImmersive && isTerminalTab && activeTerminalTheme) {
+ if (isTerminalTab && activeTerminalTheme) {
const fp = themeFingerprint(activeTerminalTheme);
if (appliedFpRef.current === fp) return;
overrideActiveRef.current = true;
appliedFpRef.current = fp;
applyImmersiveStyle(getImmersiveCss(activeTerminalTheme), activeTerminalTheme.type === 'dark', activeTerminalTheme.colors.background);
}
- }, [isImmersive, isTerminalTab, activeTerminalTheme]);
+ }, [isTerminalTab, activeTerminalTheme]);
// RESTORE: useEffect — runs after paint, with fade overlay
useEffect(() => {
@@ -198,7 +196,7 @@ export function useImmersiveMode({
});
const fallback = setTimeout(() => { if (overlay.parentNode) overlay.remove(); }, 400);
return () => { clearTimeout(fallback); if (overlay.parentNode) overlay.remove(); };
- }, [isImmersive, isTerminalTab, activeTerminalTheme, restoreOriginalTheme]);
+ }, [isTerminalTab, activeTerminalTheme, restoreOriginalTheme]);
// Cleanup on unmount
useEffect(() => {
diff --git a/application/state/usePortForwardingAutoStart.ts b/application/state/usePortForwardingAutoStart.ts
index 75d7dd57a..0e2e51e6d 100644
--- a/application/state/usePortForwardingAutoStart.ts
+++ b/application/state/usePortForwardingAutoStart.ts
@@ -116,7 +116,7 @@ export const usePortForwardingAutoStart = ({
return () => {
setReconnectCallback(null);
};
- }, []);
+ }, [resolveEffectiveHost]);
// Auto-start rules on app launch
useEffect(() => {
@@ -196,5 +196,5 @@ export const usePortForwardingAutoStart = ({
};
void runAutoStart();
- }, [hosts, identities, isHostAuthReady, keys]);
+ }, [hosts, identities, isHostAuthReady, keys, resolveEffectiveHost]);
};
diff --git a/application/state/useSettingsState.ts b/application/state/useSettingsState.ts
index aa1674efe..ee942993f 100644
--- a/application/state/useSettingsState.ts
+++ b/application/state/useSettingsState.ts
@@ -125,7 +125,7 @@ const applyThemeTokens = (
accentOverride: string,
) => {
const root = window.document.documentElement;
- // If immersive mode is active (style tag present), it owns the dark/light class — don't override
+ // If immersive override is active (style tag present), it owns the dark/light class — don't override
if (!document.getElementById('netcatty-immersive-override')) {
root.classList.remove('light', 'dark');
root.classList.add(resolvedTheme);
@@ -340,11 +340,6 @@ export const useSettingsState = () => {
}
}, []);
- // Immersive mode is always enabled — the toggle has been removed from settings
- const immersiveMode = true;
- const setImmersiveMode = useCallback((_enabled: boolean) => {
- // no-op: immersive mode is always on
- }, []);
const setSftpTransferConcurrency = useCallback((value: number) => {
const clamped = Math.max(1, Math.min(16, Math.round(value)));
@@ -651,7 +646,7 @@ export const useSettingsState = () => {
sftpDoubleClickBehavior, sftpAutoSync, sftpShowHiddenFiles,
sftpUseCompressedUpload, sftpAutoOpenSidebar, sftpDefaultViewMode,
editorWordWrap, sessionLogsEnabled, sessionLogsDir, sessionLogsFormat,
- globalHotkeyEnabled, autoUpdateEnabled, immersiveMode,
+ globalHotkeyEnabled, autoUpdateEnabled,
});
settingsSnapshotRef.current = {
theme, lightUiThemeId, darkUiThemeId, accentMode, customAccent,
@@ -660,7 +655,7 @@ export const useSettingsState = () => {
sftpDoubleClickBehavior, sftpAutoSync, sftpShowHiddenFiles,
sftpUseCompressedUpload, sftpAutoOpenSidebar, sftpDefaultViewMode,
editorWordWrap, sessionLogsEnabled, sessionLogsDir, sessionLogsFormat,
- globalHotkeyEnabled, autoUpdateEnabled, immersiveMode,
+ globalHotkeyEnabled, autoUpdateEnabled,
};
// Listen for storage changes from other windows (cross-window sync)
@@ -1220,8 +1215,6 @@ export const useSettingsState = () => {
setGlobalHotkeyEnabled,
rehydrateAllFromStorage,
reapplyCurrentTheme,
- immersiveMode,
- setImmersiveMode,
workspaceFocusStyle,
setWorkspaceFocusStyle,
// Opaque version that changes when any synced setting changes, used by useAutoSync.
@@ -1232,7 +1225,7 @@ export const useSettingsState = () => {
terminalThemeId, terminalFontFamilyId, terminalFontSize, terminalSettings,
customKeyBindings, editorWordWrap,
sftpDoubleClickBehavior, sftpAutoSync, sftpShowHiddenFiles, sftpUseCompressedUpload, sftpAutoOpenSidebar, sftpDefaultViewMode,
- customThemes, immersiveMode, workspaceFocusStyle,
+ customThemes, workspaceFocusStyle,
]),
};
};
diff --git a/application/syncPayload.ts b/application/syncPayload.ts
index ed22e92a9..b399240fd 100644
--- a/application/syncPayload.ts
+++ b/application/syncPayload.ts
@@ -42,7 +42,6 @@ import {
STORAGE_KEY_SFTP_AUTO_OPEN_SIDEBAR,
STORAGE_KEY_SFTP_GLOBAL_BOOKMARKS,
STORAGE_KEY_CUSTOM_THEMES,
- STORAGE_KEY_IMMERSIVE_MODE,
STORAGE_KEY_SHOW_RECENT_HOSTS,
} from '../infrastructure/config/storageKeys';
@@ -171,9 +170,6 @@ export function collectSyncableSettings(): SyncPayload['settings'] {
const globalBookmarks = localStorageAdapter.read(STORAGE_KEY_SFTP_GLOBAL_BOOKMARKS);
if (globalBookmarks && Array.isArray(globalBookmarks)) settings.sftpGlobalBookmarks = globalBookmarks;
- // Immersive mode
- const immersive = localStorageAdapter.readString(STORAGE_KEY_IMMERSIVE_MODE);
- if (immersive === 'true' || immersive === 'false') settings.immersiveMode = immersive === 'true';
const showRecent = localStorageAdapter.readBoolean(STORAGE_KEY_SHOW_RECENT_HOSTS);
if (showRecent != null) settings.showRecentHosts = showRecent;
@@ -240,8 +236,7 @@ function applySyncableSettings(settings: NonNullable):
// SFTP Bookmarks (global only)
if (settings.sftpGlobalBookmarks != null) localStorageAdapter.write(STORAGE_KEY_SFTP_GLOBAL_BOOKMARKS, settings.sftpGlobalBookmarks);
- // Immersive mode
- if (settings.immersiveMode != null) localStorageAdapter.writeString(STORAGE_KEY_IMMERSIVE_MODE, String(settings.immersiveMode));
+ // Immersive mode (legacy — always enabled, ignore incoming value)
if (settings.showRecentHosts != null) localStorageAdapter.writeBoolean(STORAGE_KEY_SHOW_RECENT_HOSTS, settings.showRecentHosts);
}
diff --git a/components/SettingsPage.tsx b/components/SettingsPage.tsx
index 6cbbff46f..996e3ff71 100644
--- a/components/SettingsPage.tsx
+++ b/components/SettingsPage.tsx
@@ -155,10 +155,6 @@ const SettingsPageContent: React.FC<{ settings: SettingsState }> = ({ settings }
const { updateState, checkNow, installUpdate, openReleasePage, startDownload, isUpdateDemoMode } = useUpdateCheck({ autoUpdateEnabled: settings.autoUpdateEnabled });
const [activeTab, setActiveTab] = useState("application");
const [mountedTabs, setMountedTabs] = useState(() => new Set(["application"]));
- const isImmersive = settings.immersiveMode;
- const toggleImmersive = useCallback(() => {
- settings.setImmersiveMode(!isImmersive);
- }, [settings, isImmersive]);
useEffect(() => {
notifyRendererReady();
@@ -286,8 +282,6 @@ const SettingsPageContent: React.FC<{ settings: SettingsState }> = ({ settings }
setUiLanguage={settings.setUiLanguage}
customCSS={settings.customCSS}
setCustomCSS={settings.setCustomCSS}
- isImmersive={isImmersive}
- onToggleImmersive={toggleImmersive}
/>
)}
diff --git a/components/settings/tabs/SettingsAppearanceTab.tsx b/components/settings/tabs/SettingsAppearanceTab.tsx
index 06d1e963b..f5eba1cea 100644
--- a/components/settings/tabs/SettingsAppearanceTab.tsx
+++ b/components/settings/tabs/SettingsAppearanceTab.tsx
@@ -27,8 +27,6 @@ export default function SettingsAppearanceTab(props: {
setUiLanguage: (language: string) => void;
customCSS: string;
setCustomCSS: (css: string) => void;
- isImmersive?: boolean;
- onToggleImmersive?: () => void;
}) {
const { t } = useI18n();
const availableUIFonts = useAvailableUIFonts();
@@ -49,8 +47,6 @@ export default function SettingsAppearanceTab(props: {
setUiLanguage,
customCSS,
setCustomCSS,
- isImmersive: _isImmersive,
- onToggleImmersive: _onToggleImmersive,
} = props;
const [showRecentHosts, setShowRecentHosts] = useStoredBoolean(