fix(timeline): keep HISTORICAL events out of inline clustering
buildEventLookup keyed on `kind === 'EVENT' && eventId` with no type check, so a HISTORICAL curated event with ≥1 linked letter entered the lookup and rendered as a mint EventCluster card — silently downgrading from the full-width WorldBand that #779 REQ-009 mandates ("world-bands render exactly as before"). The lookup now excludes `type === 'HISTORICAL'`, so a world event always keeps its WorldBand and its letters stay loose chronological. Closes the spec gap pinned as REQ-014. Fixes review finding #2. Refs #850 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,18 @@ describe('eventClustering — buildEventLookup', () => {
|
||||
};
|
||||
expect(buildEventLookup(timeline).size).toBe(0);
|
||||
});
|
||||
|
||||
it('excludes a HISTORICAL event so its letters stay loose, keeping its WorldBand (REQ-014)', () => {
|
||||
const timeline: TimelineDTO = {
|
||||
years: [
|
||||
{ year: 1916, entries: [makeEvent({ eventId: EV_A, type: 'HISTORICAL', title: 'Somme' })] }
|
||||
],
|
||||
undated: []
|
||||
};
|
||||
const lookup = buildEventLookup(timeline);
|
||||
expect(lookup.has(EV_A)).toBe(false);
|
||||
expect(lookup.size).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('eventClustering — splitYearLetters', () => {
|
||||
|
||||
Reference in New Issue
Block a user