Skip to content

fix(frontend): show save button when mount type is disabled#614

Merged
javi11 merged 1 commit into
mainfrom
session/laughing-mclean-855eec
May 24, 2026
Merged

fix(frontend): show save button when mount type is disabled#614
javi11 merged 1 commit into
mainfrom
session/laughing-mclean-855eec

Conversation

@javi11
Copy link
Copy Markdown
Owner

@javi11 javi11 commented May 24, 2026

Summary

Fixes #611 — selecting the Disabled mount type left the user with no
Save button, so the change could not be persisted through the UI (users
had to hand-edit config.yaml or call the REST API).

Root cause

In MountConfigSection.tsx
the entire Save block was wrapped in {mountType !== "none" && (...)}.
Once "Disabled" was selected the block (and the button) disappeared.
The button was also disabled while !mountPath, which has no meaning
when the mount is disabled.

Change

  • Render the Save block unconditionally.
  • Keep the "Regenerate symlinks" checkbox gated on mountType !== "none" && mountPathChanged (it only applies to an active mount).
  • Relax the disabled check to (mountType !== "none" && !mountPath) so an empty path no longer blocks saving the disabled state.

No backend change needed — mount_type: "none" is already accepted, and the
success toast already produces "Mount type set to disabled".

Test plan

  • cd frontend && bun run build succeeds.
  • Start the app, open Configuration → Mount.
  • With an active mount (e.g. fuse or rclone) selected, click Disabled, confirm the dialog, and verify the Save button now appears and is enabled.
  • Click Save and verify the success toast ("Mount type set to disabled") and that the disabled state persists across reload.
  • With mount already disabled and no pending changes, verify the Save button is visible but disabled.
  • Switch from Disabled back to an active type and verify the existing behavior (sub-sections appear, mount path required) is unchanged.

The Save Configuration button was wrapped in a `mountType !== "none"` guard,
so selecting the "Disabled" option hid the button completely and prevented
users from disabling the mount through the UI (only by editing config.yaml
or calling the API). The mountPath required-check is also relaxed for the
disabled state since no path is needed there.

Fixes #611
@javi11 javi11 merged commit fc6e417 into main May 24, 2026
2 checks passed
@javi11 javi11 deleted the session/laughing-mclean-855eec branch May 24, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When disabling mount configuration, there is no save button.

1 participant