chore: auto-commit after execute-task

GSD-Unit: M001/S06/T01
This commit is contained in:
2026-03-27 08:54:34 +01:00
parent 7a44ebbd77
commit bdc47dde7f
31 changed files with 2017 additions and 966 deletions
@@ -1,51 +1,22 @@
---
title: T02 summary
status: done
files:
- job-tracker-ui/src/components/JobDetailsDialog.tsx
- job-tracker-ui/src/job-details-generated-drafts.test.tsx
- JobTrackerApi/Controllers/JobApplicationsController.cs
- JobTrackerApi.Tests/JobApplicationsApplicationPackageTests.cs
observability_surfaces:
- Tailored CV tab in job-tracker-ui/src/components/JobDetailsDialog.tsx
- PUT /api/jobapplications/{id}/tailored-cv
- PUT /api/jobapplications/{id}/application-drafts
- job-tracker-ui/src/job-details-generated-drafts.test.tsx
verification:
- CI=true npm --prefix job-tracker-ui test -- --watch=false --runTestsByPath src/job-details-generated-drafts.test.tsx
- $HOME/.dotnet/dotnet build JobTrackerApi/JobTrackerApi.csproj
- $HOME/.dotnet/dotnet test JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --filter JobApplicationsApplicationPackageTests
id: T02
parent: S02
milestone: M001
provides: []
requires: []
affects: []
key_files: []
key_decisions: []
patterns_established: []
drill_down_paths: []
observability_surfaces: []
duration: ""
verification_result: ""
completed_at: 2026-03-27T07:30:18.613Z
blocker_discovered: false
---
Turned the Tailored CV tab into a real package workspace instead of a one-shot draft preview.
# T02: Make the job workspace save and present the application package as real working material
## What changed
- `job-tracker-ui/src/components/JobDetailsDialog.tsx`
- added package workspace state for cover letter, application answer, and recruiter message alongside the tailored CV
- initialized that workspace from saved job material so reopening the dialog shows the last trusted copy, not just blank/generated state
- generation now replaces the editable working copy for all package artifacts, not only the tailored CV
- added package-level save flow that writes the tailored CV plus draft artifacts back to the job together
- added explicit saved/generated/unsaved status chips so the user can tell what is persisted versus still in the working draft
- added reset-to-saved behavior so the workspace can recover from unwanted edits
- normalized application-answer persistence into a replaceable notes block instead of endlessly appending
- `job-tracker-ui/src/job-details-generated-drafts.test.tsx`
- expanded the focused dialog test to prove saved material loads into the workspace, generation replaces the working copy, edits can be saved, and the save payload reflects the coherent package state
- backend support tightened during T02
- `JobTrackerApi/Controllers/JobApplicationsController.cs`: `SaveApplicationDrafts` now replaces `Notes` when notes are provided, which makes the saved application-answer loop trustworthy instead of append-only
- `JobTrackerApi.Tests/JobApplicationsApplicationPackageTests.cs`: added focused proof that notes replacement no longer appends indefinitely
## Diagnostics
- Open the Tailored CV tab and inspect the four package editors plus status chips; `Saved to job`, `Generated only`, and `Unsaved edits` are the fastest UI-level signals for whether persistence is working.
- Inspect the payloads to `PUT /api/jobapplications/{id}/tailored-cv` and `PUT /api/jobapplications/{id}/application-drafts` when save behavior looks wrong; the package loop depends on both requests succeeding with aligned content.
- Check `job-tracker-ui/src/job-details-generated-drafts.test.tsx` first for regressions in regenerate/edit/save/reset behavior; it is the narrowest proof of the workspace contract.
- If the application answer keeps duplicating, inspect the marker-delimited block inside `JobApplication.Notes`; the persistence contract now replaces the `<<<APPLICATION_ANSWER_DRAFT>>> ... <<<END_APPLICATION_ANSWER_DRAFT>>>` block instead of appending.
## Verification Evidence
| Command | Exit code | Verdict | Duration |
|---|---:|---|---|
| `CI=true npm --prefix job-tracker-ui test -- --watch=false --runTestsByPath src/job-details-generated-drafts.test.tsx` | 0 | PASS | 8.3s |
| `$HOME/.dotnet/dotnet build JobTrackerApi/JobTrackerApi.csproj` | 0 | PASS | 4.8s |
| `$HOME/.dotnet/dotnet test JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --filter JobApplicationsApplicationPackageTests` | 0 | PASS | 8.4s |
## What Happened
No summary recorded.