fix: improve places screen sorting - #9891
Conversation
🚦 CI StatusWindows and Mac build successful in Unity Cloud! You can find a link to the downloadable artifact below. Warnings not reduced: 12543 => 12543 — remove at least 1 warning to merge. Warnings/errors in files changed by this PR (4)
|
decentraland-bot
left a comment
There was a problem hiding this comment.
Review Summary
What the PR changes: Switches the default places-screen sorting from 'Best Rated' (LIKE_SCORE) to 'Most Active' (MOST_ACTIVE) across UI, data model, and prefab initialization to align with the website and prioritize places with active users.
Root-cause assessment: The PR addresses the product requirement directly — changing the default value at the source (reset filters flow) rather than masking a symptom. The changes are coordinated across three touch points:
- PlacesFilterSelectorView.cs (lines 50, 55): UI toggle state now defaults to
sortByMostActiveinstead ofsortByBestRatedin the reset flow, using both event-firing and silent variants correctly - PlacesView.cs (line 199): Data model default updated from
LIKE_SCOREtoMOST_ACTIVE - Places_FilterSelector.prefab: Toggle initial states swapped (m_IsOn: 0→1, m_IsOn: 1→0) to match code defaults
Design & integration: No new systems, lifecycle owners, or persistent collections introduced. The change is a pure configuration default, integrated into existing reset-filters flows. All three points are properly coordinated — no inconsistencies detected.
Code quality: Changes comply with CLAUDE.md standards:
- No LINQ, no persistent collections
- Proper use of
SetIsOnWithoutNotify()for silent state changes (correct pattern for avoiding event cascades during reset) - Simple enum replacement (no deeper logic refactoring needed)
- Consistent enum naming across files
CI status: Semantic PR title check passing (fix: improve places screen sorting). Build and test workflows in progress. Approval checks show expected status (QA/DEV reviews not yet assigned).
REVIEW_RESULT: PASS ✅
COMPLEXITY: SIMPLE
COMPLEXITY_REASON: Configuration-only change (default sort order) affecting UI state and data model; no systems, async, or structural ECS changes
QA_REQUIRED: YES
decentraland-bot
left a comment
There was a problem hiding this comment.
Design Patterns & Code Quality Review
STEP 1 — Load context & set scope
✓ Loaded CLAUDE.md and review instructions
✓ Analyzed changed files and diff
✓ Scope: Configuration change to default Places sorting behavior
STEP 2 — Root-cause check
✓ PASS — PR directly fixes the root cause. The requirement is to prioritize active places and align with website sorting. This change updates the default sort order from LIKE_SCORE (Best Rated) to MOST_ACTIVE across all three files. Not a workaround or symptom fix.
STEP 3 — Design & integration
✓ PASS — No new long-lived units introduced. Changes are purely configuration within existing Places filter/view system:
- PlacesFilterSelectorView: Changes which toggle initializes as selected (sortByBestRated → sortByMostActive)
- PlacesView: Changes default enum value in ResetCurrentFilters()
- Prefab: Swaps toggle enabled states to match
No lifecycle ownership issues. No per-frame reconciliation. Changes are consistent across all three files.
STEP 4 — Member audit
No new public properties or accessors added. Only existing toggle fields and enum values are modified. The null! declarations on serialized Toggle fields are appropriate — they must be assigned in the editor.
✓ PASS
STEP 5 — Line-level review
Consistency check
All three files consistently switch from BestRated/LIKE_SCORE to MostActive/MOST_ACTIVE:
- PlacesFilterSelectorView.cs (line 50, 54): Sets
sortByMostActive.isOninstead ofsortByBestRated.isOn - PlacesView.cs (line 199): Sets
IPlacesAPIService.SortBy.MOST_ACTIVEinstead ofLIKE_SCORE - Prefab: Toggle states swap—MostActive becomes default (m_IsOn: 1), BestRated becomes secondary (m_IsOn: 0)
✓ PASS — Changes are internally consistent.
Anti-pattern check
Bridge/wrapper classes: None introduced ✓
Defensive null-checks against non-null declarations: None found ✓
Extracting when should merge: None ✓
Per-frame logic in presenter/controller: None — ResetFilters() is called explicitly, not every frame ✓
Comments narrating caller behavior: None ✓
✓ PASS — No anti-patterns detected.
STEP 6 — Complexity assessment
- 3 files, ~7 lines of meaningful changes
- Straightforward toggle/enum configuration update
- No ECS systems touched
- No async/UniTask changes
- No new dependencies or lifecycle management
COMPLEXITY: SIMPLE
STEP 7 — QA assessment
- Changes affect user-facing behavior (Places default sort order)
- Runtime code (Explorer player build)
- User will see different places listed when Places screen first loads
QA_REQUIRED: YES — Manual testing required to confirm sort order matches website and displays active places prominently.
STEP 8 — Non-blocking warnings
None.
STEP 9 — Verdict
REVIEW_RESULT: PASS ✅
COMPLEXITY: SIMPLE
COMPLEXITY_REASON: Configuration change updating default sort order in Places UI without ECS or async modifications
QA_REQUIRED: YES
decentraland-bot
left a comment
There was a problem hiding this comment.
Review — PR #9891: fix: improve places screen sorting
STEP 2 — Root-cause check: PASS
Problem: The Places screen default sorting ("Best Rated" / LIKE_SCORE) does not prioritize places with active users and does not align with the website's sort order at decentraland.org/discover.
Fix: The diff changes the default sort to "Most Active" (MOST_ACTIVE) — this addresses the cause directly by aligning the explorer's default with the website. Not a workaround or symptom suppression.
STEP 3 — Design & integration: PASS
No new long-lived units (systems, plugins, managers, controllers) are introduced. The change modifies only default values in three coordinated locations:
PlacesFilterSelectorView.ResetFilters()— UI toggle default switched fromsortByBestRated→sortByMostActive(both with-events and without-notify paths)PlacesView.ResetCurrentFilters()— data model default switched fromSortBy.LIKE_SCORE→SortBy.MOST_ACTIVEPlaces_FilterSelector.prefab— serializedm_IsOnstates swapped between the two toggle MonoBehaviours
All three are consistent — the UI toggle state, the data model default, and the prefab initial state agree on "Most Active".
No new subscriptions, event hookups, connections, buffers, or measurements added. No teardown concerns.
STEP 4 — Member audit: PASS
No new public properties or accessors added or changed. Only the internal default values within existing method bodies are modified.
STEP 5 — Line-level review: PASS
Two passes over the changed lines found no issues:
- No bugs, logic errors, or potential runtime errors
- No security vulnerabilities
- No performance issues (no allocations, no LINQ)
- No resource/subscription leaks introduced
- No missing error handling
- No nullability violations
- No detached async or unconsumed infrastructure
- No CLAUDE.md anti-patterns introduced
- No naming or encapsulation issues
- No magic values (uses existing enum constants)
Security review: No security issues found
Purely a UI default value change — no input validation, auth, secrets, or data exposure concerns.
STEP 6 — Complexity: SIMPLE
Touches 3 files with ~6 lines of meaningful changes. Straightforward configuration/default value swap. No ECS, async, networking, or architectural modifications.
STEP 7 — QA assessment: YES
Changes default sorting behavior in the Places UI — affects what the user sees when opening the Places screen. Manual verification needed to confirm results match decentraland.org/discover.
STEP 8 — Non-blocking warnings: None
Main scene not modified. No warnings.
Git conventions (ADR-6): PASS
- PR title
fix: improve places screen sortingfollows semantic commit format ✅ - Branch name
fix/places-sortingfollows<type>/<summary>convention ✅
REVIEW_RESULT: PASS ✅
COMPLEXITY: SIMPLE
COMPLEXITY_REASON: Changes only default filter/sort values in UI view classes and a prefab — no ECS, async, or architectural modifications.
QA_REQUIRED: YES
Reviewed by Jarvis 🤖 · Requested by decentraland-bot via GitHub
|
PR #9891, run #33112512195 Overall: ✅ no significant changes Builds: Windows change, Windows baseline, macOS change, macOS baseline How to read this table
Intel Core i5
Apple M1
|
What does this PR change?
We need to prioritize places with people in it, and align with website results. Sets the default sorting option to most active.
Test Instructions