Skip to content

feat(settings): editable NAS rclone remote + live test-connection - #30

Merged
Xander-git merged 1 commit into
mainfrom
nas-remote-config
Jun 7, 2026
Merged

feat(settings): editable NAS rclone remote + live test-connection#30
Xander-git merged 1 commit into
mainfrom
nas-remote-config

Conversation

@Xander-git

Copy link
Copy Markdown
Collaborator

Context

The Settings → NAS Remote section was read-only: it displayed the configured rclone remote name (nas.remote) and base root as static labels and only appeared when nas-mode equipment existed. Changing the remote meant hand-editing config.yaml. This makes the whole rclone connection configurable (and testable) from the GUI.

What changed

  • Editable section (src/exlab_wizard/ui/pages/settings.py)
    • Remote: a dropdown of remotes detected via rclone listremotes, with a Refresh button that re-lists using the typed config path. The saved remote stays selectable even when not currently detected.
    • Base root and Config path (rclone --config <path>) inputs.
    • All three two-way-bind the draft nas block.
    • The section is always shown (after Equipment) — settings_sections_for no longer gates on nas-mode equipment; the dead _nas_mode_equipment helper was removed.
  • Live Test connection (src/exlab_wizard/ui/mount.py)
    • Probes the typed (unsaved) remote + config path directly through RcloneDriver.about() so a fresh selection can be validated before saving. This is intentionally independent of deps.equipment_probe (which POST /setup/test-equipment still uses against the saved config).
    • Added _list_nas_remotes to back the Refresh affordance.
  • Tests + docs: rewrote the NAS-remote settings tests and the mount probe tests; updated tests/e2e/ux_catalog.py and regenerated docs/UX_INTERACTIONS.md.

Note on one non-obvious fix

ui.select rejects a value that isn't None or in its options, but nas.remote is a str ("" when unset) and a None reaching that field fails validation on Save. Resolved with a None ↔ "" conversion at the binding boundary (forward/backward).

Testing

  • tests/unit/ui/test_settings_nas_remote.py — 35 passed
  • tests/unit/ui/test_mount.py — 182 passed
  • rest of tests/unit/ui — 447 passed, 19 skipped
  • tests/e2e/test_ux_documentation.py — 4 passed
  • uvx ruff check on changed files — clean
  • Live GUI click-through not yet performed.

🤖 Generated with Claude Code

Make the Settings → NAS Remote section editable instead of read-only:
- Pick the rclone remote from a dropdown of remotes detected via
  `rclone listremotes` (with a Refresh button that re-lists using the
  typed config path), and edit base root + optional `--config` path.
- All three fields two-way-bind the draft nas block; the remote select
  converts None <-> "" at the binding boundary so the str field stays
  valid on Save while satisfying ui.select's option constraint.
- The section is now always shown (after Equipment), so the remote can
  be configured before nas-mode equipment exists.
- Test connection now probes the *typed* (unsaved) remote + config path
  directly via RcloneDriver.about(), independent of deps.equipment_probe
  (which the /setup/test-equipment endpoint still uses for saved config).

Updates the settings/mount unit tests, the e2e UX catalog, and the
regenerated docs/UX_INTERACTIONS.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Xander-git
Xander-git merged commit ea7d055 into main Jun 7, 2026
7 of 8 checks passed
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.

1 participant