edit: a restored draft forgets the parked end date, so #814's loss returns across that boundary
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start with the parking and replay behavior in src/hooks/useEditableParse.ts, then trace resumeDraft in src/hooks/useAnalyzedResume.ts:368 and the EditSnapshot handoff in src/lib/jd-fit-handoff.ts. Use src/hooks/useEditableParse.date-slot-sequence.repro.test.tsx to reproduce snapshot → replay → date commit. Done means the relocated date is preserved or visibly hinted after restore, cross-lane payload provenance remains excluded or justified, and resetAll clears the parking.
Written by the indexing model from the issue text.
Description
What happens
#814's fix parks the date value the one-anchor rule relocates out of an experience role's End cell (relocatedEndsRef in src/hooks/useEditableParse.ts) and hands it back to end_date when a real start date displaces it. The parking is session state and replay clears it — deliberately, since a snapshot restores a whole edit state and the parked value is provenance about commits that state never made.
replay is also the draft-restore path: resumeDraft (src/hooks/useAnalyzedResume.ts:368) calls edit.replay(state.pendingDraft) when the user accepts the "resume your draft" prompt. So the parking does not survive that boundary:
- Drop a résumé, "+ Add role" (or edit a role the parser found no dates on), type
2022into End. The rule re-anchors it: the card readsStart 2022, End empty. Correct, and #672's whole point. - Leave the page; come back; accept the draft prompt.
- Type the real start date
2019into Start.
Expected: {start_date: "2019", end_date: "2022"} — what happens inside one session since #814.
Actual: {start_date: "2019"}. The 2022 is gone, which is the pre-#814 behaviour.
Why it is filed separately
PR #682 closes #814, so the tracker for this class shuts when it merges; a docblock is not a tracker. The behaviour is not a regression against main — before #672 there was no relocation to remember — and inside a single editing session #814 is fully fixed, which is why this was Secondary rather than Blocking on that review.
The reason the parking is a ref and not a key on ExperienceFieldOverrides still holds and should not be reversed casually: that type is persisted into EditSnapshot, which crosses to /jobs/ through src/lib/jd-fit-handoff.ts, and #672 already widened that payload once with is_current. Session-local editing provenance has no business in a persisted cross-lane payload.
Sketch of a fix
Whatever ships must keep the parking out of the cross-lane payload, or justify putting it in.
- Re-derive on replay instead of clearing. A snapshot's override entry that holds a
start_datewith noend_datecannot say how the value got there — that is exactly the aliasing #814's review established — so nothing can be re-derived from the map alone. Ruled out unless the draft carries the provenance. - Carry the parking in the draft only.
pendingDraftis the sameEditSnapshotobject, so this means a snapshot key thatapplyOverridesignores andjd-fit-handoffstrips, or a second parallel field on the draft envelope. The second is narrower. - Accept the gap and signal it. The End cell could show the relocated value as a hint after a draft restore, so the user does not type over it blind. Cheapest, and it addresses the harm (a silently overwritten value) rather than the mechanism.
Acceptance criteria
- The three-step sequence above ends with both dates on the role, or the relocated value is visible in the UI before the Start commit that would displace it.
EditSnapshotas consumed bysrc/lib/jd-fit-handoff.tsgains no field carrying edit-sequence provenance, or the PR states why that is safe.- A test drives the real hook across
snapshot→replay→ date commit, in the shape ofsrc/hooks/useEditableParse.date-slot-sequence.repro.test.tsx, and goes red with the fix removed. resetAllstill clears the parking — index-keyed parking must not survive into a different résumé.
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 4
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 66
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
-
gaal improvement ux:job-search
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
All issues in offlinecv/OfflineCV
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
StabilityNexus/Fate-EVM-Frontend#153 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
code-yeongyu/oh-my-openagent#9039 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Tencent/teamai-cli#862 ·
Maintainers usually reply within 1 day
-
bug good first issue hacktoberfest redis
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
libredb/libredb-studio#1164 ·
Maintainers usually reply within 1 day
-
flake
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day