Arena: don't hide late-loading teammates (incomplete-nameList fallback)#155
Open
Krathe82 wants to merge 2 commits into
Open
Arena: don't hide late-loading teammates (incomplete-nameList fallback)#155Krathe82 wants to merge 2 commits into
Krathe82 wants to merge 2 commits into
Conversation
Contributor
Author
|
Follow-up commit from a deep audit of the arena population/sorting pipeline against Blizzard's
|
Live + alpha reports: in non-rated arenas, when you zone in early and the last teammate joins a bit later, their frame never appears for the whole round (joining last yourself is always fine); often "the first round of every arena, 1-2 players missing", and a mid-match /reload can leave the sort wrong. Root cause: with sorting on and Self Position FIRST/LAST (the default), the arena header runs in NAMELIST mode. A teammate can EXIST before their name RESOLVES (UnitName returns nil/UNKNOWNOBJECT while they load in - exactly the trickle-in pattern of non-rated queues). The nameList built in that window omits (or mis-names) them, so the secure header filters their frame out - and NOTHING repairs it: name resolution fires no GROUP_ROSTER_UPDATE, and once the gates open, combat blocks header attribute writes for the rest of the round. Joining last is fine because everyone else's name resolved long ago. Fix: - BuildArenaNameList now reports completeness; an unresolved member is omitted (a literal "Unknown" entry could never match their real name). - On an INCOMPLETE build, ApplyArenaHeaderSorting shows EVERYONE in INDEX order instead of applying a filtering nameList (unsorted beats missing), and a capped 0.5s retry loop re-sorts once names resolve. UNIT_NAME_UPDATE nudges the retry too (gated on the incomplete flag; that event is unreliable, hence the timer as primary). - ApplyArenaHeaderSorting's combat early-return now queues pendingSortingUpdate instead of silently dropping (an arena round's combat lasts minutes - e.g. a post-/reload apply mid-round previously vanished, leaving the header unsorted: the "sort is screwed after reloading" half of the report).
Follow-up hardening of the arena late-join fix, from a full audit of the arena population/sorting pipeline against Blizzard's SecureGroupHeaders.lua: - BuildArenaNameList now sources names from GetRaidRosterInfo instead of UnitName. For raid-kind units (arena = raid1-5), the secure header matches nameList tokens against GetRaidRosterInfo names, and the roster usually knows a late-joiner's name BEFORE their player object loads. Result: a complete, matchable nameList immediately in the common late-join case -- frames appear sorted right away instead of unsorted INDEX order until names resolve. The INDEX fallback remains for true roster gaps. - FrameSort integration: SortArenaFrames had none of the late-join protections -- an unloaded teammate's name was either skipped (nil) or inserted as a literal "Unknown" token, filtering their frame out for the whole round. It now resolves names via GetRaidRosterInfo, falls back to INDEX (show everyone) on an incomplete roster, and hooks into the shared incomplete-state machinery (new DF:SetArenaSortIncomplete) so the 0.5s retry + UNIT_NAME_UPDATE nudge cover it too. The retry is FrameSort-aware: it re-requests FrameSort's order rather than calling ApplyArenaHeaderSorting (which would just yield and clear to INDEX). - Retry cap: a UNIT_NAME_UPDATE nudge now re-arms the ~12s safety cap, so a player who loads in slower than the retry window still gets re-sorted.
63b1076 to
05261a3
Compare
This was referenced Jun 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live + alpha reports: in non-rated arenas, zoning in early and having the last teammate join a bit later leaves their frame missing for the whole round (joining last yourself is always fine); often described as "first round of every arena, 1-2 players missing", and a mid-match
/reloadcan leave the sort wrong afterwards.Root cause: with sorting on and Self Position First/Last (the default), the arena header runs in NAMELIST mode. A teammate can exist before their name resolves (
UnitNamereturns nil/UNKNOWNOBJECTwhile they load in — exactly the trickle-in pattern of non-rated queues). A nameList built in that window omits or mis-names them, so the secure header filters their frame out — and nothing repairs it: name resolution fires noGROUP_ROSTER_UPDATE, and once the gates open, combat blocks header attribute writes for the rest of the round. Joining last is fine because everyone else's names resolved long ago; solo shuffle is unaffected because FrameSort owns arena sorting when active.Fix:
BuildArenaNameListnow reports completeness; an unresolved member is omitted rather than added as a literal "Unknown" (which could never match their real name).ApplyArenaHeaderSortingshows everyone in INDEX order instead of applying a filtering nameList — unsorted beats missing — and a capped 0.5s retry loop re-sorts once names resolve.UNIT_NAME_UPDATEnudges the retry too (gated on the incomplete flag), with the timer as primary since that event is unreliable.ApplyArenaHeaderSorting's combat early-return now queuespendingSortingUpdateinstead of silently dropping — an arena round's combat lasts minutes, so e.g. a post-/reloadapply mid-round previously vanished, leaving the header unsorted (the "sort is screwed after reloading" half of the report).Worst case under the fix is a few seconds of unsorted-but-complete frames during prep, then correct sorting.