docs(13-01): complete registry refactor and 18-backend expansion plan
- 13-01-SUMMARY.md: full execution summary with decisions, deviations, and task commits - STATE.md: updated position to phase 13 plan 01 complete, added key decisions - ROADMAP.md: 13-01 checked off, phase 13 progress 1/4 - REQUIREMENTS.md: REMOTE-01, REMOTE-02, REMOTE-06 marked complete (3/6 v1.3 requirements) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,12 +45,12 @@
|
|||||||
|
|
||||||
### Remote Backend Expansion
|
### Remote Backend Expansion
|
||||||
|
|
||||||
- [ ] **REMOTE-01**: BACKEND_REGISTRY contains all 17 backends (7 existing + 10 new) with correct rclone field definitions, displayName, description, and category
|
- [x] **REMOTE-01**: BACKEND_REGISTRY contains all 18 backends (7 existing + 11 new) with correct rclone field definitions, displayName, description, and category
|
||||||
- [ ] **REMOTE-02**: BackendType is derived from registry keys (`keyof typeof BACKEND_REGISTRY`) instead of an explicit union literal, eliminating a touch-point when adding backends
|
- [x] **REMOTE-02**: BackendType is derived from registry keys (`keyof typeof BACKEND_REGISTRY`) instead of an explicit union literal, eliminating a touch-point when adding backends
|
||||||
- [ ] **REMOTE-03**: BackendSelectionStep displays backends grouped by category (Cloud Object Storage, Cloud Drives, Protocol-based) with instant search filtering and inline SVG icons
|
- [ ] **REMOTE-03**: BackendSelectionStep displays backends grouped by category (Cloud Object Storage, Cloud Drives, Protocol-based) with instant search filtering and inline SVG icons
|
||||||
- [ ] **REMOTE-04**: OAuth-token backends (Google Drive, Dropbox, Box, pCloud, OneDrive) display a collapsible OAuthInstructions component with backend-specific `rclone authorize` command
|
- [ ] **REMOTE-04**: OAuth-token backends (Google Drive, Dropbox, Box, pCloud, OneDrive) display a collapsible OAuthInstructions component with backend-specific `rclone authorize` command
|
||||||
- [ ] **REMOTE-05**: RemoteConfigStep renders the correct form fields for every backend, including GdriveAuthToggle for Google Drive's dual-auth (OAuth token vs service account)
|
- [ ] **REMOTE-05**: RemoteConfigStep renders the correct form fields for every backend, including GdriveAuthToggle for Google Drive's dual-auth (OAuth token vs service account)
|
||||||
- [ ] **REMOTE-06**: buildRcloneConf produces valid rclone.conf output with correct type strings for all 17 backends
|
- [x] **REMOTE-06**: buildRcloneConf produces valid rclone.conf output with correct type strings for all 18 backends
|
||||||
|
|
||||||
## Future Requirements
|
## Future Requirements
|
||||||
|
|
||||||
@@ -91,16 +91,16 @@
|
|||||||
| DARK-01 | Phase 12 | Complete |
|
| DARK-01 | Phase 12 | Complete |
|
||||||
| DARK-02 | Phase 12 | Complete |
|
| DARK-02 | Phase 12 | Complete |
|
||||||
| DARK-03 | Phase 12 | Complete |
|
| DARK-03 | Phase 12 | Complete |
|
||||||
| REMOTE-01 | Phase 13 | Planned |
|
| REMOTE-01 | Phase 13 | Complete |
|
||||||
| REMOTE-02 | Phase 13 | Planned |
|
| REMOTE-02 | Phase 13 | Complete |
|
||||||
| REMOTE-03 | Phase 13 | Planned |
|
| REMOTE-03 | Phase 13 | Planned |
|
||||||
| REMOTE-04 | Phase 13 | Planned |
|
| REMOTE-04 | Phase 13 | Planned |
|
||||||
| REMOTE-05 | Phase 13 | Planned |
|
| REMOTE-05 | Phase 13 | Planned |
|
||||||
| REMOTE-06 | Phase 13 | Planned |
|
| REMOTE-06 | Phase 13 | Complete |
|
||||||
|
|
||||||
**Coverage:**
|
**Coverage:**
|
||||||
- v1.2 requirements: 18 total (18 complete)
|
- v1.2 requirements: 18 total (18 complete)
|
||||||
- v1.3 requirements: 6 total (0 complete)
|
- v1.3 requirements: 6 total (3 complete)
|
||||||
- Mapped to phases: 24
|
- Mapped to phases: 24
|
||||||
- Unmapped: 0
|
- Unmapped: 0
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ Plans:
|
|||||||
**Plans:** 4 plans
|
**Plans:** 4 plans
|
||||||
|
|
||||||
Plans:
|
Plans:
|
||||||
- [ ] 13-01-PLAN.md — Registry refactoring: derive BackendType, add categories, 10 new backend entries, auto-generate schemas
|
- [x] 13-01-PLAN.md — Registry refactoring: derive BackendType, add categories, 11 new backend entries (18 total), auto-generate schemas
|
||||||
- [ ] 13-02-PLAN.md — New components: OAuthInstructions, GdriveAuthToggle, BackendIcons
|
- [ ] 13-02-PLAN.md — New components: OAuthInstructions, GdriveAuthToggle, BackendIcons
|
||||||
- [ ] 13-03-PLAN.md — BackendSelectionStep UX overhaul: categories, search, icons
|
- [ ] 13-03-PLAN.md — BackendSelectionStep UX overhaul: categories, search, icons
|
||||||
- [ ] 13-04-PLAN.md — RemoteConfigStep wiring for all new backends + visual verification
|
- [ ] 13-04-PLAN.md — RemoteConfigStep wiring for all new backends + visual verification
|
||||||
@@ -161,4 +161,4 @@ Plans:
|
|||||||
| 10. Content & Clarity | v1.2 | 3/3 | Complete | 2026-04-01 |
|
| 10. Content & Clarity | v1.2 | 3/3 | Complete | 2026-04-01 |
|
||||||
| 11. Polish & Responsiveness | v1.2 | 2/2 | Complete | 2026-04-01 |
|
| 11. Polish & Responsiveness | v1.2 | 2/2 | Complete | 2026-04-01 |
|
||||||
| 12. Dark mode visibility fixes | v1.2 | 2/2 | Complete | 2026-04-01 |
|
| 12. Dark mode visibility fixes | v1.2 | 2/2 | Complete | 2026-04-01 |
|
||||||
| 13. Add remaining RClone remotes | v1.3 | 0/4 | In Progress | — |
|
| 13. Add remaining RClone remotes | v1.3 | 1/4 | In Progress | — |
|
||||||
|
|||||||
+23
-19
@@ -1,17 +1,17 @@
|
|||||||
---
|
---
|
||||||
gsd_state_version: 1.0
|
gsd_state_version: 1.0
|
||||||
milestone: v1.2
|
milestone: v1.3
|
||||||
milestone_name: UI Polish & Clarity
|
milestone_name: Backend Expansion
|
||||||
status: completed
|
status: in-progress
|
||||||
stopped_at: Phase 13 context gathered
|
stopped_at: "Phase 13 plan 01 complete"
|
||||||
last_updated: "2026-04-01T12:27:37.497Z"
|
last_updated: "2026-04-01T16:20:00Z"
|
||||||
last_activity: 2026-04-01 — Phase 11 plan 02 complete (POLISH-03, POLISH-04 satisfied)
|
last_activity: 2026-04-01 — Phase 13 plan 01 complete (REMOTE-01, REMOTE-02, REMOTE-06 satisfied)
|
||||||
progress:
|
progress:
|
||||||
total_phases: 6
|
total_phases: 7
|
||||||
completed_phases: 5
|
completed_phases: 6
|
||||||
total_plans: 14
|
total_plans: 18
|
||||||
completed_plans: 14
|
completed_plans: 15
|
||||||
percent: 100
|
percent: 83
|
||||||
---
|
---
|
||||||
|
|
||||||
# Project State
|
# Project State
|
||||||
@@ -25,12 +25,12 @@ See: .planning/PROJECT.md (updated 2026-03-31)
|
|||||||
|
|
||||||
## Current Position
|
## Current Position
|
||||||
|
|
||||||
Phase: 11 of 11 (Polish & Responsiveness) — Complete
|
Phase: 13 of 13 (Add Remaining RClone Remotes) — In Progress
|
||||||
Plan: 11-02 (complete)
|
Plan: 13-01 (complete)
|
||||||
Status: Phase 11 complete — all plans done (POLISH-01, POLISH-02, POLISH-03, POLISH-04 satisfied)
|
Status: Phase 13 plan 01 complete — registry refactor and 18-backend expansion done
|
||||||
Last activity: 2026-04-01 — Phase 11 plan 02 complete (POLISH-03, POLISH-04 satisfied)
|
Last activity: 2026-04-01 — Phase 13 plan 01 complete (REMOTE-01, REMOTE-02, REMOTE-06 satisfied)
|
||||||
|
|
||||||
Progress: [██████████] 100% (v1.2)
|
Progress: [████████░░] 83% (v1.3)
|
||||||
|
|
||||||
## Accumulated Context
|
## Accumulated Context
|
||||||
|
|
||||||
@@ -72,6 +72,10 @@ Recent decisions affecting current work:
|
|||||||
- [Phase 12-dark-mode-visibility-fixes]: bg-surface-container text-on-surface added to FieldRenderer select className — semantic tokens ensure correct rendering in both light and dark themes without dark: prefix
|
- [Phase 12-dark-mode-visibility-fixes]: bg-surface-container text-on-surface added to FieldRenderer select className — semantic tokens ensure correct rendering in both light and dark themes without dark: prefix
|
||||||
- [Phase 12-dark-mode-visibility-fixes]: accent-[var(--r2b-warning)] arbitrary value used for ReviewStep security checkbox — accent-warning class not confirmed generated by Tailwind v4
|
- [Phase 12-dark-mode-visibility-fixes]: accent-[var(--r2b-warning)] arbitrary value used for ReviewStep security checkbox — accent-warning class not confirmed generated by Tailwind v4
|
||||||
- [Phase 12-dark-mode-visibility-fixes]: Removed {' '} space-before-text pattern in DeploymentStep labels — replaced with flex gap-2 layout for consistent spacing
|
- [Phase 12-dark-mode-visibility-fixes]: Removed {' '} space-before-text pattern in DeploymentStep labels — replaced with flex gap-2 layout for consistent spacing
|
||||||
|
- [Phase 13-01]: BackendType derived from keyof typeof BACKEND_REGISTRY — eliminates manual union maintenance at 18+ backends
|
||||||
|
- [Phase 13-01]: Registry uses as const (not Record<BackendType,...> cast) — cast was circular when BackendType derived from registry
|
||||||
|
- [Phase 13-01]: BACKEND_SCHEMAS auto-generated via Object.fromEntries over registry keys — no per-backend buildZodSchema call needed
|
||||||
|
- [Phase 13-01]: Registry has 18 backends (http and seafile are separate entries; plan's "17" was a counting error)
|
||||||
|
|
||||||
### Roadmap Evolution
|
### Roadmap Evolution
|
||||||
|
|
||||||
@@ -88,6 +92,6 @@ None yet.
|
|||||||
|
|
||||||
## Session Continuity
|
## Session Continuity
|
||||||
|
|
||||||
Last session: 2026-04-01T12:27:37.494Z
|
Last session: 2026-04-01T16:20:00Z
|
||||||
Stopped at: Phase 13 context gathered
|
Stopped at: Completed 13-01-PLAN.md
|
||||||
Resume file: .planning/phases/13-add-remaining-rclone-remotes/13-CONTEXT.md
|
Resume file: .planning/phases/13-add-remaining-rclone-remotes/13-01-SUMMARY.md
|
||||||
|
|||||||
@@ -0,0 +1,141 @@
|
|||||||
|
---
|
||||||
|
phase: 13-add-remaining-rclone-remotes
|
||||||
|
plan: 01
|
||||||
|
subsystem: api
|
||||||
|
tags: [rclone, typescript, zod, registry, backend-expansion]
|
||||||
|
|
||||||
|
requires:
|
||||||
|
- phase: 09-md3-components
|
||||||
|
provides: FieldDef interface and TextFieldMD3 rendering contract used for field helpText guidance
|
||||||
|
- phase: 06-rclone-generator
|
||||||
|
provides: buildRcloneConf, RCLONE_TYPE_MAP, BACKEND_SCHEMAS patterns used throughout
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- "18-backend BACKEND_REGISTRY with category field as single source of truth"
|
||||||
|
- "BackendType derived from keyof typeof BACKEND_REGISTRY (no manual union)"
|
||||||
|
- "BackendCategory type with 3 valid values"
|
||||||
|
- "BACKEND_SCHEMAS auto-generated from registry keys via Object.fromEntries"
|
||||||
|
- "RCLONE_TYPE_MAP covering all 18 backends with verified rclone type strings"
|
||||||
|
|
||||||
|
affects:
|
||||||
|
- 13-02 (UI - BackendSelectionStep overhaul, categories, search)
|
||||||
|
- 13-03 (RemoteConfigStep - new backend config forms)
|
||||||
|
- any future phase adding rclone backends
|
||||||
|
|
||||||
|
tech-stack:
|
||||||
|
added: []
|
||||||
|
patterns:
|
||||||
|
- "BackendType derived from keyof typeof BACKEND_REGISTRY — no manual union maintenance"
|
||||||
|
- "BACKEND_SCHEMAS auto-generated via Object.fromEntries over registry keys — zero per-backend boilerplate"
|
||||||
|
- "BackendMeta interface types individual entries; registry uses as const for keyof narrowing"
|
||||||
|
- "RCLONE_TYPE_MAP exported for direct test coverage"
|
||||||
|
|
||||||
|
key-files:
|
||||||
|
created: []
|
||||||
|
modified:
|
||||||
|
- src/schemas/registry.ts
|
||||||
|
- src/schemas/registry.test.ts
|
||||||
|
- src/schemas/index.ts
|
||||||
|
- src/schemas/index.test.ts
|
||||||
|
- src/generators/rclone-conf.ts
|
||||||
|
- src/generators/rclone-conf.test.ts
|
||||||
|
- src/components/wizard/BackendSelectionStep.test.tsx
|
||||||
|
|
||||||
|
key-decisions:
|
||||||
|
- "BackendType is derived from keyof typeof BACKEND_REGISTRY — eliminates manual union maintenance at 18+ backends"
|
||||||
|
- "Registry uses as const (not a Record<BackendType,...> cast) — the cast was circular when BackendType derived from registry"
|
||||||
|
- "BACKEND_SCHEMAS auto-generated from Object.keys(BACKEND_REGISTRY) — no per-backend buildZodSchema call needed"
|
||||||
|
- "Google Drive supports both OAuth token and service account paths via two optional fields — GdriveAuthToggle deferred to 13-03"
|
||||||
|
- "Registry has 18 backends (not 17 as plan stated) — research doc listed http and seafile as separate items making count 18"
|
||||||
|
- "RCLONE_TYPE_MAP exported for exhaustiveness testing"
|
||||||
|
|
||||||
|
patterns-established:
|
||||||
|
- "Registry-driven type derivation: add backend once in BACKEND_REGISTRY, all downstream (BackendType, BACKEND_SCHEMAS) auto-update"
|
||||||
|
- "BackendCategory field in registry entry — single source of truth for UI grouping (no separate category map)"
|
||||||
|
|
||||||
|
requirements-completed: [REMOTE-01, REMOTE-02, REMOTE-06]
|
||||||
|
|
||||||
|
duration: 10min
|
||||||
|
completed: 2026-04-01
|
||||||
|
---
|
||||||
|
|
||||||
|
# Phase 13 Plan 01: Registry Refactor and 18-Backend Expansion Summary
|
||||||
|
|
||||||
|
**BACKEND_REGISTRY expanded from 7 to 18 backends with derived BackendType, BackendCategory, and auto-generated BACKEND_SCHEMAS — zero per-backend boilerplate for future additions**
|
||||||
|
|
||||||
|
## Performance
|
||||||
|
|
||||||
|
- **Duration:** ~10 min
|
||||||
|
- **Started:** 2026-04-01T16:13:00Z
|
||||||
|
- **Completed:** 2026-04-01T16:20:00Z
|
||||||
|
- **Tasks:** 2
|
||||||
|
- **Files modified:** 7
|
||||||
|
|
||||||
|
## Accomplishments
|
||||||
|
|
||||||
|
- Registry expanded with 11 new backends: azure-files, swift, gdrive, dropbox, box, pcloud, ftp, webdav, smb, http, seafile
|
||||||
|
- BackendType now derived from `keyof typeof BACKEND_REGISTRY` — adding a backend no longer requires touching a manual union type
|
||||||
|
- BACKEND_SCHEMAS auto-generated from registry keys — no per-backend `buildZodSchema()` call needed
|
||||||
|
- RCLONE_TYPE_MAP covers all 18 backends with verified rclone type strings
|
||||||
|
- Test count grew from 63 to 266 (all green, no regressions)
|
||||||
|
|
||||||
|
## Task Commits
|
||||||
|
|
||||||
|
Each task was committed atomically:
|
||||||
|
|
||||||
|
1. **Task 1: Refactor registry types and add all 10 new backend entries** - `b8c6493` (feat)
|
||||||
|
2. **Task 2: Auto-generate BACKEND_SCHEMAS, update RCLONE_TYPE_MAP, update tests** - `3010cdb` (feat)
|
||||||
|
|
||||||
|
## Files Created/Modified
|
||||||
|
|
||||||
|
- `src/schemas/registry.ts` - Added BackendCategory type, BackendMeta interface, category field on all entries, 11 new backends, BackendType derived from keyof
|
||||||
|
- `src/schemas/registry.test.ts` - Expanded from 24 to 48 tests; covers all 18 backends, category assertions, new backend field validation
|
||||||
|
- `src/schemas/index.ts` - Replaced explicit BACKEND_SCHEMAS object with Object.fromEntries auto-generation
|
||||||
|
- `src/schemas/index.test.ts` - Added 3 auto-generation tests + 4 new backend schema smoke tests (ftp, smb, seafile, dropbox)
|
||||||
|
- `src/generators/rclone-conf.ts` - RCLONE_TYPE_MAP expanded to 18 entries, exported for test access
|
||||||
|
- `src/generators/rclone-conf.test.ts` - Added RCLONE_TYPE_MAP exhaustiveness test + gdrive/ftp/smb conf output tests
|
||||||
|
- `src/components/wizard/BackendSelectionStep.test.tsx` - Fixed /next/i button selector ambiguity (Rule 1 bug fix)
|
||||||
|
|
||||||
|
## Decisions Made
|
||||||
|
|
||||||
|
- BackendType is derived from `keyof typeof BACKEND_REGISTRY` — eliminates manual union maintenance at 18+ backends
|
||||||
|
- The `as Record<BackendType,...>` cast at the bottom of the registry was circular when BackendType derived from registry keys — removed it; `as const` provides full inference
|
||||||
|
- Google Drive supports both OAuth token and service account auth paths via two optional fields (`token` and `service_account_credentials`) — GdriveAuthToggle component deferred to plan 13-03 (UI work)
|
||||||
|
- Registry ended up with 18 backends (plan said 17) — research doc listed `http` and `seafile` as separate entries making the correct count 18; test assertions updated to match reality
|
||||||
|
- RCLONE_TYPE_MAP exported for direct exhaustiveness testing
|
||||||
|
|
||||||
|
## Deviations from Plan
|
||||||
|
|
||||||
|
### Auto-fixed Issues
|
||||||
|
|
||||||
|
**1. [Rule 1 - Bug] Fixed BackendSelectionStep test broken by WebDAV "NextCloud" description**
|
||||||
|
- **Found during:** Task 2 (full test suite run)
|
||||||
|
- **Issue:** Test used `getByRole('button', { name: /next/i })` — matched both the WebDAV card (description contains "NextCloud") and the actual Next submit button after new backends were added
|
||||||
|
- **Fix:** Changed to `getByRole('button', { name: 'Next' })` (exact match) to target only the submit button
|
||||||
|
- **Files modified:** `src/components/wizard/BackendSelectionStep.test.tsx`
|
||||||
|
- **Verification:** All 266 tests pass, full suite green
|
||||||
|
- **Committed in:** `3010cdb` (Task 2 commit)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Total deviations:** 1 auto-fixed (Rule 1 - bug triggered by new data)
|
||||||
|
**Impact on plan:** Minor test fix required by our own data addition. No scope creep.
|
||||||
|
|
||||||
|
## Issues Encountered
|
||||||
|
|
||||||
|
- Registry backend count was 18 not 17 — research doc included both `http` and `seafile` as separate entries, the "17" in the plan was a counting error. Updated test assertions and SUMMARY to reflect the actual correct count.
|
||||||
|
|
||||||
|
## User Setup Required
|
||||||
|
|
||||||
|
None - no external service configuration required.
|
||||||
|
|
||||||
|
## Next Phase Readiness
|
||||||
|
|
||||||
|
- Registry foundation complete — all 18 backends have entries, types are derived, schemas auto-generate
|
||||||
|
- Plan 13-02 can now proceed with BackendSelectionStep UI overhaul (category headings, search filter, backend cards for all 18)
|
||||||
|
- Plan 13-03 can proceed with RemoteConfigStep new backend config forms
|
||||||
|
- BackendType is now available as a union of 18 values wherever `import type { BackendType } from '../schemas/registry'` is used
|
||||||
|
|
||||||
|
---
|
||||||
|
*Phase: 13-add-remaining-rclone-remotes*
|
||||||
|
*Completed: 2026-04-01*
|
||||||
Reference in New Issue
Block a user