--- estimated_steps: 4 estimated_files: 5 skills_used: - react-best-practices - agent-browser - test --- # T02: Add integrated trust-loop proof and workspace polish **Slice:** S05 — End-to-end trust and workflow polish **Milestone:** M001 ## Description Compose the milestone’s existing package, Gmail, and follow-up flows into one integrated UI proof path, then make the smallest workspace polish changes needed so that path feels trustworthy and keeps outbound send explicitly manual. ## Steps 1. Build a focused integrated React test that starts from an overview entry path and exercises package reuse, linked-thread continuity, and grounded follow-up drafting inside the shared workspace. 2. Update `JobDetailsDialog.tsx` and `Correspondence.tsx` only where the integrated proof exposes unclear state, missing trust copy, or continuity ambiguity. 3. Re-run the focused S01-S04 regressions to confirm the integrated path did not break the narrower package, Gmail, follow-up, or daily-loop contracts. 4. Write a live-safe UAT runbook that tells a human how to verify the full loop against real services without triggering accidental recruiter email. ## Must-Haves - [ ] A single integrated UI regression proves overview → workspace → saved package → linked Gmail thread refresh → grounded follow-up draft. - [ ] The workspace keeps the manual-send boundary explicit and does not couple draft generation to `send-followup`. - [ ] A human can run the final live-UAT flow safely using the documented guardrails. ## Verification - `CI=true npm --prefix job-tracker-ui test -- --watch=false --runTestsByPath src/end-to-end-trust-loop.test.tsx` - `CI=true npm --prefix job-tracker-ui test -- --watch=false --runTestsByPath src/correspondence-gmail-import.test.tsx src/job-details-generated-drafts.test.tsx src/job-details-followup-drafts.test.tsx src/daily-control-loop.test.tsx` - `CI=true npm --prefix job-tracker-ui run build` ## Observability Impact - Signals added/changed: clearer workspace trust state around saved package reuse, linked-thread refresh outcomes, and follow-up draft/manual-send separation. - How a future agent inspects this: run `src/end-to-end-trust-loop.test.tsx`, inspect `JobDetailsDialog.tsx` and `Correspondence.tsx`, and follow `.gsd/milestones/M001/slices/S05/S05-UAT.md` for live verification. - Failure state exposed: broken loop composition, stale correspondence continuity, or accidental send coupling surfaces in one integrated test instead of requiring four separate slice tests to infer the regression. ## Inputs - `job-tracker-ui/src/jobWorkflowSignals.ts` — shared workflow action helper from T01. - `job-tracker-ui/src/components/JobDetailsDialog.tsx` — package workspace, follow-up drafting, and readiness surfaces. - `job-tracker-ui/src/components/Correspondence.tsx` — Gmail import and linked-thread continuity workspace. - `job-tracker-ui/src/daily-control-loop.test.tsx` — current routed overview proof from S04. - `job-tracker-ui/src/correspondence-gmail-import.test.tsx` — current Gmail continuity proof from S01. - `job-tracker-ui/src/job-details-generated-drafts.test.tsx` — current package save/reuse proof from S02. - `job-tracker-ui/src/job-details-followup-drafts.test.tsx` — current follow-up grounding/manual-send proof from S03. ## Expected Output - `job-tracker-ui/src/components/JobDetailsDialog.tsx` — polished workspace trust state for package reuse and follow-up/manual-send separation. - `job-tracker-ui/src/components/Correspondence.tsx` — polished linked-thread continuity state used by the integrated loop. - `job-tracker-ui/src/end-to-end-trust-loop.test.tsx` — integrated UI proof for the full trust loop. - `job-tracker-ui/src/daily-control-loop.test.tsx` — updated overview proof if the shared trust-loop entry semantics change. - `.gsd/milestones/M001/slices/S05/S05-UAT.md` — live-safe end-to-end verification runbook.