chore(M001/S03): auto-commit after complete-slice
This commit is contained in:
@@ -6,23 +6,40 @@ files:
|
||||
- JobTrackerApi.Tests/JobApplicationsFollowUpDraftTests.cs
|
||||
verification:
|
||||
- $HOME/.dotnet/dotnet build JobTrackerApi/JobTrackerApi.csproj
|
||||
- docker run --rm -v "$PWD":/src -w /src mcr.microsoft.com/dotnet/sdk:9.0 bash -lc '...dotnet test /tmp/followuptests/FollowUpTests.csproj...'
|
||||
- $HOME/.dotnet/dotnet test JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --filter JobApplicationsFollowUpDraftTests
|
||||
observability_surfaces:
|
||||
- GET /api/jobapplications/{id}/followup-draft
|
||||
- POST /api/jobapplications/{id}/send-followup
|
||||
- GET /api/correspondence/{jobId}
|
||||
- JobTrackerApi.Tests/JobApplicationsFollowUpDraftTests.cs
|
||||
---
|
||||
|
||||
Strengthened follow-up draft generation so it now consumes imported thread context and saved application package material instead of relying mostly on job summary text.
|
||||
|
||||
What changed:
|
||||
## What changed
|
||||
|
||||
- `JobTrackerApi/Controllers/JobApplicationsController.cs`
|
||||
- expanded `FollowUpDraftDto` to expose context summary, context signals, thread subject, and last-correspondence metadata for the workspace
|
||||
- expanded `FollowUpDraftDto` to expose `contextSummary`, `contextSignals`, `threadSubject`, and last-correspondence metadata for the workspace
|
||||
- added helpers to parse the saved application-answer draft from notes, derive reply-style subjects from the latest thread, and assemble follow-up context signals from recruiter/package/thread state
|
||||
- enriched `GetFollowUpDraft(...)` so the AI prompt now includes imported correspondence context, recruiter details, saved tailored CV / cover letter / recruiter message / application-answer material, and thread-stage cues
|
||||
- improved the fallback body so it still reflects saved/thread context when AI output is unavailable
|
||||
- `JobTrackerApi.Tests/JobApplicationsFollowUpDraftTests.cs`
|
||||
- added focused backend proof that follow-up draft generation reflects imported thread and saved package state
|
||||
|
||||
Verification:
|
||||
- Backend host build passed with `$HOME/.dotnet/dotnet build JobTrackerApi/JobTrackerApi.csproj`
|
||||
- Focused follow-up draft backend test passed in an isolated Docker harness (`1 passed`)
|
||||
## Diagnostics
|
||||
|
||||
Important caveat:
|
||||
- The broader `JobTrackerApi.Tests` project still has unrelated compile drift, so focused follow-up verification was isolated rather than run through the full test project.
|
||||
- Call `GET /api/jobapplications/{id}/followup-draft` and inspect `contextSummary`, `contextSignals`, `threadSubject`, `lastCorrespondenceFrom`, and `lastCorrespondenceAt` to confirm the draft is grounded in saved package material plus imported correspondence.
|
||||
- Call `POST /api/jobapplications/{id}/send-followup` only after editing the returned draft; this is the authoritative manual-send/log boundary surface for the slice.
|
||||
- Use `GET /api/correspondence/{jobId}` after a manual send/log to confirm the outbound follow-up appears back in the job timeline rather than remaining transient UI-only state.
|
||||
- Re-run `dotnet test JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --filter JobApplicationsFollowUpDraftTests` when follow-up prompt assembly, DTO shape, or fallback behavior changes.
|
||||
|
||||
## Verification Evidence
|
||||
|
||||
| Check | Command | Exit code | Verdict | Duration |
|
||||
|---|---|---:|---|---|
|
||||
| Backend build | `$HOME/.dotnet/dotnet build JobTrackerApi/JobTrackerApi.csproj` | 0 | PASS | 00:00:03 |
|
||||
| Focused backend follow-up test | `$HOME/.dotnet/dotnet test JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --filter JobApplicationsFollowUpDraftTests` | 0 | PASS | 00:00:01 |
|
||||
|
||||
## Important caveat
|
||||
|
||||
- The original task had to fall back to an isolated harness because `JobTrackerApi.Tests.csproj` was missing required framework/package references. During slice closeout, the test project was repaired so the plan-level filtered command now runs directly in this worktree again.
|
||||
|
||||
@@ -8,11 +8,17 @@ files:
|
||||
verification:
|
||||
- CI=true npm --prefix job-tracker-ui test -- --watch=false --runTestsByPath src/job-details-followup-drafts.test.tsx
|
||||
- CI=true npm --prefix job-tracker-ui run build
|
||||
observability_surfaces:
|
||||
- job-tracker-ui/src/components/JobDetailsDialog.tsx (Follow-up tab)
|
||||
- job-tracker-ui/src/job-details-followup-drafts.test.tsx
|
||||
- GET /api/jobapplications/{id}/followup-draft
|
||||
- POST /api/jobapplications/{id}/send-followup
|
||||
---
|
||||
|
||||
Refined the Follow-up tab so it exposes the thread and saved-package grounding behind the draft instead of behaving like a generic email form.
|
||||
|
||||
What changed:
|
||||
## What changed
|
||||
|
||||
- `job-tracker-ui/src/types.ts`
|
||||
- added a typed `FollowUpDraft` contract aligned to the richer backend response
|
||||
- `job-tracker-ui/src/components/JobDetailsDialog.tsx`
|
||||
@@ -23,9 +29,20 @@ What changed:
|
||||
- `job-tracker-ui/src/job-details-followup-drafts.test.tsx`
|
||||
- added focused frontend proof that the Follow-up tab shows thread grounding, keeps sending manual, and posts the edited draft through the send/log endpoint
|
||||
|
||||
Verification:
|
||||
- Focused follow-up workspace test passed: `CI=true npm --prefix job-tracker-ui test -- --watch=false --runTestsByPath src/job-details-followup-drafts.test.tsx`
|
||||
- Production frontend build passed: `CI=true npm --prefix job-tracker-ui run build`
|
||||
## Diagnostics
|
||||
|
||||
Runtime note:
|
||||
- Browser-based local UAT against this worktree was attempted but blocked by environment issues: port 3000 is served by an external nginx bundle unrelated to this worktree, the CRA dev server crashed under Node 25 in `fork-ts-checker`, and the browser harness did not successfully execute the locally served static bundle. Automated verification for the implemented code paths still passed.
|
||||
- Open the Follow-up tab in `job-tracker-ui/src/components/JobDetailsDialog.tsx` and confirm the context panel renders `threadSubject`, `contextSummary`, and `contextSignals` from the backend instead of showing only a blank compose form.
|
||||
- Edit the generated body before pressing **Send and log email**; the UI should preserve the edited body and only call `POST /api/jobapplications/{id}/send-followup` after the explicit button click.
|
||||
- Re-run `CI=true npm --prefix job-tracker-ui test -- --watch=false --runTestsByPath src/job-details-followup-drafts.test.tsx` after changes to follow-up state wiring, helper text, or send/log payloads.
|
||||
- Re-run `CI=true npm --prefix job-tracker-ui run build` after UI changes to catch contract drift or production-only compilation regressions.
|
||||
|
||||
## Verification Evidence
|
||||
|
||||
| Check | Command | Exit code | Verdict | Duration |
|
||||
|---|---|---:|---|---|
|
||||
| Focused follow-up workspace test | `CI=true npm --prefix job-tracker-ui test -- --watch=false --runTestsByPath src/job-details-followup-drafts.test.tsx` | 0 | PASS | 00:00:02 |
|
||||
| Production frontend build | `CI=true npm --prefix job-tracker-ui run build` | 0 | PASS | 00:00:24 |
|
||||
|
||||
## Runtime note
|
||||
|
||||
- Earlier local browser UAT was blocked by an unrelated port-3000 nginx bundle and a CRA dev-server crash under Node 25. The production build and focused follow-up UI test both passed during closeout, so the durable verification path for this task is the filtered React test plus the build output rather than the old dev-server attempt.
|
||||
|
||||
Reference in New Issue
Block a user