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
then filters in JS by normalize(name) === normalize(partName) && normalize(section) === normalize(partSection).
normalize (app/features/events/server/cadence-shared.server.ts:21) does stripDiacritics(input).trim() — not .toLowerCase() (the docstring above it claims "tolerant of case" but the implementation isn't).
Candidate root causes
The DB query above can silently return an empty history in four ways:
templateId mismatch. History only crosses the same Event.templateId. If the template was recreated / re-imported / re-parented (the Programme → Event/Template rename feat(events): rename Programme* models to Event*/Template* #267 landed 5 days before this ticket), historical events may point at a different templateId and get dropped.
Slot mismatch. The user was assignee (speaker) in the past but the sheet is currently on the assistant (reader) slot — or vice versa. The query only checks the same slot.
Case drift on name / section.normalize doesn't lowercase, so "Lecture de la Bible" and "lecture de la bible" count as different parts. Similarly for section rename.
Freeform short-circuit.event.templateId == null returns hasHistory: false unconditionally (list-user-cadence.server.ts:40). Only relevant if the current event is freeform.
Next step
Need to know from the reporter, for the specific reproduction:
Was the current event a recurring template or freeform?
Same slot as the historical assignments (speaker vs. reader)?
Exact part name + section as it appeared on the past events vs. now (case-sensitive)?
Did the template get renamed / re-imported recently?
Answers narrow the fix to one of the four hypotheses above. Most likely — given the recent rename and the missing .toLowerCase() — the fix is either backfilling templateId for historical events, or making normalize case-insensitive as its docstring already claims.
Reproduction
CadencePanelshows the "Première fois pour cette partie" (publisher_info_first_time) message instead of the past assignment dots and dates.Where the logic lives
Message rendered by
app/features/events/ui/CadencePanel.tsxwhencomputeCadenceWarningsreturnsfirstTime = emptyWindow && !hasHistory(app/features/events/ui/compute-cadence-warnings.ts:29).hasHistoryis produced byapp/features/events/server/list-user-cadence.server.ts:106-108. It queries:then filters in JS by
normalize(name) === normalize(partName) && normalize(section) === normalize(partSection).normalize(app/features/events/server/cadence-shared.server.ts:21) doesstripDiacritics(input).trim()— not.toLowerCase()(the docstring above it claims "tolerant of case" but the implementation isn't).Candidate root causes
The DB query above can silently return an empty history in four ways:
templateIdmismatch. History only crosses the sameEvent.templateId. If the template was recreated / re-imported / re-parented (theProgramme → Event/Templaterename feat(events): rename Programme* models to Event*/Template* #267 landed 5 days before this ticket), historical events may point at a differenttemplateIdand get dropped.assignee(speaker) in the past but the sheet is currently on theassistant(reader) slot — or vice versa. The query only checks the same slot.name/section.normalizedoesn't lowercase, so"Lecture de la Bible"and"lecture de la bible"count as different parts. Similarly for section rename.event.templateId == nullreturnshasHistory: falseunconditionally (list-user-cadence.server.ts:40). Only relevant if the current event is freeform.Next step
Need to know from the reporter, for the specific reproduction:
Answers narrow the fix to one of the four hypotheses above. Most likely — given the recent rename and the missing
.toLowerCase()— the fix is either backfillingtemplateIdfor historical events, or makingnormalizecase-insensitive as its docstring already claims.