You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a section rewrite's generation comes back completely empty, applyNumberPreservation (src/lib/webllm/post-process.ts) deliberately does NOT revert it — the empty-generation exemption. That outcome has reverted: false and numbersPreserved: false.
numberDriftStatus (src/components/features/NumberPreservationWarning.tsx, consolidated from three duplicate copies in #874's revision round) currently collapses this into the same "drift" status as an ordinary partial content change:
So CompletedList (ResumeRewrite.tsx) badges an emptied section "metric drift" — the same label as a section where the model actually altered a number — even though the section's content is gone entirely, not altered. This mislabeling pre-dates #778/#874 (confirmed present on origin/main before either PR); it was left in place rather than expanded to a new status during #874's consolidation to keep that fix scoped to deduplication, not new UI copy.
What a real fix looks like
Add a fourth NumberDriftStatus variant (e.g. "emptied") for !reverted && !numbersPreserved && bullets.length === 0 (or the summary-text equivalent), and give each of the three call sites its own copy for it:
CompletedList (ResumeRewrite.tsx) — a distinct badge, not "metric drift"
ProposedPanel (ResumeRewriteProposed.tsx) — already splits reverted-vs-emptied drift into two NumberPreservationWarnings since fix(rewrite): reject/revert rewrites that drop or invent numbers (#778) #874's revision round; the emptied one currently reuses the generic "AI altered a metric" copy, which has the same mislabeling
SectionRewrite.tsx's per-role panel
This needs its own copy decisions (three surfaces, one new state) rather than folding into an unrelated fix.
Problem
When a section rewrite's generation comes back completely empty,
applyNumberPreservation(src/lib/webllm/post-process.ts) deliberately does NOT revert it — the empty-generation exemption. That outcome hasreverted: falseandnumbersPreserved: false.numberDriftStatus(src/components/features/NumberPreservationWarning.tsx, consolidated from three duplicate copies in #874's revision round) currently collapses this into the same"drift"status as an ordinary partial content change:So
CompletedList(ResumeRewrite.tsx) badges an emptied section "metric drift" — the same label as a section where the model actually altered a number — even though the section's content is gone entirely, not altered. This mislabeling pre-dates #778/#874 (confirmed present onorigin/mainbefore either PR); it was left in place rather than expanded to a new status during #874's consolidation to keep that fix scoped to deduplication, not new UI copy.What a real fix looks like
Add a fourth
NumberDriftStatusvariant (e.g."emptied") for!reverted && !numbersPreserved && bullets.length === 0(or the summary-text equivalent), and give each of the three call sites its own copy for it:CompletedList(ResumeRewrite.tsx) — a distinct badge, not "metric drift"ProposedPanel(ResumeRewriteProposed.tsx) — already splits reverted-vs-emptied drift into twoNumberPreservationWarnings since fix(rewrite): reject/revert rewrites that drop or invent numbers (#778) #874's revision round; the emptied one currently reuses the generic "AI altered a metric" copy, which has the same mislabelingSectionRewrite.tsx's per-role panelThis needs its own copy decisions (three surfaces, one new state) rather than folding into an unrelated fix.
Pointers
src/components/features/NumberPreservationWarning.tsx—numberDriftStatus,NumberPreservationWarningsrc/components/features/ResumeRewrite.tsx—CompletedListsrc/components/features/ResumeRewriteProposed.tsx—ProposedPanel'semptiedDriftaggregatesrc/lib/webllm/post-process.ts—applyNumberPreservation's empty-generation exemption