--- phase: "13" plan: "02" type: tdd wave: 0 depends_on: [] files_modified: - frontend/src/components/storage/__tests__/StorageBrowser.cloud-queue.test.js - frontend/src/views/__tests__/CloudFolderOpenPreview.test.js - frontend/src/components/settings/__tests__/SettingsCloudTab.health.test.js - frontend/src/stores/__tests__/cloudConnections.test.js - frontend/src/views/__tests__/CloudFolderView.test.js - frontend/src/views/__tests__/CloudFolderRenderedFlow.test.js autonomous: true requirements: - CONN-01 - CONN-02 - CONN-03 - CLOUD-02 - CLOUD-03 - CLOUD-04 - CLOUD-05 - CLOUD-06 - CLOUD-07 - CLOUD-09 must_haves: truths: - "Phase 13 frontend work starts from failing shared-browser and health-state regressions instead of ad hoc UI behavior." - "Queue pause or resume, binary-only preview fallback, reconnect health, and no-probe-on-navigation are all specified before implementation." - "Browser-adjacent health and Settings diagnostics stay aligned because the same red tests cover both surfaces." artifacts: - path: "frontend/src/components/storage/__tests__/StorageBrowser.cloud-queue.test.js" provides: "Red sequential queue and mutation-dialog coverage in the shared browser." - path: "frontend/src/views/__tests__/CloudFolderOpenPreview.test.js" provides: "Red authorized preview and download fallback coverage." - path: "frontend/src/components/settings/__tests__/SettingsCloudTab.health.test.js" provides: "Red Test/Reconnect/Disconnect/consent-copy coverage in Settings." - path: "frontend/src/stores/__tests__/cloudConnections.test.js" provides: "Red health-state translation, auto-test, and no-probe-on-navigation coverage." key_links: - from: "queue conflict and error bodies" to: "StorageBrowser pause and resume UI" via: "shared-browser red tests" pattern: "paused_conflict" - from: "credential failure responses" to: "browser and Settings health state" via: "store and rendered-flow red tests" pattern: "requires_reauth" --- Create the missing red frontend and store suites for shared cloud queue behavior, authorized preview, actionable health UX, broader Google Drive consent copy, and the no-probe-on-navigation invariant. Purpose: Lock the shared browser and health UX before backend behavior is wired through it. Output: Failing frontend tests that define the only acceptable Phase 13 UI and store behavior. @$HOME/.codex/gsd-core/workflows/execute-plan.md @$HOME/.codex/gsd-core/templates/summary.md @AGENTS.md @.planning/ROADMAP.md @.planning/phases/13-virtual-local-cloud-operations/13-CONTEXT.md @.planning/phases/13-virtual-local-cloud-operations/13-RESEARCH.md @.planning/phases/13-virtual-local-cloud-operations/13-PATTERNS.md @frontend/src/components/storage/__tests__/StorageBrowser.capabilities.test.js @frontend/src/views/__tests__/CloudFolderView.test.js @frontend/src/views/__tests__/CloudFolderRenderedFlow.test.js @frontend/src/components/settings/__tests__/SettingsCloudTab.test.js @frontend/src/stores/__tests__/cloudConnections.test.js ## Artifacts this phase produces - `frontend/src/components/storage/__tests__/StorageBrowser.cloud-queue.test.js` — red shared queue and mutation-dialog coverage. - `frontend/src/views/__tests__/CloudFolderOpenPreview.test.js` — red authorized preview and download fallback coverage. - `frontend/src/components/settings/__tests__/SettingsCloudTab.health.test.js` — red health, reconnect, disconnect, and broader-scope consent coverage. - Extended `frontend/src/stores/__tests__/cloudConnections.test.js`, `frontend/src/views/__tests__/CloudFolderView.test.js`, and `frontend/src/views/__tests__/CloudFolderRenderedFlow.test.js` for no-probe and health-state regressions. ## Pattern analogs - `frontend/src/components/storage/__tests__/StorageBrowser.capabilities.test.js` — emitted-event and capability UI assertions. - `frontend/src/views/__tests__/CloudFolderView.test.js` — thin-view orchestration style. - `frontend/src/views/__tests__/CloudFolderRenderedFlow.test.js` — rendered shared-browser flow style. - `frontend/src/components/settings/__tests__/SettingsCloudTab.test.js` — settings action and confirmation style. - `frontend/src/stores/__tests__/cloudConnections.test.js` — store mapping and reset-behavior style. Task 1: Add red shared-browser tests for queue, preview, and fallback download behavior frontend/src/components/storage/__tests__/StorageBrowser.cloud-queue.test.js, frontend/src/views/__tests__/CloudFolderOpenPreview.test.js, frontend/src/views/__tests__/CloudFolderView.test.js - frontend/src/components/storage/__tests__/StorageBrowser.capabilities.test.js - frontend/src/views/__tests__/CloudFolderView.test.js - frontend/src/views/__tests__/CloudFolderRenderedFlow.test.js - .planning/phases/13-virtual-local-cloud-operations/13-CONTEXT.md Create failing tests that require D-01 through D-04 and D-18 exactly: cloud upload runs as a sequential queue, pauses the whole queue on a typed conflict or error body, preserves remaining items, and resumes only after Keep both, Replace, Skip, Retry, or Cancel all. Add open and preview tests that require binary-only in-app preview, ownership-checked download fallback for unsupported formats, and zero `window.open()` or raw provider URL usage. Extend the thin-view suite so CloudFolderView must remain a data provider over `StorageBrowser`, not a parallel cloud grid. - the new queue and preview tests fail against the current placeholder cloud handlers - red tests require backend-authored conflict/error typing instead of Vue-side guessing - unsupported preview formats are required to fall back to authorized download rather than Office-native or Google Workspace preview cd frontend && npm run test -- --run src/components/storage/__tests__/StorageBrowser.cloud-queue.test.js src/views/__tests__/CloudFolderOpenPreview.test.js src/views/__tests__/CloudFolderView.test.js Frontend red tests now define the only acceptable shared queue and preview behavior. Task 2: Add red store and health-flow tests for reconnect, broader Google consent, and no navigation probe frontend/src/components/settings/__tests__/SettingsCloudTab.health.test.js, frontend/src/stores/__tests__/cloudConnections.test.js, frontend/src/views/__tests__/CloudFolderRenderedFlow.test.js - frontend/src/components/settings/__tests__/SettingsCloudTab.test.js - frontend/src/stores/__tests__/cloudConnections.test.js - frontend/src/views/__tests__/CloudFolderRenderedFlow.test.js - .planning/phases/13-virtual-local-cloud-operations/13-RESEARCH.md - .planning/phases/13-virtual-local-cloud-operations/13-CONTEXT.md Add failing tests for D-12 through D-17: compact actionable health beside the cloud browser, fuller diagnostics plus explicit Test and Reconnect controls in Settings, automatic health retest after connect, reconnect, and credential-related failures, preserved stale metadata during transient outages, and an explicit invariant that ordinary folder navigation never triggers a provider health probe. Make the Google Drive consent copy explicit about broader storage access so the expanded Phase 13 scope cannot ship silently. Keep the behavior store-led: the store must translate server health states once for both browser and Settings, record when reconnect should refresh the current folder, and distinguish transient offline state from reauthentication. The rendered-flow test should confirm the browser keeps cached items visible while warning state and reconnect actions are shown. - health-flow tests fail unless automatic post-failure retest and no-probe-on-navigation behavior are implemented - the settings suite fails unless broader Google Drive access is explained in the user-facing consent/reconnect copy - rendered-flow tests fail unless stale metadata remains visible during warning and reconnect states cd frontend && npm run test -- --run src/components/settings/__tests__/SettingsCloudTab.health.test.js src/stores/__tests__/cloudConnections.test.js src/views/__tests__/CloudFolderRenderedFlow.test.js Frontend red tests now lock health-state, reconnect, consent, and no-probe behavior before implementation. ## Trust Boundaries | Boundary | Description | |----------|-------------| | server health state → store/UI | Trusted backend status must not be replaced by client-side guesswork. | | user interaction → shared browser dialogs | Conflict and delete choices must remain explicit and auditable. | ## STRIDE Threat Register | Threat ID | Category | Component | Disposition | Mitigation Plan | |-----------|----------|-----------|-------------|-----------------| | T-13-06 | T | cloud health UI | mitigate | Red tests require no background probe on ordinary navigation and explicit server-driven health mapping. | | T-13-07 | I | preview and download UI | mitigate | Red tests forbid raw provider URLs and require authorized preview/download helpers only. | | T-13-08 | R | queue conflict decisions | mitigate | Red tests require explicit pause/resume choices and no silent replace or hidden cancel path. | | T-13-09 | S | reconnect/consent UX | mitigate | Red settings tests require explicit broader Google scope copy and reconnect affordances. | - Confirm the queue, preview, health, store, and rendered-flow suites fail in the expected places. - Confirm no frontend test assumes cloud-only layout or browser-direct provider URLs. - Confirm the no-probe-on-navigation invariant is explicitly asserted. - Phase 13 frontend implementation is blocked by failing shared-browser, store, and Settings regressions. - Broader Google Drive access, binary-only preview, and health re-evaluation rules are concretely encoded. - No backend host-venv assumption appears anywhere in this plan. Create `.planning/phases/13-virtual-local-cloud-operations/13-02-SUMMARY.md` when done