Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

edit: a restored draft forgets the parked end date, so #814's loss returns across that boundary

Open
#819 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. Drop a résumé, "+ Add role" (or edit a role the parser found no dates on), type 2022 into End. The rule re-anchors it: the card reads Start 2022, End empty. Correct, and #672's whole point.
  2. Leave the page; come back; accept the draft prompt.
  3. Type the real start date 2019 into 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_date with no end_date cannot 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. pendingDraft is the same EditSnapshot object, so this means a snapshot key that applyOverrides ignores and jd-fit-handoff strips, 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

  1. 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.
  2. EditSnapshot as consumed by src/lib/jd-fit-handoff.ts gains no field carrying edit-sequence provenance, or the PR states why that is safe.
  3. A test drives the real hook across snapshot → replay → date commit, in the shape of src/hooks/useEditableParse.date-slot-sequence.repro.test.tsx, and goes red with the fix removed.
  4. resetAll still 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from offlinecv/OfflineCV

All issues in offlinecv/OfflineCV

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.