Skip to content

Commit b4627e0

Browse files
fix: show worlds in What's On for everyone, not just owners (#458)
1 parent c6aa47a commit b4627e0

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

src/components/whats-on/AllExperiences/AllExperiences.spec.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,17 @@ describe('AllExperiences', () => {
228228
expect(mockUseGetEventsQuery).toHaveBeenCalledWith(expect.objectContaining({ list: 'active', owner: undefined }), expect.any(Object))
229229
})
230230

231-
it('should exclude world events on the all tab so the spatial calendar only shows Genesis City', () => {
231+
it('should not filter by world on the all tab so Genesis City and Worlds events both appear', () => {
232232
render(<AllExperiences />)
233233

234-
expect(mockUseGetEventsQuery).toHaveBeenCalledWith(expect.objectContaining({ world: false }), expect.any(Object))
234+
const lastCall = mockUseGetEventsQuery.mock.calls.at(-1)?.[0] as { world?: boolean }
235+
expect(lastCall.world).toBeUndefined()
236+
})
237+
238+
it('should never pass world=false to the events query (regression: worlds were being silently dropped)', () => {
239+
render(<AllExperiences />)
240+
241+
expect(mockUseGetEventsQuery).not.toHaveBeenCalledWith(expect.objectContaining({ world: false }), expect.any(Object))
235242
})
236243
})
237244

src/components/whats-on/AllExperiences/AllExperiences.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ function useAllExperiencesData({ today, startOffset, columnCount, identity, list
5151
{
5252
list,
5353
order: 'asc',
54-
// NOTE: only filter out world events on the "All" tab (calendar/day-column view is
55-
// spatial and only makes sense for Genesis City). On the "My" tab the owner must
56-
// see ALL of their events, including those hosted in Worlds.
57-
world: ownerOnly ? undefined : false,
54+
// Include both Genesis City and Worlds events on BOTH tabs. Earlier this branch
55+
// filtered worlds out of the "All" tab because the day-column view was framed as
56+
// spatial (Genesis City coords). Product wants worlds visible everywhere now —
57+
// users were reporting "no veo mis hangouts en What's On" because their world
58+
// events were silently dropped.
59+
world: undefined,
5860
limit: 200,
5961
identity,
6062
owner: ownerOnly ? true : undefined

0 commit comments

Comments
 (0)