refactor(career): Phase 1 increment — user-facing terminology + component split
UI-only restructuring of the Career Profile surface. No change to
database models, CareerProfiles schema, CvVariants, extraction APIs, AI
services, CV rendering, or public CV.
Terminology -> user-facing (i18n strings):
- "Structured CV editor" -> "Career information"
- "CV structure overview" -> "Profile sections"
- "Summary bullets" -> "Professional summary"
- "Core skills" -> "Skills"
- "Analyze sections" -> "Read sections"
- "Original extraction" -> "Original import"
- hardcoded "Master career profile" -> "Career profile"
Help text de-jargoned; the Career information help now frames it as the
source the CV Builder consumes.
Component split (first step): extract ProfileCompleteness (completeness
meter + missing chips + version history) into src/views/career/. Display
only, props in, no state or API.
Save path untouched: api.put("/career/profile", { profile, cvText }). A
new test pins that exact call as the refactor invariant so the remaining
section extraction cannot silently change save behaviour. Existing
profile-page tests re-pointed to the new labels; every behavioural
assertion (save, parse, field values) kept.
Verified: tsc clean, production build clean, 136 frontend tests pass
(135 + 1 invariant). Sidebar fix from the previous task still passes.
Backend untouched.
The remaining Phase 1 work (per-section editor components, hiding the
template-driven builder and structure-overview blocks, actionable
per-section empty states) is staged in docs/career-workspace-ux-refactor.md
because it touches the live extraction test surface and is best verified
by driving the authenticated UI. This increment is a clean, non-regressing
checkpoint.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -76,11 +76,50 @@ all others are inactive. A child route never activates a parent nav item.
|
||||
- Tests: `sidebar-active-nav.test.ts` — asserts exactly one active item for `/career`,
|
||||
`/career/builder`, `/career/builder/{id}`, and that no item double-highlights.
|
||||
|
||||
### Phase 1 — Career Profile editor sections (frontend)
|
||||
Reorganise `CareerProfilePage` presentation into the eight named sections with user-facing labels;
|
||||
strip internal vocabulary from headings/help. No data-model or API change — the same
|
||||
`StructuredCvProfile` shape is read and saved. Ship behind the existing page; verify save/load of each
|
||||
section against the existing profile API.
|
||||
### Phase 1 — terminology + first component split (IN PROGRESS)
|
||||
|
||||
**Delivered 2026-07-20 (increment 1):**
|
||||
|
||||
*Terminology → user-facing* (`src/i18n/translations.ts`, no structural change):
|
||||
| Internal term (before) | User-facing (after) |
|
||||
|---|---|
|
||||
| "Structured CV editor" | "Career information" |
|
||||
| "CV structure overview" | "Profile sections" |
|
||||
| "Summary bullets" | "Professional summary" |
|
||||
| "Core skills" | "Skills" |
|
||||
| "Analyze sections" | "Read sections" |
|
||||
| "Original extraction" | "Original import" |
|
||||
| hardcoded "Master career profile" | "Career profile" |
|
||||
Help text de-jargoned; the "Career information" help now says *"The CV Builder uses this information
|
||||
to create documents."*
|
||||
|
||||
*Component extracted:* `src/views/career/ProfileCompleteness.tsx` — the completeness meter + missing
|
||||
chips + version-history accordion, pulled out of `CareerProfilePage`. Display-only, props in, no state
|
||||
or API — the first step of the split.
|
||||
|
||||
*No API / data / model change.* The save path is untouched:
|
||||
`api.put("/career/profile", { profile: structuredCv, cvText })`. A new test
|
||||
(`profile-page.test.tsx` → "saving the career profile PUTs … unchanged (Phase 1 refactor invariant)")
|
||||
pins exactly that call so the remaining extraction can't silently change it. Existing profile-page
|
||||
tests were re-pointed to the new labels; all behavioural assertions (save, parse, field values) kept.
|
||||
|
||||
*Verified:* tsc clean, production build clean, 136 frontend tests pass (was 135; +1 invariant test).
|
||||
Sidebar fix from the previous task still passes.
|
||||
|
||||
**Remaining in Phase 1 (staged, needs the app running to click-verify each section's save
|
||||
round-trip):**
|
||||
- Extract the editing sections into `PersonalInformationSection … LanguagesSection` components and a
|
||||
`CareerProfileHeader`, keeping `structuredCv` + `setStructuredCv` + the save handler in the parent
|
||||
(so behaviour stays identical). This is voluminous mechanical JSX movement through a 1376-line file.
|
||||
- Hide the **template-driven CV builder** (rewrite templates + PDF carousel) and the **structure
|
||||
overview** parse block from the user surface. Both are tested against live extraction behaviour, so
|
||||
each removal must move its test coverage, not delete it — done incrementally with verification.
|
||||
- Per-section actionable empty states ("No work experience added yet" → [Add experience]); the Add
|
||||
affordances already exist, so this is copy + wiring.
|
||||
|
||||
Rationale for staging: these touch the live CV/extraction test surface and are best verified by
|
||||
driving the authenticated UI. Increment 1 is a clean, non-regressing checkpoint per the "reviewed and
|
||||
verified before Phase 2" instruction.
|
||||
|
||||
### Phase 2 — Import CV review screen
|
||||
Add a post-upload "New information found" review (Experience / Skills / Languages / Education) with
|
||||
|
||||
Reference in New Issue
Block a user