Fix #763: preserve new lines in Additional Info textareas#766
Fix #763: preserve new lines in Additional Info textareas#766moutazsalah wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
4 issues found across 6 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/frontend/components/resume/resume-modern.tsx">
<violation number="1" location="apps/frontend/components/resume/resume-modern.tsx:399">
P2: Blank-only Additional Info entries can still render an empty section/label-only row because visibility checks use raw array lengths while the new filtering only affects the displayed text.</violation>
</file>
<file name="apps/frontend/components/builder/highlighted-resume-view.tsx">
<violation number="1" location="apps/frontend/components/builder/highlighted-resume-view.tsx:138">
P2: Section visibility checks raw array length, but rendering filters blanks, causing empty subsection headings/containers when all entries are whitespace.</violation>
</file>
<file name="apps/frontend/components/resume/resume-single-column.tsx">
<violation number="1" location="apps/frontend/components/resume/resume-single-column.tsx:397">
P2: Additional Info visibility still keys off raw array length, so blank-only entries render an empty section/rows after the new blank-item filter.</violation>
</file>
<file name="apps/frontend/components/resume/resume-modern-two-column.tsx">
<violation number="1" location="apps/frontend/components/resume/resume-modern-two-column.tsx:309">
P2: Filtering blanks inside the section body without updating the outer `length > 0` guard can render empty section headings/containers when all entries are blank.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| @@ -396,25 +396,33 @@ const AdditionalSection: React.FC<{ | |||
| {technicalSkills.length > 0 && ( | |||
There was a problem hiding this comment.
P2: Blank-only Additional Info entries can still render an empty section/label-only row because visibility checks use raw array lengths while the new filtering only affects the displayed text.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/frontend/components/resume/resume-modern.tsx, line 399:
<comment>Blank-only Additional Info entries can still render an empty section/label-only row because visibility checks use raw array lengths while the new filtering only affects the displayed text.</comment>
<file context>
@@ -396,25 +396,33 @@ const AdditionalSection: React.FC<{
<div className="flex">
<span className="font-bold w-32 shrink-0">{mergedLabels.technicalSkills}</span>
- <span>{technicalSkills.join(', ')}</span>
+ <span>{technicalSkills
+ .filter((skill) => skill.trim() !== '')
+ .join(', ')}</span>
</file context>
| <div className="flex flex-wrap gap-1"> | ||
| {resumeData.additional.technicalSkills.map((skill, i) => ( | ||
| {resumeData.additional.technicalSkills | ||
| .filter((skill) => skill.trim() !== '') |
There was a problem hiding this comment.
P2: Section visibility checks raw array length, but rendering filters blanks, causing empty subsection headings/containers when all entries are whitespace.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/frontend/components/builder/highlighted-resume-view.tsx, line 138:
<comment>Section visibility checks raw array length, but rendering filters blanks, causing empty subsection headings/containers when all entries are whitespace.</comment>
<file context>
@@ -134,7 +134,9 @@ export function HighlightedResumeView({ resumeData, keywords }: HighlightedResum
<div className="flex flex-wrap gap-1">
- {resumeData.additional.technicalSkills.map((skill, i) => (
+ {resumeData.additional.technicalSkills
+ .filter((skill) => skill.trim() !== '')
+ .map((skill, i) => (
<SkillTag key={i} text={skill} keywords={keywords} />
</file context>
| <div className="flex"> | ||
| <span className="font-bold w-32 shrink-0">{mergedLabels.technicalSkills}</span> | ||
| <span>{technicalSkills.join(', ')}</span> | ||
| <span>{technicalSkills |
There was a problem hiding this comment.
P2: Additional Info visibility still keys off raw array length, so blank-only entries render an empty section/rows after the new blank-item filter.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/frontend/components/resume/resume-single-column.tsx, line 397:
<comment>Additional Info visibility still keys off raw array length, so blank-only entries render an empty section/rows after the new blank-item filter.</comment>
<file context>
@@ -394,25 +394,33 @@ const AdditionalSection: React.FC<{
<div className="flex">
<span className="font-bold w-32 shrink-0">{mergedLabels.technicalSkills}</span>
- <span>{technicalSkills.join(', ')}</span>
+ <span>{technicalSkills
+ .filter((skill) => skill.trim() !== '')
+ .join(', ')}</span>
</file context>
| @@ -306,7 +306,9 @@ export const ResumeModernTwoColumn: React.FC<ResumeModernTwoColumnProps> = ({ | |||
| <div className={baseStyles['resume-section']}> | |||
There was a problem hiding this comment.
P2: Filtering blanks inside the section body without updating the outer length > 0 guard can render empty section headings/containers when all entries are blank.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/frontend/components/resume/resume-modern-two-column.tsx, line 309:
<comment>Filtering blanks inside the section body without updating the outer `length > 0` guard can render empty section headings/containers when all entries are blank.</comment>
<file context>
@@ -306,7 +306,9 @@ export const ResumeModernTwoColumn: React.FC<ResumeModernTwoColumnProps> = ({
<h3 className={styles.sectionTitleAccent}>{headingFallbacks.certifications}</h3>
<ul className={`ml-4 ${baseStyles['resume-list']} ${baseStyles['resume-text-xs']}`}>
- {additional.certificationsTraining.map((cert, index) => (
+ {additional.certificationsTraining
+ .filter((cert) => cert.trim() !== '')
+ .map((cert, index) => (
</file context>
Pull Request Title
Fix #763: preserve new lines in Additional Info textareas
Related Issue
#763
Description
This pull request fixes an issue where pressing the Enter key inside Additional Info textareas did not create new lines correctly.
The problem occurred because empty strings were filtered during input handling, causing blank lines to be removed immediately after pressing Enter.
This update preserves empty lines during typing and moves filtering logic to the renderer level.
Type
Proposed Changes
handleArrayChangeScreenshots / Code Snippets (if applicable)
No screenshots included.
How to Test
Checklist
Additional Information
This fix improves textarea usability while keeping rendered data clean by filtering empty values only during display.
Summary by cubic
Preserves new lines in Additional Info textareas. Moves empty-string filtering to render-time so pressing Enter keeps blank lines while typing.
handleArrayChangeto keep raw newline entries.Written for commit a2e51bd. Summary will update on new commits.