From 3c4d3215d33e0101229957cc166ae3e42b80f80f Mon Sep 17 00:00:00 2001 From: javi11 Date: Mon, 10 Aug 2026 21:01:54 +0200 Subject: [PATCH] fix(frontend): stop mount config from showing cache limits it never sends (#811) The rclone mount form substituted "50G"/"504h"/"1m" whenever the stored VFS cache limit was empty, so a config with no limit looked like a configured 50G cap while AltMount sent no CacheMaxSize to rclone at all (rclone then caches without bound). Show the stored values verbatim and keep the defaults as placeholders, plus warn inline when caching is on with no size limit. Also note in the section that mount options are only applied when the mount is created, so saving alone does not affect a running mount. --- .../components/config/MountConfigSection.tsx | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/config/MountConfigSection.tsx b/frontend/src/components/config/MountConfigSection.tsx index 30b128b46..cb6054820 100644 --- a/frontend/src/components/config/MountConfigSection.tsx +++ b/frontend/src/components/config/MountConfigSection.tsx @@ -3,6 +3,7 @@ import { Eye, EyeOff, HardDrive, + Info, Play, Save, Square, @@ -608,6 +609,11 @@ function RCloneMountSubSection({ config, onFormDataChange }: RCloneSubSectionPro setMountFormData(buildRCloneMountFormData(config)); }, [config.rclone, config]); + // rclone applies no cache size cap unless one is passed, so an empty value + // while caching is enabled lets the cache directory fill the disk. + const cacheLimitsUnbounded = + mountFormData.vfs_cache_mode !== "off" && mountFormData.vfs_cache_max_size.trim() === ""; + const handleMountInputChange = ( field: keyof RCloneMountFormData, value: string | boolean | number | Record, @@ -621,6 +627,16 @@ function RCloneMountSubSection({ config, onFormDataChange }: RCloneSubSectionPro return (
+ {/* Mount options are passed to rclone when the mount is created, so saving + alone does not change a mount that is already running. */} +
+
+ {/* Basic Mount Settings */}
@@ -795,6 +811,15 @@ function RCloneMountSubSection({ config, onFormDataChange }: RCloneSubSectionPro onChange={(e) => handleMountInputChange("vfs_cache_max_size", e.target.value)} placeholder="50G" /> + {cacheLimitsUnbounded && ( +

+

+ )}
Cache Poll Interval @@ -1388,9 +1413,12 @@ function buildRCloneMountFormData(config: ConfigResponse): RCloneMountFormData { transfers: config.rclone.transfers || 4, cache_dir: config.rclone.cache_dir || "", vfs_cache_mode: config.rclone.vfs_cache_mode || "full", - vfs_cache_poll_interval: config.rclone.vfs_cache_poll_interval || "1m", - vfs_cache_max_size: config.rclone.vfs_cache_max_size || "50G", - vfs_cache_max_age: config.rclone.vfs_cache_max_age || "504h", + // Cache limits are shown verbatim: an empty value means AltMount sends no + // limit to rclone (rclone then caches without bound), so substituting a + // placeholder default here would misreport the mount's real behaviour. + vfs_cache_poll_interval: config.rclone.vfs_cache_poll_interval ?? "", + vfs_cache_max_size: config.rclone.vfs_cache_max_size ?? "", + vfs_cache_max_age: config.rclone.vfs_cache_max_age ?? "", vfs_read_chunk_size: config.rclone.vfs_read_chunk_size || "32M", vfs_read_chunk_size_limit: config.rclone.vfs_read_chunk_size_limit || "2G", vfs_read_ahead: config.rclone.vfs_read_ahead || "128M",