Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5.2 KiB
5.2 KiB
Phase 13: Add Remaining RClone Remotes - Context
Gathered: 2026-04-01 Status: Ready for planning
## Phase BoundaryExpand backend support from the current 7 (azureblob, s3, s3-compatible, onedrive, sftp, gcs, b2) to comprehensive coverage of all rclone backends suitable for unattended Windows deployment via RMM/Intune. Includes new registry entries, auth handling, backend selection UX overhaul (categories + search + icons), and an OAuthInstructions reusable component.
## Implementation DecisionsWhich backends to add
- Comprehensive coverage — all rclone backends that make sense for unattended Windows deployment
- OAuth-requiring backends included via token-paste approach (same as OneDrive: user runs
rclone authorizelocally, pastes resulting JSON token) - All new backends shipped in a single phase (no sub-phases by auth type)
- Claude picks the specific backend list based on rclone documentation and deployment viability
Auth complexity handling
- Reuse per-backend AuthToggle component pattern for backends with mutually-exclusive auth fields (e.g., FTP password vs key file) — same proven pattern as AzureAuthToggle/SftpAuthToggle
- Build a new reusable OAuthInstructions component for OAuth-token backends — collapsible step-by-step guide showing how to run
rclone authorizefor that specific backend - OAuthInstructions takes backend-specific command and steps as props, keeps RemoteConfigStep clean
Backend selection UX
- Categorized sections with headings: Cloud Object Storage, Cloud Drives, Protocol-based — grouped by storage type (matches how IT pros think about storage)
- Search/filter bar at the top that filters instantly as user types
- Search matches across all fields: displayName, description, category, and field labels
- Categories with no matching backends collapse when search is active
- Add
categoryfield to each BACKEND_REGISTRY entry — single source of truth stays single - Add inline SVG icons per backend card — hand-picked SVGs bundled in the app, no external dependency
Claude's Discretion
- BackendType implementation: keep explicit union type or derive dynamically from registry keys — pick whichever balances type safety and maintainability best at 20+ backends
- Specific backend list selection based on rclone docs and unattended deployment viability
- Field validation depth per backend (regex patterns vs simple required/optional)
- Icon design approach (monochrome vs brand colors, sizing)
<code_context>
Existing Code Insights
Reusable Assets
BACKEND_REGISTRY(src/schemas/registry.ts): Single source of truth — new backend = new entry herebuildZodSchema()(src/schemas/index.ts): Auto-generates Zod schema from registry fields — just add a new callRCLONE_TYPE_MAP(src/generators/rclone-conf.ts): Maps internal BackendType to rclone's type stringFieldRenderer(src/components/ui/FieldRenderer.tsx): Renders any field from registry — supports text, password, select, toggleAzureAuthToggle/SftpAuthToggle: Proven pattern for mutually-exclusive auth fields with CSS-hidden toggleBackendSelectionStep: Currently renders flat card grid — needs category grouping, search, and iconsTextFieldMD3: MD3-styled input used across all steps — search bar should reuse this
Established Patterns
- Registry-driven rendering: RemoteConfigStep uses three-branch ternary (azureblob/sftp/else) — new backends with auth toggles need branches, others use generic loop
BackendTypeunion type: Currently 7 literals — all type-safe references need updatingBACKEND_SCHEMASobject: Explicit per-backendbuildZodSchema()calls — needs entry per new backendbackendLabelrecord in RemoteConfigStep: Manual display name mapping — needs entry per new backend- MD3 token system: All styling uses semantic CSS custom properties (bg-surface, text-on-surface, etc.)
Integration Points
src/schemas/registry.ts: Add new backend entries (fields, displayName, description, category)src/schemas/index.ts: AddbuildZodSchema()calls for new backendssrc/generators/rclone-conf.ts: Add entries to RCLONE_TYPE_MAPsrc/store/types.ts: Update BackendType union (or derive from registry)src/components/wizard/RemoteConfigStep.tsx: Add branches for backends needing auth toggles, update backendLabelsrc/components/wizard/BackendSelectionStep.tsx: Add category grouping, search filter, icon display
</code_context>
## Specific Ideas- OAuthInstructions component should be collapsible — not visible by default, user expands when they need step-by-step guidance for running
rclone authorize - Categories should match IT pro mental model: "Cloud Object Storage" (S3-like), "Cloud Drives" (Google Drive, Dropbox, OneDrive), "Protocol-based" (FTP, SFTP, WebDAV, SMB)
- Search should be instant (filter-as-you-type) and match broadly including field labels — so searching "Cloudflare" finds R2 even if it's listed as "Cloudflare R2"
- Icons are inline SVGs — no npm icon library dependency, full styling control
None — discussion stayed within phase scope
Phase: 13-add-remaining-rclone-remotes Context gathered: 2026-04-01