[refactor] Split the four section renderers out of ReconstructedResume.tsx (1489 LOC)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start with src/components/features/ReconstructedResume.tsx and compare its section renderers with ReconstructedRole.tsx and ReconstructedEducationSkills.tsx. Extract ExperienceSection, ProjectsSection, and AchievementsSection into sibling modules, preserving their existing props and behavior; update CLAUDE.md's LOC figures. Run the full suite, corpus.test.ts, corpus-roundtrip.test.ts, and npm run verify, and confirm fallow no longer reports the extracted functions.
Written by the indexing model from the issue text.
Description
Problem
src/components/features/ReconstructedResume.tsx is 1489 lines — 7× the ~200 LOC guidance in CLAUDE.md, and the single largest feature component in the repo.
CLAUDE.md names it as known debt:
⚠️ Known debt — do not imitate:
ReconstructedResume.tsx(1489),SectionRewrite.tsx(607),ModelSelector.tsx(556),ReconstructedRole.tsx(490) all violate this. If you are editing one, prefer extracting your change into a new sibling over growing the file further.
fallow reports three functions in this one file over the guidance:
| Function | LOC |
|---|---|
ReconstructedResume |
370 |
ExperienceSection |
320 |
ProjectsSection |
143 |
with AchievementsSection alongside them. Four peer section renderers are co-located in one module, and the outer component threads props to all of them.
Why now, and why not in #858
#858 grew this file from 1356 → 1489 (+133) while adding parsed-entry deletion. It did extract a sibling (src/lib/edit/entry-remove.ts), which is the right instinct — the extraction just is not where the mass is.
Splitting the sections inside #858 was explicitly declined: that diff is already 1846 insertions, and moving four section renderers would have buried the index-remap change — the part that actually needed careful review. Filed separately instead, per the review thread on https://github.com/offlinecv/OfflineCV/pull/858.
This is a refactor: no behaviour change, no user-visible difference.
Reuse analysis
Capability: render one section of the reconstructed résumé.
Existing surfaces found:
ReconstructedRole.tsx(490 LOC) andReconstructedEducationSkills.tsx— sections that already live in their own modules. The split target is the shape these two already have; this issue makes the remaining sections match their siblings.src/lib/edit/entry-remove.ts— the shared delete definition all sections route through, already extracted by #858.
Decision: extend the existing one-module-per-section convention. No new abstraction, no new design-system piece, no new panel — this moves code that already exists into the file layout its two siblings already use.
Implementation sketch
Extract each section into its own module under src/components/features/, mirroring ReconstructedRole.tsx:
ExperienceSection(320 LOC) — the largest win, and the one whose extraction most clarifies the parent.ProjectsSection(143 LOC).AchievementsSection.
Each takes the props it already receives today; the parent keeps the shared state and the buildEntryGroups call. Do them as separate commits (or separate PRs) so each diff is readable as a pure move — a move plus an edit in one diff is exactly what makes this kind of refactor expensive to review.
Update the CLAUDE.md "Known debt" line with the resulting LOC when done.
Acceptance criteria
-
ExperienceSection,ProjectsSectionandAchievementsSectioneach live in their own module. -
ReconstructedResume.tsxis materially under its current 1489 LOC, and theReconstructedResumefunction is under the ~200 LOC guidance. - No behaviour change — the full test suite passes without any test being modified to accommodate the move. A test that needs editing is a signal the move was not pure.
- Round-trip invariants hold (
corpus.test.ts,corpus-roundtrip.test.ts). - Every extracted module carries the SPDX header and a docblock naming why it exists, per the house style.
-
fallowno longer reports these three functions over the LOC guidance. -
CLAUDE.md's "Known debt" LOC figures updated to the post-split reality. -
npm run verifygreen.
Not in scope
SectionRewrite.tsx(607),ModelSelector.tsx(556),ReconstructedRole.tsx(490) — same debt class, separate issues.- Any change to what the sections render or how the edit model works.
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 4
- Avg merge
- 1d 24m
- Merged PRs (30d)
- 71
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from offlinecv/OfflineCV
-
chore gaal
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Download PDF: preview the exact exported PDF, all pages, before saving itPossibly taken @s-annam claimed this today. Openfeature gaal ready-for-agent ux:edit-export
offlinecv/OfflineCV#1077 · 1 assignee ·
Maintainers usually reply within 1 day
-
chore gaal refactor
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
All issues in offlinecv/OfflineCV
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rohitg00/agentmemory#1428 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
boxlite-ai/boxlite#1729 ·
Maintainers usually reply within 1 day
-
detectors enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
SM260845/readme-gen#1 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
angular/angularfire#3774 ·
Maintainers usually reply within 2 days