Create and edit rclone remotes from Settings #113

Merged
miro merged 1 commit from claude/remote-creation-providers-bbfd12 into main 2026-10-15 20:54:24 +00:00
Owner

Summary

  • Create: Settings > Providers has a "New" action on each provider row. It replaces the list with a form built from the provider's rclone option metadata (@tanstack/react-form): required options first, advanced options behind a toggle, secrets masked, booleans as checkboxes, exclusive choices as selects. Any number of remotes of the same provider type can be created; only the name must be unique.
  • Edit: Settings > Remotes rows open the same form pre-filled. Name and type are fixed. Secrets are never sent to the page, and a blank secret keeps the stored one. Only changed options are sent (config/update).
  • Navigation: The breadcrumb shows Providers > New <type> remote / Remotes > Edit <name> and its first crumb goes back. The provider filter is kept. After creating, Settings switches to Remotes.
  • Unsaved changes: Closing Settings, switching sections or going back with unsaved values shows a "Discard unsaved changes?" alert.
  • Server: the server re-validates the name, uniqueness and required options, and refuses to overwrite an existing remote. Passwords are obscured by rclone (obscure).
  • @filehub/rclone gains config/create, config/update and shared option helpers (sub-provider filtering, name/option validation, update diffing) with unit tests.
  • The OpenSpec change add-remote-creation is included (proposal, spec, design, tasks).

Not included

Renaming/deleting remotes, and backends that need a browser OAuth sign-in (Drive, Dropbox, ...): config/create runs non-interactively, so rclone's error is shown instead.

Testing

  • pnpm typecheck, pnpm knip and the rclone unit tests pass.
  • New e2e spec apps/app/e2e/remotes.spec.ts (7 tests in the settings suite pass in Chromium). The Playwright config now starts a throwaway rclone rcd with its own config file, so tests never touch a real rclone config.
  • Not run: the dialog in the dev server, Safari/mobile projects, and the file-operation e2e tests (they need the WebDAV server on 8889).
## Summary - **Create:** Settings > Providers has a "New" action on each provider row. It replaces the list with a form built from the provider's rclone option metadata (`@tanstack/react-form`): required options first, advanced options behind a toggle, secrets masked, booleans as checkboxes, exclusive choices as selects. Any number of remotes of the same provider type can be created; only the name must be unique. - **Edit:** Settings > Remotes rows open the same form pre-filled. Name and type are fixed. Secrets are never sent to the page, and a blank secret keeps the stored one. Only changed options are sent (`config/update`). - **Navigation:** The breadcrumb shows `Providers > New <type> remote` / `Remotes > Edit <name>` and its first crumb goes back. The provider filter is kept. After creating, Settings switches to Remotes. - **Unsaved changes:** Closing Settings, switching sections or going back with unsaved values shows a "Discard unsaved changes?" alert. - **Server:** the server re-validates the name, uniqueness and required options, and refuses to overwrite an existing remote. Passwords are obscured by rclone (`obscure`). - `@filehub/rclone` gains `config/create`, `config/update` and shared option helpers (sub-provider filtering, name/option validation, update diffing) with unit tests. - The OpenSpec change `add-remote-creation` is included (proposal, spec, design, tasks). ## Not included Renaming/deleting remotes, and backends that need a browser OAuth sign-in (Drive, Dropbox, ...): `config/create` runs non-interactively, so rclone's error is shown instead. ## Testing - `pnpm typecheck`, `pnpm knip` and the rclone unit tests pass. - New e2e spec `apps/app/e2e/remotes.spec.ts` (7 tests in the settings suite pass in Chromium). The Playwright config now starts a throwaway `rclone rcd` with its own config file, so tests never touch a real rclone config. - Not run: the dialog in the dev server, Safari/mobile projects, and the file-operation e2e tests (they need the WebDAV server on 8889).
Create and edit rclone remotes from Settings
All checks were successful
CI / lint (pull_request) Successful in 28s
CI / test (pull_request) Successful in 39s
CI / format (pull_request) Successful in 48s
CI / typecheck (pull_request) Successful in 51s
CI / knip (pull_request) Successful in 55s
CI / build (pull_request) Successful in 43s
CI / docker (arm64, docker-arm64) (pull_request) Successful in 34s
CI / docker (amd64, docker-amd64) (pull_request) Successful in 50s
CI / manifest (pull_request) Has been skipped
CI / deploy-test (pull_request) Has been skipped
E2E / playwright (pull_request) Successful in 2m17s
885a98d057
Settings > Providers gets a "New" action per provider that replaces the
list with a form built from the provider's option metadata (TanStack
Form). Settings > Remotes gets an "Edit" action that opens the same form
pre-filled; secrets are never returned to the page and are kept unless
replaced. Any number of remotes of one provider type can be created.

Leaving a form with unsaved values, by closing Settings, switching
sections or using the breadcrumb, asks to discard first. After creating,
Settings switches to Remotes.

Adds config/create and config/update to @filehub/rclone, shared option
helpers with tests, e2e coverage (against a throwaway rclone) and the
OpenSpec change.
miro merged commit 997b12622c into main 2026-10-15 20:54:24 +00:00
miro deleted branch claude/remote-creation-providers-bbfd12 2026-10-15 20:54:24 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
miro/files!113
No description provided.