123 lines
12 KiB
Markdown
123 lines
12 KiB
Markdown
---
|
|
phase: 06-new-backends
|
|
verified: 2026-03-30T09:01:00Z
|
|
status: passed
|
|
score: 15/15 must-haves verified
|
|
gaps: []
|
|
human_verification:
|
|
- test: "Manually exercise all four new backends in the running wizard UI"
|
|
expected: "OneDrive shows token/drive_id/drive_type fields; SFTP shows host/user + Password/Private Key toggle that preserves field values on switch; GCS shows project_number and service_account_credentials; B2 shows Application Key ID and Application Key. All advance the wizard on valid input."
|
|
why_human: "Visual layout, field ordering, form submission flow, and tab-switch UX can only be confirmed interactively. Automated tests verify DOM presence and CSS toggling but not visual correctness. Per SUMMARY 06-03 this was already approved by the user during the human-verify task, so this item is informational rather than blocking."
|
|
---
|
|
|
|
# Phase 6: New Backends Verification Report
|
|
|
|
**Phase Goal:** Add four new rclone backends (OneDrive, SFTP, Google Cloud Storage, Backblaze B2) to the wizard, each fully wired from registry to schema to rclone-conf generator to UI.
|
|
**Verified:** 2026-03-30T09:01:00Z
|
|
**Status:** PASSED
|
|
**Re-verification:** No — initial verification
|
|
|
|
---
|
|
|
|
## Goal Achievement
|
|
|
|
### Observable Truths
|
|
|
|
| # | Truth | Status | Evidence |
|
|
|----|-----------------------------------------------------------------------------------------------|------------|----------------------------------------------------------------------------------------------------------------|
|
|
| 1 | BackendType union includes all four new types (onedrive, sftp, gcs, b2) | VERIFIED | `registry.ts` line 7: `'azureblob' \| 's3' \| 's3-compatible' \| 'onedrive' \| 'sftp' \| 'gcs' \| 'b2'` |
|
|
| 2 | BACKEND_REGISTRY has correct field entries for all four new backends | VERIFIED | `registry.ts` lines 124-235: onedrive (token/drive_id/drive_type), gcs (project_number/service_account_credentials), sftp (host/user/pass/key_pem), b2 (account/key) |
|
|
| 3 | BACKEND_SCHEMAS covers all seven backends | VERIFIED | `index.ts` lines 20-28: all seven `buildZodSchema(...)` calls present |
|
|
| 4 | RCLONE_TYPE_MAP maps gcs to 'google cloud storage' (with spaces, not 'gcs') | VERIFIED | `rclone-conf.ts` line 16: `gcs: 'google cloud storage'` |
|
|
| 5 | buildRcloneConf correctly emits type strings for all four new backends | VERIFIED | 15 new rclone-conf test assertions pass (onedrive, sftp-password, sftp-key, gcs, b2 describe blocks) |
|
|
| 6 | SftpAuthToggle uses CSS-hidden pattern (both fields always registered, tab toggles visibility) | VERIFIED | `SftpAuthToggle.tsx` lines 49/58: `div.block`/`div.hidden` on authMethod; both `register('pass')` and `register('key_pem')` always called |
|
|
| 7 | RemoteConfigStep handles all seven BackendType values without TypeScript errors | VERIFIED | `RemoteConfigStep.tsx` backendLabel covers all 7 values; `npx tsc --noEmit` exits clean |
|
|
| 8 | SFTP branch in RemoteConfigStep renders host/user via FieldRenderer, then SftpAuthToggle | VERIFIED | `RemoteConfigStep.tsx` lines 76-97: explicit `backendType === 'sftp'` branch with SftpAuthToggle |
|
|
| 9 | OneDrive/GCS/B2 render via the generic registry loop (no custom branches) | VERIFIED | `RemoteConfigStep.tsx` lines 98-107: else branch iterates `BACKEND_REGISTRY[backendType].fields` |
|
|
| 10 | Full Vitest suite green — all 147 tests pass, zero failures | VERIFIED | `npx vitest run` output: 12 test files, 147 tests, 0 failures |
|
|
| 11 | Zero TypeScript compilation errors | VERIFIED | `npx tsc --noEmit` produces no output (exit 0) |
|
|
| 12 | BACK-01 OneDrive: token (password), drive_id, drive_type (select) fields in UI | VERIFIED | registry.ts entry confirmed; RemoteConfigStep.test.tsx BACK-01 Phase 6 describe block passes (3 tests) |
|
|
| 13 | BACK-02 SFTP: host, user, Password/Private Key tab toggle — value preserved on switch | VERIFIED | SftpAuthToggle.tsx confirmed; RemoteConfigStep.test.tsx BACK-02 Phase 6 describe block passes (6 tests) |
|
|
| 14 | BACK-03 GCS: project_number, service_account_credentials fields in UI | VERIFIED | registry.ts entry confirmed; RemoteConfigStep.test.tsx BACK-03 Phase 6 describe block passes (2 tests) |
|
|
| 15 | BACK-04 B2: account (Application Key ID), key (Application Key) fields in UI | VERIFIED | registry.ts entry confirmed; RemoteConfigStep.test.tsx BACK-04 Phase 6 describe block passes (2 tests) |
|
|
|
|
**Score:** 15/15 truths verified
|
|
|
|
---
|
|
|
|
### Required Artifacts
|
|
|
|
| Artifact | Expected | Status | Details |
|
|
|-------------------------------------------------------|---------------------------------------------------------------|------------|---------------------------------------------------------------------------------|
|
|
| `src/schemas/registry.ts` | BackendType union + all 4 new registry entries | VERIFIED | 7-value union; onedrive/gcs/sftp/b2 entries with correct rclone key names |
|
|
| `src/schemas/index.ts` | BACKEND_SCHEMAS with all 7 backends | VERIFIED | 7 `buildZodSchema(...)` calls — lines 21-27 |
|
|
| `src/generators/rclone-conf.ts` | RCLONE_TYPE_MAP with gcs → 'google cloud storage' | VERIFIED | All 7 backends in map; gcs value is `'google cloud storage'` with spaces |
|
|
| `src/components/wizard/SftpAuthToggle.tsx` | CSS-hidden Password/Private Key toggle; exports SftpAuthToggle | VERIFIED | Exists, substantive (69 lines), uses div.block/div.hidden, both fields always registered |
|
|
| `src/components/wizard/RemoteConfigStep.tsx` | Extended with all 7 backends; imports SftpAuthToggle | VERIFIED | Imports SftpAuthToggle line 12; three-branch ternary; exhaustive backendLabel |
|
|
|
|
---
|
|
|
|
### Key Link Verification
|
|
|
|
| From | To | Via | Status | Details |
|
|
|---------------------------------------|---------------------------------------------|--------------------------------------------------------------|---------|-------------------------------------------------------------------------------------------|
|
|
| `RemoteConfigStep.tsx` | `SftpAuthToggle.tsx` | `backendType === 'sftp'` branch + import | WIRED | Import on line 12; used in sftp branch lines 89-96 |
|
|
| `RemoteConfigStep.tsx` | `BACKEND_SCHEMAS[backendType]` | Schema lookup for all 7 BackendType values | WIRED | Line 27: `BACKEND_SCHEMAS[backendType]`; all 7 keys present in BACKEND_SCHEMAS |
|
|
| `RemoteConfigStep.tsx` | `BACKEND_REGISTRY[backendType]` | Registry loop for onedrive/gcs/b2/s3/s3-compatible | WIRED | Line 100: `BACKEND_REGISTRY[backendType].fields.map(...)` |
|
|
| `SftpAuthToggle.tsx` | `PasswordField` | Both pass and key_pem fields via PasswordField | WIRED | Import line 3; used for both `pass` (line 50-56) and `key_pem` (line 60-65) |
|
|
| `registry.ts` | BACKEND_REGISTRY sftp entry | key_pem field with required: false | WIRED | Lines 207-212: key_pem field, `required: false` |
|
|
| `index.ts` | `registry.ts` BackendType | buildZodSchema calls for onedrive/sftp/gcs/b2 | WIRED | Lines 24-27: `buildZodSchema('onedrive')`, `buildZodSchema('sftp')`, `buildZodSchema('gcs')`, `buildZodSchema('b2')` |
|
|
| `rclone-conf.ts` | RCLONE_TYPE_MAP | gcs key maps to 'google cloud storage' string with spaces | WIRED | Line 16: `gcs: 'google cloud storage'` |
|
|
|
|
---
|
|
|
|
### Requirements Coverage
|
|
|
|
| Requirement | Source Plan(s) | Description | Status | Evidence |
|
|
|-------------|-------------------|------------------------------------------------------|-----------|---------------------------------------------------------------------------------------------|
|
|
| BACK-01 | 06-00, 06-01, 06-03 | User can configure an OneDrive remote | SATISFIED | registry.ts onedrive entry; BACKEND_SCHEMAS/RCLONE_TYPE_MAP extended; RemoteConfigStep renders token/drive_id/drive_type; 3 UI tests green |
|
|
| BACK-02 | 06-00, 06-02, 06-03 | User can configure an SFTP remote (password or key) | SATISFIED | registry.ts sftp entry; SftpAuthToggle.tsx CSS-hidden toggle; RemoteConfigStep sftp branch; 6 UI tests including tab-switch value preservation green |
|
|
| BACK-03 | 06-00, 06-01, 06-03 | User can configure a Google Cloud Storage remote | SATISFIED | registry.ts gcs entry; RCLONE_TYPE_MAP gcs → 'google cloud storage'; RemoteConfigStep registry loop renders project_number/service_account_credentials; 2 UI tests green |
|
|
| BACK-04 | 06-00, 06-01, 06-03 | User can configure a Backblaze B2 remote | SATISFIED | registry.ts b2 entry; RCLONE_TYPE_MAP b2 → 'b2'; RemoteConfigStep registry loop renders account/key; 2 UI tests green |
|
|
|
|
No orphaned requirements — all four BACK-0x IDs are covered by plans and REQUIREMENTS.md marks them Complete/Phase 6.
|
|
|
|
---
|
|
|
|
### Anti-Patterns Found
|
|
|
|
No blockers or warnings detected.
|
|
|
|
| File | Line | Pattern | Severity | Impact |
|
|
|-----------------------------------|------|---------------|----------|------------------------------------------------------|
|
|
| `RemoteConfigStep.tsx` | 37 | `return null` | Info | Guard clause when backendType is unset — correct behavior, not a stub |
|
|
|
|
All `placeholder` strings in `registry.ts` are legitimate HTML input placeholder attributes in FieldDef entries, not implementation stubs.
|
|
|
|
---
|
|
|
|
### Human Verification Required
|
|
|
|
#### 1. Full wizard UI flow for all four new backends
|
|
|
|
**Test:** Run `npm run dev`, open http://localhost:5173. Select each of OneDrive, SFTP, GCS, and Backblaze B2 from BackendSelectionStep and complete the RemoteConfigStep form.
|
|
**Expected:**
|
|
- BackendSelectionStep displays 7 backend cards (all four new ones visible alongside Azure, S3, S3-Compatible)
|
|
- OneDrive: OAuth Token (JSON) password field, Drive ID text field, Drive Type select (Personal/Business/SharePoint Document Library)
|
|
- SFTP: Host and Username fields visible; Password and Private Key tab buttons present; switching tabs preserves values; Password tab is default
|
|
- GCS: Project Number and Service Account JSON fields visible
|
|
- B2: Application Key ID and Application Key fields visible
|
|
- Each backend advances the wizard on valid input (Next button works)
|
|
**Why human:** Visual layout, backend card appearance, form flow, and interactive tab behaviour can only be confirmed by a human. Per 06-03-SUMMARY.md, the user already approved this during the Plan 03 human-verify gate — this item is informational.
|
|
|
|
---
|
|
|
|
### Gaps Summary
|
|
|
|
No gaps. All phase truths are verified, all artifacts are substantive and wired, all key links are active, and all four requirements are satisfied. The full Vitest suite passes 147/147 tests with zero TypeScript errors.
|
|
|
|
---
|
|
|
|
_Verified: 2026-03-30T09:01:00Z_
|
|
_Verifier: Claude (gsd-verifier)_
|