Repository navigation
Description
Delivery phase
Phase 1 - frontend with mock services
Goal
Close F2 with repeatable evidence for simulated identity journeys and shell accessibility before selector work.
Context and authority
Milestone F2; read AGENTS.md, docs/team/product-manager.md, docs/product/LCA_diff_PRD.md, docs/engineering/roadmap.md, and docs/engineering/LCA_diff_Implementation_Specification.md §§6.1, 6.8, 9.2; roadmap F2 gate. Current planning baseline is on docs/agent-workflow, pending review/merge into main; proposed ADRs are not accepted authority. Extend frontend auth/shell Playwright and component tests and document F2 gate evidence; make only small in-scope fixes via linked findings if needed. These application paths are planned until created. Exclude all archive/reference folders.
Requirements and constraints
Exercise actual running frontend through mocked services in containers. Cover initial state, full registration/reset/verification, persistent session, revocation/logout, account switching and narrow viewport behavior. Treat mock evidence separately from future Firebase integration; no application feature additions beyond defects tracked against the relevant task.
One session-sized task/PR including verification and handoff. Run all development, installation and checks in containers; install nothing on the host. No real backend, Firebase project, cloud credentials or proprietary inputs. If the current PRD/spec must change, prepare an ADR and updates to both current documents in the same PR.
Acceptance criteria
- AC1 - Browser coverage includes unauthenticated zero-data shell, named focus-trapped dialog, keyboard form journeys, verified access and no modal flash during restored session.
- AC2 - Logout, refresh failure/revocation, unverified denial and delayed-response/account-switch cases clear protected content and prevent cached-account leakage.
- AC3 - Desktop shell/tab/sidebar controls have labels/focus and narrow view has a usable desktop-required message; Chromium and Firefox journeys run where provisioned.
- AC4 - Container PR smoke includes critical locked-shell/login/auth-guard cases, while fuller available frontend auth suite is runnable manually.
- AC5 - Evidence records reviewed SHA, exact commands/browser versions, passing/failing/blocked cases and remaining real-auth checks; no blocker is marked PASS.
Out of scope and follow-ups
Process selector and actual comparison content are F3–F5. Real auth/security and backend validation remain B2/I1; no live credentials or licensed data.
Verification plan
Inside ./dev shell, run npm --prefix apps/frontend run test:unit, npm --prefix apps/frontend run test:e2e, format:check/lint/typecheck/build. Capture criteria evidence and validate the delivered PR CI run; report unavailable browser environments as blockers.
Engineer records branch/SHA and exact results, leaves issue open, and hands off to QA. QA verifies every criterion at that SHA and reports PASS/FAIL/BLOCKED; mock evidence is not proof of real security/integration.
Dependencies and readiness
Blocked by #13, #14. No implementation until dependencies and the M1 environment runtime gate are satisfied. This body is groomed planning material, not PM READY while blockers remain. Coordinator/PM rechecks merged dependencies and session-sized scope before starting.
Current readiness — supersedes historical planning baseline/blockers above
PM: READY for Phase 1/F2 on merged main at 93872b3f1bfb5d569f37f8ef8285bb8897764b53. Dependencies #13 and #14 are closed. Each had independent QA PASS, required hosted quality SUCCESS and an explicit maintainer merge: PR #47 (9012a65) and PR #48 (93872b3). #11/#12 were already closed, and the M1/M2/F1 prerequisites remain satisfied. The merged documents and contracts on main replace the historical planning-branch statements above. AC1–AC5 are unchanged. No ADR or product/specification decision is required. This is a verification-and-evidence task: add browser/component tests and documentation only. Do not add product features, scenario hooks or test-only product code.
Existing coverage on main (do not duplicate; extend or reference)
apps/frontend/e2e/foundation.spec.ts:@smokelocked shell with no protected data (namedaria-modaldialog, inert shell, Tab/Shift+Tab, Escape/backdrop refusal, no fetch/XHR) and@smokenarrow viewport with resize recovery.apps/frontend/e2e/auth.spec.ts:@smokekeyboard sign-in (validation, invalid credentials, repeated Escape). Not smoke: registration duplicate/verification, unverified lock plus switch, and reset unknown/known.apps/frontend/e2e/session.spec.ts:@smokerestore with no modal flash (init-script MutationObserver). Not smoke: unverified restore and anonymous reload, and signout/account switch preserving the workspace key.- Component:
src/App.test.tsx(shell states, tabs/sidebars/settings with injected services, narrow view, demo marker),src/auth/AuthDialog.test.tsx(forms, pending/abort/duplicate),src/app/session.test.tsx(15 lifecycle cases: expiry/revocation/failed refresh, protected 401/403 lock, slow/failed signout, A→B, same-UID relogin, late failures, abort passthrough) andsrc/app/composition.test.tsx. - CI:
.github/workflows/frontend.ymlrunsnpm run test:e2e -- --grep @smokeon PR/push, and the fullnpm run test:e2eonworkflow_dispatch. The Playwright config has onlychromiumandfirefoxprojects. - Evidence: the per-issue records
docs/engineering/f2-shell-verification.md,f2-auth-verification.md,f2-auth-forms-verification.mdandf2-session-verification.md. No consolidated F2 gate record exists.
Gaps this issue must close
-
G1 — browser coverage of verified-shell controls (AC3, §§6.1, 6.8). No Playwright case exercises the verified workspace controls. Add a browser journey through the composed mock adapter (sign in as
[email protected]) that checks:- Flows is the default tab, and ArrowLeft/ArrowRight/Home/End move selection and focus with roving
tabindex. - Activating Scores shows the indicator sidebar, and returning to Flows hides it.
- The process and indicator collapse buttons toggle
aria-expandedand the panel visibility. - The Settings button toggles
aria-expandedand the named region. - Sign out is reachable and operable by keyboard.
- Focus is visible on each control: assert
:focus-visible/focused state, not just DOM order.
- Flows is the default tab, and ArrowLeft/ArrowRight/Home/End move selection and focus with roving
-
G2 — browser evidence for expiry, revocation and failed refresh (AC2). The mock
expireSession/revokeSession/refresh_failuredrivers are reachable only inside services/tests by design. Do not add window globals, query parameters, env/build flags, test-only build modes or UI to drive them in the browser. No shipped auth bypass or override is allowed.- Add the legitimate browser-observable analogue: a session invalidated out of band before reload. From the Playwright harness, remove the adapter marker
lca-diff:mock-session:v1and also replace it with a malformed or non-synthetic value. Then reload and assert:- the shell resolves to the locked sign-in modal;
- the prior account email and verified controls are absent;
- no fetch/XHR requests are made;
- the UID-scoped workspace key is untouched.
- This analogue only reduces access, and it changes no product code.
- Live expiry/revocation/failed refresh, protected 401/403 locking and delayed-response account switching are accepted as component-level evidence in
src/app/session.test.tsx(injected composition). Cite the exact test names. Record the browser gap explicitly as deferred to I1 (Firebase Auth Emulator). Do not record it as PASS.
- Add the legitimate browser-observable analogue: a session invalidated out of band before reload. From the Playwright harness, remove the adapter marker
-
G3 — smoke composition (AC4, §9.2). The PR smoke must cover locked shell, login and at least one auth-guard denial. It currently has locked shell, narrow view, keyboard login and no-flash restore, but no guard denial.
- Tag exactly one small existing or new guard case
@smoke. Prefer either "unverified sign-in stays locked with no Sign out/workspace" or "signout relocks and removes account text". - Keep the smoke small. Every other F2 journey stays in the full suite.
- Document both invocations: local
npm run test:e2e -- --grep @smokeandnpm run test:e2e, and hostedgh workflow run frontend.yml --ref <branch>(workflow_dispatch full suite). Record the hosted full-suite run URL, or mark it NOT RUN with the reason.
- Tag exactly one small existing or new guard case
-
G4 — consolidated F2 gate record (AC5). Create
docs/engineering/f2-verification.md. It must hold:- the reviewed SHA;
- exact container commands;
- tool and browser versions;
- an AC1–AC5 × case matrix naming each spec/test file and test title, the layer (browser/component), the browsers, and PASS/FAIL/BLOCKED/NOT RUN;
- accepted component-only evidence (G2) with its rationale;
- remaining real-auth checks for B2/I1.
Link the four per-issue records from it. Do not rewrite them. An optional one-line status pointer at the top of
f2-shell-verification.mdis allowed, because its "prepared/not merged" status is outdated. -
G5 — roadmap status (
docs/engineering/roadmap.md).- Update the F2 row in the "Current position" table, which still says "[Task] F2: build the direct application shell and accessible locked login dialog #11 shell implementation prepared…".
- Update the F2 paragraph under the gate (around line 152). It should say that [Task] F2: build the direct application shell and accessible locked login dialog #11–[Task] F2: guard protected queries through session restoration and account changes #14 are merged with QA/CI evidence and that [Task] F2: verify complete mock authentication and accessible shell journeys #15 gate evidence is prepared. Completion still awaits [Task] F2: verify complete mock authentication and accessible shell journeys #15 QA, CI and maintainer merge.
- Do not mark F2 complete in this PR. The coordinator does that after merge.
-
G6 — Phase 2 follow-ups must not disappear. No B2/I1 issue exists, and later phases stay at milestone level, so do not create backend issues. Add these to the roadmap B2 and/or I1 sections, and list them in the F2 record:
- (a) Reconcile reset-error mapping (currently "unknown account" is shown) with Firebase email-enumeration protection. The real adapter may not reveal unknown addresses. (Source: QA on [Task] F2: connect mock login, registration, verification and password-reset flows #13.)
- (b) Decide the signout-failure UX for unverified sessions when the adapter emits no new state. (Source: QA on [Task] F2: guard protected queries through session restoration and account changes #14.)
- (c) Prevent lock/unlock cycling when a real adapter re-emits the same verified state against a persistent server 401/403. (Source: QA on [Task] F2: guard protected queries through session restoration and account changes #14.)
-
G7 — browser versions and Safari.
- Capture launched browser versions inside the container with:
cd apps/frontend && node -e "const pw=require('@playwright/test');(async()=>{for(const t of [pw.chromium,pw.firefox]){const b=await t.launch();console.log(t.name(),b.version());await b.close();}})()"plusnpx playwright --version. - Record Safari/WebKit as UNAVAILABLE (not provisioned in the container image or Playwright config). It is neither PASS nor an F2 blocker: §6.1 says "Safari as practicable". Note it for the Phase 1/R2 browser recheck. Do not add a WebKit project or image changes here.
- Capture launched browser versions inside the container with:
Files
- Change/add:
apps/frontend/e2e/*.spec.ts(new shell-controls and invalidated-restore journeys;@smoketag change), with new spec files allowed;- optional focused additions to
src/App.test.tsx/src/app/session.test.tsx, only if a G1/G2 assertion is missing at component level; docs/engineering/f2-verification.md(new);docs/engineering/roadmap.md(F2 row/paragraph and B2/I1 follow-ups).
- Do not change product source,
src/services/**behavior,playwright.config.tsbrowser projects,.github/workflows/frontend.ymlor.devcontainer/**, unless a real defect is found. If a defect is found, stop, and the coordinator opens a linked Bug for it rather than fixing it silently here.
Verification (container only; nothing installed on the host)
COMPOSE_PROJECT_NAME=lca-diff-f2-gate FRONTEND_PORT=<free port> ./dev up
COMPOSE_PROJECT_NAME=lca-diff-f2-gate FRONTEND_PORT=<free port> ./dev check
docker compose -p lca-diff-f2-gate exec -T workspace bash -lc 'npm --prefix apps/frontend ci --no-audit --no-fund'
docker compose -p lca-diff-f2-gate exec -T workspace bash -lc 'cd apps/frontend && npm run format:check && npm run lint && npm run typecheck && npm run test:unit && npm run build'
docker compose -p lca-diff-f2-gate exec -T workspace bash -lc 'cd apps/frontend && npm run test:e2e -- --grep @smoke'
docker compose -p lca-diff-f2-gate exec -T workspace bash -lc 'cd apps/frontend && npm run test:e2e'Expected evidence:
- Chromium and Firefox pass both the smoke subset and the full suite, with counts recorded.
- Every browser case still asserts no fetch/XHR/API/external requests and no console errors.
- The lockfile is unchanged.
- Hosted PR
qualitypasses at the delivered SHA. Record the hosted full-suite dispatch run, or mark it NOT RUN. - The engineer hands off the branch/SHA, PR (
Refs #15, no closing keyword) and limitations to independent QA. QA verifies at that SHA. - Mock evidence does not prove real Firebase authentication, token lifecycle, authorization or data security.
Activity
DavidVFitzGerald commentedon Nov 13, 2026
PM: BLOCKED
Groomed using docs/team/product-manager.md for F2, 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: #13, #14. 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.
DavidVFitzGerald commentedon Nov 14, 2026
PM: READY — Phase 1/F2, AC1–5 unchanged. #13/#14 now closed with independent QA PASS, required hosted
qualitySUCCESS and maintainer merges of PR #47 (9012a65) and PR #48 (93872b3); #11/#12 and M1/M2/F1 prerequisites satisfied. Verification/evidence task on main93872b3per specification §§6.1, 6.8, 9.2: add browser verified-shell keyboard controls (G1), out-of-band invalidated-restore browser analogue with component-level expiry/revocation/refresh-failure/delayed-switch evidence accepted fromsession.test.tsxand the browser gap deferred to I1 — no shipped driver/bypass (G2), one auth-guard@smokecase plus documented smoke/full/workflow_dispatch invocations (G3), consolidateddocs/engineering/f2-verification.md(G4), roadmap F2 status (G5), Phase 2 follow-ups from #13/#14 QA in roadmap B2/I1 without new backend issues (G6), browser version capture and Safari recorded UNAVAILABLE not PASS (G7). No product code, ADR or spec change; defects go to linked Bugs. Exact scope, files and container commands appended to the body. Handoff to Software Engineer, then independent QA at delivered SHA.DavidVFitzGerald commentedon Nov 14, 2026
Engineering: READY FOR QA
Branch
test/f2-gate-evidence, delivered SHA0143fba, PR #49 (no closing keyword). The base is main at93872b3. The change is tests and docs only, with no product code changes and no shipped test hooks.Gaps addressed
e2e/f2-gate.spec.ts. It covers tab switching, the sidebar, Settings and sign-out, and checks a visible 3px focus ring on each control.@smoke. Smoke, full and hosted-dispatch invocations are documented.docs/engineering/f2-verification.md.Criteria: AC1–AC5 are each mapped to specific tests in the record, with the layer (browser or component) and the browsers for each.
Commands (rootless container project
lca-diff-f2-gate):./dev checkPASSnpm ci: 230 packages, lockfile unchangedtest:e2e -- --grep @smoke: 10 passedtest:e2e: 26 passedVersions: Node v24.22.3, npm 11.19.1, Playwright 1.65.1, Chromium 159.0.8154.6, Firefox 159.0.
Hosted CI
qualitysmoke: SUCCESS, 10 passed (https://github.com/DavidVFitzGerald/LCA-diff/actions/runs/43602273788)Limitations: this is mock evidence only. Safari is unavailable. Browser-level coverage of live session invalidation is deferred to I1.
Next: independent QA at
0143fba.test: record the F2 gate with shell keyboard and invalidated-session …
DavidVFitzGerald commentedon Nov 14, 2026
QA: PASS
Reviewed SHA:
0143fbab170465fbfb0da91d455dcc7c0175372f(PR #49, branchtest/f2-gate-evidence), base main93872b3. Mode: mock services only (VITE_SERVICE_MODE=mock). This does not prove real Firebase identity, token lifecycle, authorization or data security.Environment: isolated detached worktree
/tmp/claude-1000/qa-15, rootless Compose projectlca-diff-qa-15,FRONTEND_PORT=5185. Torn down afterwards. Nothing was installed on the host and no files were modified.Commands and results (all inside the container except the
./devlifecycle)COMPOSE_PROJECT_NAME=lca-diff-qa-15 FRONTEND_PORT=5185 ./dev up/./dev checknpm --prefix apps/frontend ci --no-audit --no-fundgit status --porcelainclean afterwards (lockfile unchanged)npm run format:check,lint,typecheck,buildnpm run test:unitnpm run test:e2e -- --grep @smokenpm run test:e2enpx playwright test e2e/f2-gate.spec.ts --repeat-each=3npx playwright --version;npx vitest --version; documentednode -elaunch scriptHosted CI
gh pr checks 49:qualitypass. Run 43602273788 ispull_requestat0143fba, SUCCESS, log shows "10 passed" smoke and 168 unit tests.gh run view 43602279979:workflow_dispatchat0143fba,qualitySUCCESS, log shows "26 passed" for the full browser suite and 168 unit tests.Acceptance criteria
foundation.spec.ts,auth.spec.tsandsession.spec.ts, and pass in both browsers. The cited component titles exist inApp.test.tsx/session.test.tsx, andAuthDialog.test.tsxhas the cited 13 cases.@smoke), signout/account switch, the f2-gate keyboard signout, and three invalidated-before-reload cases. Component:session.test.tsxcases "%s clears rendered data, aborts pending reads and empties the cache" (logout/expiry/revocation/failed refresh/verification loss), "a protected %s response locks the session…", "locks before a slow signout…", the A→B switch, same-UID relogin and late-failure cases. All exist and assert what the record says. Browser-level live-invalidation evidence is recorded as deferred to I1, not PASS.aria-selected/tabindex=-1, the Scores-only indicator sidebar, both collapse buttons'aria-expandedand heading visibility with Enter/Space, the Settingsaria-expanded/named region, and keyboard signout. It also asserts focus plus a computedoutline: 3px solidon each control. That ring comes from the:focus-visiblerule inshell.css, so the assertion actually checks visible focus. The narrow-view smoke passes in both browsers.workflow_dispatch(both verified above). The record documents the invocations.docs/engineering/f2-verification.mdrecords the commands, versions, counts, AC×case matrix with layers, accepted component-only evidence with its rationale, Safari UNAVAILABLE, and the B2/I1 real-auth checks. The delivered SHA and hosted run URLs are recorded in the engineering handoff and here (see concern 1). No blocked, deferred or unavailable item is marked PASS.PM gaps
@example.text and an "Auth: unauthenticated" status. The seeded workspace key is preserved, the session marker is cleared, and no fetch/XHR, external,/api/or console errors occur. No shipped hook, global or flag was added.auth.spec.ts:135).f2-shell-verification.md.Scope and authority
git diff --stat 93872b3..0143fbashows 5 files changed:e2e/auth.spec.ts(+1/-1),e2e/f2-gate.spec.ts(new),f2-shell-verification.md,f2-verification.md(new) androadmap.md. There are no changes underapps/frontend/src,.github,.devcontainer,playwright.config.ts,package*.json,docs/product, the specification ordocs/adr. No PRD/spec deviation, and no ADR is required. No historical or archived folders were used.Non-blocking concerns
93872b3and says the hosted runs are "NOT RUN until then"; the delivered SHA and run URLs live in the issue. A commit cannot contain its own SHA, so this is acceptable, but the coordinator may want a pointer to this comment after merge.session.test.tsx, the expiry/revocation/failed-refresh component cases all emit the sameAUTH_FAILEDerror state. The scenario-specific behaviour is covered at the adapter level insrc/services/mock/auth.test.ts(refresh_failure,expireSession/revokeSession).lca-diff:workspace:v1:*yet (workspace persistence starts in F3+). The browser "workspace key preserved" assertions therefore seed the key themselves and prove only that it is not deleted.Defects: none. Next: coordinator/maintainer review and merge of PR #49. After merge, the coordinator marks F2 complete in the roadmap.
DavidVFitzGerald commentedon Nov 14, 2026
Coordinator: closing. Independent QA PASS at 0143fba (identical content merged), hosted PR
qualityand full-suite dispatch SUCCESS, maintainer merge of PR #49 as 1f82774. All F2 tasks #11–#15 are closed; the roadmap F2 row will be marked complete in the next roadmap-touching PR. Delivered SHA and hosted runs: see the engineering and QA comments above.