Plans 01–11, CONTEXT, PATTERNS, RESEARCH, REVIEW-FIX, and updated
SUMMARY and CONTEXT for the virtual-local-cloud-operations phase.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Red health-state translation, auto-test, and no-probe-on-navigation coverage.
from
to
via
pattern
queue conflict and error bodies
StorageBrowser pause and resume UI
shared-browser red tests
paused_conflict
from
to
via
pattern
credential failure responses
browser and Settings health state
store and rendered-flow red tests
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.
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/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.
<threat_model>
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.
</threat_model>
- 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.
<success_criteria>
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.
</success_criteria>
Create `.planning/phases/13-virtual-local-cloud-operations/13-02-SUMMARY.md` when done