fix(career): preserve reviewed profile values
CI and Deploy / test (pull_request) Successful in 4m39s
CI and Deploy / deploy (pull_request) Has been skipped

Keep extraction heuristics out of manual save, version, and import paths so reviewed locations, URLs, dates, and languages round-trip unchanged.
This commit is contained in:
cesnimda
2026-08-15 16:56:31 +02:00
parent a6cffe0473
commit f0b9b222ff
15 changed files with 277 additions and 37 deletions
@@ -103,7 +103,7 @@ namespace JobTrackerApi.Controllers
private async Task<TailoredCvDraft> UpsertGeneratedTailoredCvDraftAsync(JobApplication job, ApplicationUser user, string? mode, CancellationToken cancellationToken)
{
var structured = StructuredCvProfileJson.Deserialize(user.ProfileCvStructureJson);
var structured = StructuredCvProfileJson.DeserializePersisted(user.ProfileCvStructureJson);
var jobText = string.Join("\n\n", new[] { job.JobTitle, job.Company?.Name, job.Description, job.TranslatedDescription, job.Notes, job.ShortSummary, job.JobUrl }
.Where(value => !string.IsNullOrWhiteSpace(value)));
var structuredCvContext = BuildStructuredCvContext(user);
@@ -1312,7 +1312,7 @@ Canonical profile:
// Builds CV text grouped by section so match coverage can show *where* the evidence sits.
private static Dictionary<string, string> BuildCvSections(ApplicationUser? user)
{
var structured = StructuredCvProfileJson.Deserialize(user?.ProfileCvStructureJson);
var structured = StructuredCvProfileJson.DeserializePersisted(user?.ProfileCvStructureJson);
var sections = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
void Add(string name, IEnumerable<string?> values)
@@ -1752,7 +1752,7 @@ Candidate CV/profile:
return BadRequest("Add your profile CV text on the Profile page before generating a tailored CV draft.");
}
var structured = StructuredCvProfileJson.Deserialize(user.ProfileCvStructureJson);
var structured = StructuredCvProfileJson.DeserializePersisted(user.ProfileCvStructureJson);
if (structured.Summary.Count == 0 && structured.Jobs.Count == 0 && structured.Skills.Count == 0)
{
return BadRequest("Build and review your canonical structured CV on the Profile page before generating a tailored draft.");