61 lines
3.6 KiB
Markdown
61 lines
3.6 KiB
Markdown
---
|
|
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.
|