Skip to content

[Task] F5 — Persist the versioned account-scoped workspace #31

Open

Description

@DavidVFitzGerald

Delivery phase

Phase 1 - frontend with mock services. Milestone F5; task key F5-05.

Goal

Restore each user's comparison preferences in the same browser without leaking state across accounts.

Context and authority

Read AGENTS.md, docs/product/LCA_diff_PRD.md, docs/engineering/LCA_diff_Implementation_Specification.md, docs/engineering/roadmap.md, and docs/team/product-manager.md. Do not read archive/reference folders. Current governance/spec documents are prepared on branch docs/agent-workflow; acceptance/merge authority follows docs/adr/README.md, not proposed ADR status. Any contract deviation needs an ADR and both current document updates in the same PR.

Specification §6.8, §9.2 behavior 17. Planned files: apps/frontend/src/app/ workspace persistence adapter/schema and auth integration/tests (planned).

Requirements and constraints

Use a versioned UID-scoped storage key. Validate persisted shape defensively, including unsupported schema versions, corrupt data and unavailable/quota-limited browser storage. Store identifiers/preferences only; no tokens, raw source data or copied proprietary payloads.

All work runs in containers with synthetic mock data and no API/Firebase/cloud dependency. Keep HTTP/auth/fixtures behind typed services and mock adapters; components consume contracts rather than fixtures. Follow Software Engineer and QA role handoffs, commit focused increments referencing this issue, and leave it open for QA/review.

Acceptance criteria

  • AC1 — Only ordered process IDs, selected indicator IDs, active tab and the two difference flags are persisted; no search, tree-expansion or sidebar-collapse state is saved.
  • AC2 — Reload as the same verified user restores those fields while respecting fewer-than-two-process toggle rules.
  • AC3 — Logout preserves that user's saved entry but immediately clears protected in-memory data and query caches; another user cannot see or load it.
  • AC4 — Corrupt/unsupported entries and denied/quota storage degrade to a safe usable workspace with appropriate non-sensitive feedback, never a crash.
  • AC5 — Persistence begins only after identity resolution and does not overwrite a user's saved workspace with transient unauthenticated defaults.
  • AC6 — Shared-browser limitations are explained in concise user-facing privacy guidance without exposing technical implementation details in routine product flows.

Out of scope and follow-ups

Resolving removed catalog/indicator IDs and publication changes is #32; final cross-state evidence #34. No cloud saved comparisons or cross-device sync.

Verification plan

Run on the Docker host: ./dev shell, then inside /workspaces/lca-diff: npm --prefix apps/frontend run format:check, npm --prefix apps/frontend run lint, npm --prefix apps/frontend run typecheck, npm --prefix apps/frontend run test:unit, and npm --prefix apps/frontend run build. These scripts are established by F1, not claimed available today. Browser scenarios use npm --prefix apps/frontend run test:e2e -- --project=chromium (F1 establishes the pinned Playwright tool/browser setup). No host package installs.

Component/integration tests mock denied/quota/corrupt storage and schema versions. Browser cases reload two distinct UIDs, logout/login and inspect permitted fields; verify account isolation and no temporary search/sidebar state restoration.

Record exact commands/results and delivered SHA in the engineering handoff. QA independently checks every criterion at that SHA and reports PASS/FAIL/BLOCKED; unavailable required checks are not passing.

Dependencies and readiness

Blocking predecessors: #30. Also requires verified M1 container runtime and merged bootstrap/M2 configuration; later milestones are planned, not implementation-ready while predecessors remain open. PM must recheck dependencies and actual interfaces before marking READY.

Activity

  1. added
    task
    frontend
    blocked
    on Nov 13, 2026
  2. DavidVFitzGerald commented on Nov 13, 2026

    @DavidVFitzGerald
    OwnerAuthor

    PM: BLOCKED

    Groomed using docs/team/product-manager.md for F5, Phase 1 — frontend with mock services. Documentation review: PASS for scope, required sections, specification coverage and acyclic dependency links; this is not application QA or implementation readiness.

    Blocking predecessor issues: #30. The M1 runtime gate (#2) and merged bootstrap/M2 configuration (#3) also remain required. PM must recheck merged dependencies and current interfaces before changing this to READY.

    Engineer implements one issue, commits regularly and hands the delivered SHA plus exact container checks to independent QA; do not close before QA, review and approved merge. No backend/Firebase/cloud credentials or host installations are required for Phase 1.

  3. added
    post-MVP
    and removed
    blocked
    on Nov 16, 2026
  4. DavidVFitzGerald commented on Nov 16, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Deferred to post-MVP (coordinator, 2026-11-16) per the maintainer's local-only MVP scope revision, ADR 0006 (#95). ADR 0006 moves browser workspace restoration (ordered processes, indicators, tab, toggles under UID-scoped keys) out of the MVP. Logout/account-change cache clearing stays MVP and is already delivered by F2 and kept by L2 (#97). Body and criteria are retained unchanged for later re-grooming; recheck dependencies (now partly on L1–L3: #96, #97, #30) before any future start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendpost-MVPtask

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions