diff --git a/frontend/src/components/ui/ResumePreview.tsx b/frontend/src/components/ui/ResumePreview.tsx index 827627f..180f33e 100644 --- a/frontend/src/components/ui/ResumePreview.tsx +++ b/frontend/src/components/ui/ResumePreview.tsx @@ -254,7 +254,8 @@ const generateResumeStyles = (): Record => { } as SxProps, contentStyle: { fontFamily: '"Arial", sans-serif', - lineHeight: 1.4, + lineHeight: 1.2, + fontSize: '0.875rem', color: '#2c3e50', } as SxProps, markdownStyle: { @@ -284,6 +285,9 @@ const generateResumeStyles = (): Record => { marginBottom: 0.75, fontSize: '0.75rem', }, + '& div': { + fontSize: '0.75rem', + }, '& ul': { paddingLeft: 2, }, diff --git a/frontend/src/pages/CandidateChatPage.tsx b/frontend/src/pages/CandidateChatPage.tsx index bf0ec4d..f9e41cf 100644 --- a/frontend/src/pages/CandidateChatPage.tsx +++ b/frontend/src/pages/CandidateChatPage.tsx @@ -256,12 +256,14 @@ const CandidateChatPage = forwardRef return ; } - const candidatePossessive = `${selectedCandidate.firstName}'${ - selectedCandidate.firstName.slice(-1) !== 's' ? 's' : '' - }`; + const possessive = (name: string): string => { + return name.endsWith('s') ? `${name}'` : `${name}'s`; + }; const defaultQuestions: string[] = [ - `How well does ${candidatePossessive} resume align with the job description?`, + `How well does ${possessive( + selectedCandidate.firstName + )} resume align with the job description?`, `Should ${selectedCandidate.firstName} be hired for the ${resume?.job?.title} position?`, ]; @@ -271,18 +273,25 @@ const CandidateChatPage = forwardRef type: 'text', status: 'done', timestamp: new Date(), - content: - `Welcome to the Backstory Chat about ${selectedCandidate.fullName}` + - (resume ? ` and the ${resume.job?.title} position at ${resume.job?.company}` : '') + - `. Enter any questions you have about ${candidatePossessive} ${ - resume ? 'resume' : 'work history' - } or skills, or select from the available questions.` + - (isMobile - ? `\n\nYou can also click on the "Resume" tab to ${candidatePossessive} resume for this position.` - : ''), + content: `Welcome to the Backstory Chat about ${selectedCandidate.fullName}.`, metadata: emptyMetadata, }; + if (resume) { + welcomeMessage.content = + `Welcome to Backstory Chat, analyzing ${possessive( + selectedCandidate.fullName + )} work experience ` + `against the ${resume.job?.company} ${resume.job?.title} position.`; + } + + welcomeMessage.content += `\n\nSelect from the suggested questions or enter your own to learn more about ${possessive( + selectedCandidate.firstName + )} skills.`; + + if (isMobile) { + welcomeMessage.content += `\n\nClick the "Résumé" tab to read the full document.`; + } + const handleSubmitQuestion = (question: CandidateQuestion): void => { sendMessage(question.question); }; @@ -331,7 +340,7 @@ const CandidateChatPage = forwardRef width: '100%', minHeight: 0 /* Prevent flex overflow */, maxHeight: isMobile - ? 'calc(100% - 144px)' + ? '100%' /* 'calc(100% - 144px)'*/ : '100%' /* Adjust for header/footer on mobile */, '& > *:not(.Scrollable)': { flexShrink: 0 /* Prevent shrinking */,