Files
kawaandClaude Opus 4.6 31725bca4f docs(13): capture phase context
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 14:27:30 +02:00

5.2 KiB

Phase 13: Add Remaining RClone Remotes - Context

Gathered: 2026-04-01 Status: Ready for planning

## Phase Boundary

Expand 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 Decisions

Which 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 authorize locally, 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 authorize for 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 category field 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 here
  • buildZodSchema() (src/schemas/index.ts): Auto-generates Zod schema from registry fields — just add a new call
  • RCLONE_TYPE_MAP (src/generators/rclone-conf.ts): Maps internal BackendType to rclone's type string
  • FieldRenderer (src/components/ui/FieldRenderer.tsx): Renders any field from registry — supports text, password, select, toggle
  • AzureAuthToggle / SftpAuthToggle: Proven pattern for mutually-exclusive auth fields with CSS-hidden toggle
  • BackendSelectionStep: Currently renders flat card grid — needs category grouping, search, and icons
  • TextFieldMD3: 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
  • BackendType union type: Currently 7 literals — all type-safe references need updating
  • BACKEND_SCHEMAS object: Explicit per-backend buildZodSchema() calls — needs entry per new backend
  • backendLabel record 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: Add buildZodSchema() calls for new backends
  • src/generators/rclone-conf.ts: Add entries to RCLONE_TYPE_MAP
  • src/store/types.ts: Update BackendType union (or derive from registry)
  • src/components/wizard/RemoteConfigStep.tsx: Add branches for backends needing auth toggles, update backendLabel
  • src/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
## Deferred Ideas

None — discussion stayed within phase scope


Phase: 13-add-remaining-rclone-remotes Context gathered: 2026-04-01