Repository navigation
Compose guarded mock services with TanStack Query and UI boundaries - #43
Merged
Merged
Conversation
…ry checks (Refs #9)
5 tasks
DavidVFitzGerald
marked this pull request as ready for review
November 14, 2026 11:07
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
Compose the frontend through one injected Services provider and a stable TanStack Query client. Explicit mock configuration shows a local-demo marker; missing/unsupported configuration fails visibly without falling back. Refs #9.
Scope and acceptance evidence
Phase 1/F1 AC1–5: guarded data access, resolving-to-unauthenticated placeholder auth, account-change cache clearing/cancellation and stale-response rejection, typed query helpers forwarding AbortSignal, account/adapter/request/revision cache keys, error-envelope conversion, and static UI restrictions on concrete service imports/HTTP/auth SDKs. Substitute-adapter integration tests require no component changes.
TanStack Query is pinned to 5.107.1. No product auth UX or full lifecycle actions (#11–#14/#12), backend adapter or browser tooling (#10) introduced. Demo dev/build uses explicit VITE_SERVICE_MODE=mock as documented.
Validation
Delivered SHA
f0f1a36d8aba8c5040e2bf555cab2589367f0a7e, branchfeat/f1-service-composition. Rootless environment check and frozen npm ci PASS (227 packages). Five frontend scripts in the isolated container PASS: format:check, lint, typecheck, test:unit (104 tests/six files), build. Git whitespace checks PASS; clean worktree.Tests include 15 composition cases and 10 negative static-boundary cases, default zero dataset calls, injected verified services, real pending mock request abort, account/logout cleanup, direct stale-response rejection, typed query failures, and invalid mode behavior. Independent QA PASS AC1–5: #9 (comment). Hosted quality CI PASS at delivered SHA: https://github.com/DavidVFitzGerald/LCA-diff/actions/runs/43588351365.
Decisions and handoff
No PRD/spec deviation requiring an ADR. Historical folders excluded; no host installs, secrets or licensed data. Mock checks do not establish real security/integration. Leave #9 open pending independent QA, passing CI and maintainer-approved merge. #10 stays merge gated.