decentraland / decentraland/unity-explorer
[QA] Places | Recently Visited Worlds missing from Places tab
- Dominant language
- C#
- Stars
- 23
- Forks
- 17
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 94
Description
### Build version
Not specified
### Issue Description
Worlds visited recently do not appear in the "Recently Visited" section of the Places tab (Z) — only Genesis City scenes show up there.
### STR (Steps to Reproduce)
1. Visit a World (not a Genesis City scene)
2. Return to the Places tab (Z)
3. Look at the "Recently Visited" section
### Expected Result
The visited World should appear in "Recently Visited" alongside any Genesis City scenes visited in the same session.
### Actual Result with evidence
Only Genesis City scenes appear in "Recently Visited"; visited Worlds are silently absent, with no error shown to the user.
### Reproduction
Always (deterministic — see root cause below, not an intermittent condition)
### Operative system and additional Notes
**Root cause (code-level investigation, high confidence):**
ID mismatch between how a World's "recently visited" entry is captured client-side and how it's resolved server-side, causing the entry to match neither branch of a backend union query.
1. **Client (`decentraland/unity-explorer`)** — When in a World, `MinimapController` → `PlacesAPIService.GetWorldAsync` (`Explorer/Assets/DCL/PlacesAPIService/PlacesAPIService.cs` ~lines 118-143, via `PlacesAPIClient.cs` ~lines 286-314) calls the `/places` endpoint (not `/worlds`). The returned `PlaceInfo.id` — a `places` table UUID — is what gets persisted via `AddRecentlyVisitedPlace` (`RecentlyVisitedPlacesController.cs`).
2. **Backend (`decentraland/places`)** — When Recently Visited is resolved via `POST /destinations` (client-side call in `PlacesResultsController.cs` ~lines 322-404; backend `getDestinationsListById.ts` → `DestinationModel.findWithAggregates`), the backend runs a `UNION ALL` of two queries:
- The `places` branch (`src/entities/Place/model.ts` ~lines 96-99) is built with `worldFilter: "always"`, which unconditionally appends `AND p.world is false` — excluding the World's `places`-table row even though its UUID is in the `ids` filter.
- The `worlds` branch filters `w.id IN (ids)` against the `worlds` table's own `id`, which is the lowercased world name (`src/entities/World/types.ts`) — a different value than the stored places-table UUID, so it never matches either.
- Net effect: the World's recently-visited entry matches neither branch and silently disappears. Genesis City places are unaffected because their IDs are genuine `places.id` values with `world=false`, which pass the `worldFilter: "always"` clause cleanly.
- Consistent with `PlacesResultsController.GetRecentlyVisitedPlacesSorted` (~lines 389-404), which silently drops any ID absent from the API response (`placesById.TryGetValue`) rather than erroring — matching the "just missing, no error" symptom.
**Cross-repo scope:** this bug spans both `decentraland/unity-explorer` (client captures the wrong ID via the `/places` call) and `decentraland/places` (backend union query excludes/mismatches World rows). A fix likely needs changes on one or both sides — either have the client capture/use the correct World ID, or fix the backend query so a World's row isn't excluded from the union / the `worlds` branch matches on the right key.
**Related, not duplicate:** #8941 (comma-delimited serialization tech debt in `RecentlyVisitedPlacesController`) touches the same controller but is a separate concern — do not conflate.
---
Reported by Bence Varga
Requested by Ani Albano (<@U05FQD5JWH2>)
Contributor guide
Assessment
This issue has not been assessed yet.