docs(06-02): complete SFTP data layer and SftpAuthToggle plan
This commit is contained in:
+8
-5
@@ -3,14 +3,14 @@ gsd_state_version: 1.0
|
|||||||
milestone: v1.1
|
milestone: v1.1
|
||||||
milestone_name: Backlog & Tech Debt
|
milestone_name: Backlog & Tech Debt
|
||||||
status: planning
|
status: planning
|
||||||
stopped_at: Completed 06-new-backends 06-01-PLAN.md
|
stopped_at: Completed 06-new-backends 06-02-PLAN.md
|
||||||
last_updated: "2026-03-30T16:14:54.046Z"
|
last_updated: "2026-03-30T16:15:00Z"
|
||||||
last_activity: 2026-03-27 — v1.1 roadmap created, 11 requirements mapped across 3 phases
|
last_activity: 2026-03-27 — v1.1 roadmap created, 11 requirements mapped across 3 phases
|
||||||
progress:
|
progress:
|
||||||
total_phases: 3
|
total_phases: 3
|
||||||
completed_phases: 1
|
completed_phases: 1
|
||||||
total_plans: 8
|
total_plans: 8
|
||||||
completed_plans: 6
|
completed_plans: 7
|
||||||
percent: 88
|
percent: 88
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -70,6 +70,7 @@ Progress: [░░░░░░░░░░] 0% (v1.1)
|
|||||||
| Phase 05-tech-debt P03 | 3 | 2 tasks | 2 files |
|
| Phase 05-tech-debt P03 | 3 | 2 tasks | 2 files |
|
||||||
| Phase 06-new-backends P00 | 5min | 3 tasks | 3 files |
|
| Phase 06-new-backends P00 | 5min | 3 tasks | 3 files |
|
||||||
| Phase 06-new-backends P01 | 5min | 2 tasks | 3 files |
|
| Phase 06-new-backends P01 | 5min | 2 tasks | 3 files |
|
||||||
|
| Phase 06-new-backends P02 | 4min | 2 tasks | 4 files |
|
||||||
|
|
||||||
## Accumulated Context
|
## Accumulated Context
|
||||||
|
|
||||||
@@ -94,6 +95,8 @@ Recent decisions affecting v1.1 work:
|
|||||||
- [Phase 06-new-backends]: SFTP CSS-hide tab toggle pattern follows AzureAuthToggle convention (div.hidden/div.block)
|
- [Phase 06-new-backends]: SFTP CSS-hide tab toggle pattern follows AzureAuthToggle convention (div.hidden/div.block)
|
||||||
- [Phase 06-new-backends]: GCS rclone type = 'google cloud storage' (with spaces) not 'gcs' — critical for correct rclone.conf output, test asserts not.toContain('type = gcs')
|
- [Phase 06-new-backends]: GCS rclone type = 'google cloud storage' (with spaces) not 'gcs' — critical for correct rclone.conf output, test asserts not.toContain('type = gcs')
|
||||||
- [Phase 06-new-backends]: OneDrive uses paste-based OAuth token (JSON token field), GCS uses service_account_credentials (paste JSON), B2 uses account + key — all follow stateless browser-paste pattern
|
- [Phase 06-new-backends]: OneDrive uses paste-based OAuth token (JSON token field), GCS uses service_account_credentials (paste JSON), B2 uses account + key — all follow stateless browser-paste pattern
|
||||||
|
- [Phase 06-new-backends]: SftpAuthToggle follows AzureAuthToggle CSS-hidden pattern: both pass and key_pem always registered with react-hook-form, tab visibility via div.block/div.hidden
|
||||||
|
- [Phase 06-new-backends]: RCLONE_TYPE_MAP and BACKEND_SCHEMAS extended for all 7 backends in plan 02 (not just sftp) to fix failing onedrive/gcs/b2 test assertions
|
||||||
|
|
||||||
### Pending Todos
|
### Pending Todos
|
||||||
|
|
||||||
@@ -108,6 +111,6 @@ None yet.
|
|||||||
|
|
||||||
## Session Continuity
|
## Session Continuity
|
||||||
|
|
||||||
Last session: 2026-03-30T16:14:54.042Z
|
Last session: 2026-03-30T16:15:00Z
|
||||||
Stopped at: Completed 06-new-backends 06-01-PLAN.md
|
Stopped at: Completed 06-new-backends 06-02-PLAN.md
|
||||||
Resume file: None
|
Resume file: None
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
---
|
||||||
|
phase: 06-new-backends
|
||||||
|
plan: "02"
|
||||||
|
subsystem: ui
|
||||||
|
tags: [sftp, rclone, react, typescript, react-hook-form, css-hidden-toggle]
|
||||||
|
|
||||||
|
# Dependency graph
|
||||||
|
requires:
|
||||||
|
- phase: 06-00
|
||||||
|
provides: BackendType union with sftp, BACKEND_REGISTRY stub with sftp placeholder comment
|
||||||
|
provides:
|
||||||
|
- sftp entry in BACKEND_REGISTRY with host, user, pass, key_pem fields
|
||||||
|
- sftp in BACKEND_SCHEMAS and RCLONE_TYPE_MAP
|
||||||
|
- SftpAuthToggle.tsx component following AzureAuthToggle CSS-hidden pattern
|
||||||
|
- onedrive, gcs, b2 entries added to BACKEND_SCHEMAS and RCLONE_TYPE_MAP
|
||||||
|
affects: [06-03, 06-04]
|
||||||
|
|
||||||
|
# Tech tracking
|
||||||
|
tech-stack:
|
||||||
|
added: []
|
||||||
|
patterns:
|
||||||
|
- "SftpAuthToggle CSS-hidden tab toggle: both fields always registered with react-hook-form, visibility controlled via div.block/div.hidden"
|
||||||
|
- "RCLONE_TYPE_MAP maps gcs to 'google cloud storage' (with spaces) — rclone native type string"
|
||||||
|
|
||||||
|
key-files:
|
||||||
|
created:
|
||||||
|
- src/components/wizard/SftpAuthToggle.tsx
|
||||||
|
modified:
|
||||||
|
- src/schemas/registry.ts
|
||||||
|
- src/schemas/index.ts
|
||||||
|
- src/generators/rclone-conf.ts
|
||||||
|
|
||||||
|
key-decisions:
|
||||||
|
- "sftp key_pem field name matches rclone SFTP config key (not key_file) — verified against registry"
|
||||||
|
- "SftpAuthToggle follows AzureAuthToggle CSS-hidden pattern exactly (div.block/div.hidden, both fields always registered)"
|
||||||
|
- "BACKEND_SCHEMAS extended with all 7 backends in this plan (not just sftp) — avoids partial state"
|
||||||
|
- "RCLONE_TYPE_MAP also extended with onedrive, gcs, b2 in this plan — all 7 backends now complete"
|
||||||
|
|
||||||
|
patterns-established:
|
||||||
|
- "Auth toggle pattern: CSS-hidden (not conditional render) preserves field values across tab switches"
|
||||||
|
- "SftpAuthToggle tab labels: 'Password' and 'Private Key' (exact text required by RemoteConfigStep tests)"
|
||||||
|
|
||||||
|
requirements-completed: [BACK-02]
|
||||||
|
|
||||||
|
# Metrics
|
||||||
|
duration: 4min
|
||||||
|
completed: 2026-03-30
|
||||||
|
---
|
||||||
|
|
||||||
|
# Phase 06 Plan 02: SFTP Data Layer and SftpAuthToggle Summary
|
||||||
|
|
||||||
|
**SFTP registry entry with host/user/pass/key_pem added to all three data layers plus SftpAuthToggle.tsx component using CSS-hidden tab pattern matching AzureAuthToggle**
|
||||||
|
|
||||||
|
## Performance
|
||||||
|
|
||||||
|
- **Duration:** ~4 min
|
||||||
|
- **Started:** 2026-03-30T16:11:00Z
|
||||||
|
- **Completed:** 2026-03-30T16:14:20Z
|
||||||
|
- **Tasks:** 2
|
||||||
|
- **Files modified:** 4
|
||||||
|
|
||||||
|
## Accomplishments
|
||||||
|
|
||||||
|
- Added sftp entry to BACKEND_REGISTRY with all four rclone field keys (host, user, pass, key_pem)
|
||||||
|
- Extended BACKEND_SCHEMAS and RCLONE_TYPE_MAP to cover all 7 backends (sftp, onedrive, gcs, b2 added)
|
||||||
|
- Created SftpAuthToggle.tsx with CSS-hidden Password/Private Key tab toggle, both fields always registered with react-hook-form
|
||||||
|
- All 55 registry and rclone-conf tests pass; zero TypeScript errors
|
||||||
|
|
||||||
|
## Task Commits
|
||||||
|
|
||||||
|
Each task was committed atomically:
|
||||||
|
|
||||||
|
1. **Task 1: Add sftp entry to registry.ts, index.ts, and rclone-conf.ts** - `c1d61d3` (feat)
|
||||||
|
2. **Task 2: Create SftpAuthToggle.tsx** - `dde2a1f` (feat)
|
||||||
|
|
||||||
|
## Files Created/Modified
|
||||||
|
|
||||||
|
- `src/schemas/registry.ts` - Added sftp entry with host, user, pass, key_pem fields; removed placeholder NOTE comment
|
||||||
|
- `src/schemas/index.ts` - Added sftp, onedrive, gcs, b2 to BACKEND_SCHEMAS
|
||||||
|
- `src/generators/rclone-conf.ts` - Added sftp, onedrive, gcs (google cloud storage), b2 to RCLONE_TYPE_MAP
|
||||||
|
- `src/components/wizard/SftpAuthToggle.tsx` - New component: Password/Private Key tab toggle following AzureAuthToggle CSS-hidden pattern
|
||||||
|
|
||||||
|
## Decisions Made
|
||||||
|
|
||||||
|
- BACKEND_SCHEMAS and RCLONE_TYPE_MAP were extended for all 7 backends in this plan (not just sftp) — the test stubs for onedrive, gcs, b2 were already failing and all 3 required the same data layer wiring
|
||||||
|
- SftpAuthToggle button text: "Password" (exact) and "Private Key" — matches RemoteConfigStep test assertions for `{ selector: 'button' }` pattern matching
|
||||||
|
|
||||||
|
## Deviations from Plan
|
||||||
|
|
||||||
|
**1. [Rule 1 - Bug] Extended BACKEND_SCHEMAS and RCLONE_TYPE_MAP for all 7 backends, not just sftp**
|
||||||
|
|
||||||
|
- **Found during:** Task 1 (running rclone-conf.test.ts)
|
||||||
|
- **Issue:** Tests for onedrive, gcs, b2 were failing (type = undefined) because RCLONE_TYPE_MAP and BACKEND_SCHEMAS only had 3 entries. These backends were added to BACKEND_REGISTRY in the same phase (06-01) but their downstream entries were missing.
|
||||||
|
- **Fix:** Added onedrive, gcs (google cloud storage), b2 to both RCLONE_TYPE_MAP and BACKEND_SCHEMAS in the same task
|
||||||
|
- **Files modified:** src/schemas/index.ts, src/generators/rclone-conf.ts
|
||||||
|
- **Verification:** All 55 registry and rclone-conf tests pass
|
||||||
|
- **Committed in:** c1d61d3 (Task 1 commit)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Total deviations:** 1 auto-fixed (Rule 1 - Bug)
|
||||||
|
**Impact on plan:** Required for test correctness. No scope creep — these entries were already needed by Plan 01's backends.
|
||||||
|
|
||||||
|
## Issues Encountered
|
||||||
|
|
||||||
|
- RemoteConfigStep.test.tsx SFTP toggle tests (4 tests) remain failing — expected per plan (Plan 03 wires SftpAuthToggle into RemoteConfigStep). The component exists and is importable; wiring is deferred to 06-03.
|
||||||
|
|
||||||
|
## Next Phase Readiness
|
||||||
|
|
||||||
|
- SftpAuthToggle.tsx ready to be imported by RemoteConfigStep in Plan 03
|
||||||
|
- All 7 backend data layers complete (registry, schemas, rclone type map)
|
||||||
|
- Plan 03 (06-03) can wire SftpAuthToggle into RemoteConfigStep and add remaining backend forms
|
||||||
|
|
||||||
|
---
|
||||||
|
*Phase: 06-new-backends*
|
||||||
|
*Completed: 2026-03-30*
|
||||||
Reference in New Issue
Block a user