chore(M001/S05): auto-commit after plan-slice

This commit is contained in:
2026-03-24 14:05:21 +01:00
parent 95c5a62919
commit 64b4a07cc3
5 changed files with 198 additions and 0 deletions
@@ -0,0 +1,60 @@
---
estimated_steps: 4
estimated_files: 8
skills_used:
- aspnet-core
- react-best-practices
- test
---
# T01: Centralize workflow trust signals across overview and readiness surfaces
**Slice:** S05 — End-to-end trust and workflow polish
**Milestone:** M001
## Description
Replace the remaining brittle workflow heuristics with one shared trust/action model so the table, dashboard, reminders, and readiness surfaces all describe the same next step for the same job.
## Steps
1. Audit the current reminder/readiness/action logic in `JobApplicationsController.cs`, `JobTable.tsx`, `DashboardView.tsx`, and `RemindersView.tsx`, with special attention to `followUpReason` string parsing and the saved application-answer notes-block constraint.
2. Add explicit workflow trust/action fields or normalized route metadata to the backend DTOs and cover that behavior in a focused backend test.
3. Introduce a shared UI helper that consumes the new contract and update the overview surfaces to route from it instead of duplicating local heuristics.
4. Add focused frontend coverage proving that the same job produces the same next action across table, dashboard, and reminders.
## Must-Haves
- [ ] The workflow contract distinguishes package-work gaps from follow-up work without treating all `notes` text as generic readiness state.
- [ ] Table, dashboard, and reminders open the shared workspace from one trust/action source of truth.
- [ ] Backend and frontend focused tests fail if workflow signal drift reappears.
## Verification
- `dotnet test JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --filter JobApplicationsWorkflowSignalsTests`
- `CI=true npm --prefix job-tracker-ui test -- --watch=false --runTestsByPath src/workflow-trust-signals.test.tsx`
## Observability Impact
- Signals added/changed: normalized workflow trust/action fields and readiness-derived routing metadata used by overview surfaces.
- How a future agent inspects this: read `JobTrackerApi/Controllers/JobApplicationsController.cs` and `job-tracker-ui/src/jobWorkflowSignals.ts`, then run the focused backend/frontend tests.
- Failure state exposed: mismatched overview actions, package-readiness drift, or fallback to string parsing becomes visible as deterministic test failures instead of silent UI inconsistency.
## Inputs
- `JobTrackerApi/Controllers/JobApplicationsController.cs` — current reminders/readiness logic and DTO shaping.
- `job-tracker-ui/src/components/JobTable.tsx` — current next-action and readiness heuristics.
- `job-tracker-ui/src/components/DashboardView.tsx` — current dashboard reminder routing.
- `job-tracker-ui/src/components/RemindersView.tsx` — current reminders grouping and routing.
- `job-tracker-ui/src/types.ts` — current DTO shapes available to the UI.
## Expected Output
- `JobTrackerApi/Controllers/JobApplicationsController.cs` — explicit workflow trust/action fields or normalized route metadata.
- `JobTrackerApi.Tests/JobApplicationsWorkflowSignalsTests.cs` — backend proof for the normalized workflow contract.
- `job-tracker-ui/src/types.ts` — updated UI contract for the new trust/action fields.
- `job-tracker-ui/src/jobWorkflowSignals.ts` — shared workflow helper used by overview surfaces.
- `job-tracker-ui/src/components/JobTable.tsx` — table actions driven from the shared trust/action model.
- `job-tracker-ui/src/components/DashboardView.tsx` — dashboard attention actions driven from the shared trust/action model.
- `job-tracker-ui/src/components/RemindersView.tsx` — reminders grouping/routing driven from the shared trust/action model.
- `job-tracker-ui/src/workflow-trust-signals.test.tsx` — focused UI proof that overview surfaces stay aligned.
@@ -0,0 +1,60 @@
---
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 milestones 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.