Refresh dashboard, adopt MUI X, and improve AI follow-ups

This commit is contained in:
cesnimda
2026-03-23 21:23:15 +01:00
parent 7293582376
commit 66d924e880
9 changed files with 684 additions and 251 deletions
@@ -1358,10 +1358,10 @@ Candidate CV/profile:
70);
var recruiterMessageDraft = await _summarizer.SummarizeSectionAsync(
"Draft a concise recruiter message for this candidate and job. Keep it warm, direct, and under 120 words.",
"Draft a concise recruiter message for this candidate and job. Mention the exact role and one or two concrete overlaps from the posting or candidate background. Keep it warm, direct, and under 120 words.",
jobContext,
120,
45);
130,
50);
var guidance = new CandidateFitChannelGuidanceDto(
Cv: mention.Take(4).ToList(),
@@ -1541,10 +1541,10 @@ Candidate master CV:
70);
var recruiterMessageDraft = await _summarizer.SummarizeSectionAsync(
"Write a short recruiter intro message for this candidate and role. Keep it warm, direct, and concise.",
"Write a short recruiter intro message for this candidate and role. Make it feel specific to the posting by mentioning the exact role, company, and one or two concrete overlaps from the candidate profile or job context. Keep it warm, direct, and concise.",
packageContext,
120,
45);
140,
55);
var keyPoints = SkillTagger.Detect(jobText)
.Distinct(StringComparer.OrdinalIgnoreCase)
@@ -1781,16 +1781,47 @@ Candidate master CV:
var subject = $"Following up on {job.JobTitle} application";
var reference = lastMessage?.Subject ?? job.JobTitle;
var summary = job.ShortSummary;
var body = string.Join("\n\n", new[]
var appliedDate = job.DateApplied.ToString("MMMM d, yyyy");
var tagHighlights = SplitTags(job.Tags).Take(4).ToList();
var companyName = job.Company?.Name ?? "your team";
var aiContext = $@"Candidate name: {signerName}
Role: {job.JobTitle}
Company: {companyName}
Applied on: {appliedDate}
Reason for follow-up: {reason}
Last message subject: {lastMessage?.Subject ?? "None"}
Last message date: {(lastMessage is not null ? lastMessage.Date.ToString("MMMM d, yyyy") : "None")}
Relevant skills/tags: {(tagHighlights.Count > 0 ? string.Join(", ", tagHighlights) : "None provided")}
Short fit summary: {summary ?? "None provided"}
Job description:
{job.TranslatedDescription ?? job.Description ?? "No job description available."}";
var aiBody = await _summarizer.SummarizeSectionAsync(
"Write a concise, professional follow-up email in first person. Mention that the candidate applied on the provided date, reference the exact role and company, mention one or two concrete details from the role or fit summary, and close with polite interest in next steps. Keep it specific, warm, and under 140 words. Return only the email body.",
aiContext,
180,
70);
var fallbackBody = string.Join("\n\n", new[]
{
greeting,
$"I wanted to follow up on my application for the {job.JobTitle} role. I'm still very interested in the opportunity and would love to hear if there are any updates on next steps.",
!string.IsNullOrWhiteSpace(summary) ? $"Quick reminder of fit: {summary}" : null,
$"Context: {reason}",
$"If helpful, I can also provide any additional information related to {reference}.",
$"I wanted to follow up on my application for the {job.JobTitle} role that I submitted on {appliedDate}. I'm still very interested in the opportunity at {companyName}.",
!string.IsNullOrWhiteSpace(summary)
? $"From the posting and my background, the strongest overlap seems to be {summary.Trim().TrimEnd('.')}."
: tagHighlights.Count > 0
? $"The role's focus on {string.Join(", ", tagHighlights.Take(2))} especially stood out to me, and it lines up well with my experience."
: null,
$"I would be glad to share any additional details that would be helpful as you move through next steps for {reference}.",
$"Thanks for your time,\n{signerName}"
}.Where(x => !string.IsNullOrWhiteSpace(x)));
var body = !string.IsNullOrWhiteSpace(aiBody) ? aiBody.Trim() : fallbackBody;
if (!body.StartsWith("Hi", StringComparison.OrdinalIgnoreCase))
{
body = string.Join("\n\n", new[] { greeting, body, $"Thanks,\n{signerName}" }.Where(x => !string.IsNullOrWhiteSpace(x)));
}
return Ok(new FollowUpDraftDto(subject, body, reason, DateTime.Today));
}