Add sync toggle for linking Party & Raid settings per page - #8
Merged
Conversation
Each settings page with a Copy button now also has a Sync toggle next to it. When enabled, changes to that section in one mode automatically propagate to the other. The link state persists across reloads via the profile's linkedSections table.
Enf0
marked this pull request as ready for review
February 15, 2026 19:23
Owner
|
Thanks for this — clean feature, well-integrated with the existing copy system. I pushed one small commit to your branch before merging: added an early-out to Everything else looked good. Nice work! |
DanderBot
added a commit
that referenced
this pull request
Feb 18, 2026
DanderBot
added a commit
that referenced
this pull request
Apr 9, 2026
The main win of Fix A. Before this commit, every UNIT_AURA event for every roster unit triggered a full rescan via GetUnitAuras(HELPFUL) and GetUnitAuras(HARMFUL), classifying all auras from scratch and allocating ~40 fresh aura data tables per call. Plus downstream UpdateDefensiveBar and the AuraDesigner Engine did their own redundant scans, totaling 6-7 GetUnitAuras calls per unit per event. After this commit, the decision tree in directModeSubscriber:OnUnitAura routes through ScanUnitFull only on first-access, isFullUpdate, or when delta isn't safe. Every other UNIT_AURA flows through the cheap ApplyAuraDelta path which processes updateInfo.addedAuras, updatedAuraInstanceIDs, and removedAuraInstanceIDs — typically 1-3 entries per event — and reuses the auraData tables Blizzard ships in the event payload for added auras (zero allocation). This matches the oUF / ElvUI / BuzzardFrames pattern — see _Reference/fix-a-plan.md for the architecture and _Reference/BuzzardFrames/Libs/oUF/elements/auras.lua:296-434 for the reference implementation. Changes in this commit: * directModeSubscriber:OnUnitAura routes through ScanUnitFull or ApplyAuraDelta via the decision tree. ApplyAuraDelta returns false if the cache isn't ready and the caller falls back to ScanUnitFull. * ScanUnitDirect's legacy body is replaced with a thin delegation to ScanUnitFull. DirectScanAllUnits and DirectModeRosterUpdate (both cold paths: initial scan and roster changes) now use the new pipeline for free. Also means the initial bulk scan sets cache.hasFullScan = true so the very first UNIT_AURA per unit after login takes the fast delta path instead of falling back to full scan. * ScanUnitFull and ApplyAuraDelta now populate the LEGACY sorted arrays (cache.buffData, cache.buffOrder, cache.debuffData, cache.debuffOrder) via RebuildLegacySortedArrays. This keeps the icon renderer at UpdateAuraIconsDirect (~line 2528) reading cache.buffData unchanged — no downstream consumer has to know about the architectural shift. Uses module-level scratch tables (sortScratchBuffs, sortScratchDebuffs) so the rebuild itself doesn't allocate. * SortByTimeRemaining and SortByName moved earlier in the file (lexically before RebuildLegacySortedArrays) so the latter can reference them as upvalues. The pcall wrappers are kept in place per audit finding #8 — some aura data fields may be secret on Midnight and would silently fail sort comparisons without the guard. * RebuildDirectFilterStrings now marks every cache entry as hasFullScan = false so a filter-settings change forces the next UNIT_AURA event to run ScanUnitFull with the new filter strings. Classification sets are rebuilt against the fresh filters on the next event. Off-event readers (options page preview, etc.) still see data until the next event lands — no wipe, just invalidation. * ApplyAuraDelta categorizes added auras via IsAuraFilteredOutByInstanceID with base HELPFUL/HARMFUL filters, NOT via auraData.isHarmful. oUF explicitly documents that isHarmful is a secret value on Midnight (auras.lua:276). What is still NOT migrated after this commit: * UpdateDefensiveBar still calls PopulateDefensiveCache on every render which does its own GetUnitAuras scan. Commit 3 will fix this — it reads cache.defensives directly (already kept fresh by ScanUnitFull / ApplyAuraDelta via ClassifyAura). * AuraDesigner Provider:GetUnitAuras still does its own 2-3 GetUnitAuras calls per AD Engine:UpdateFrame invocation. Commit 4 will migrate it to read cache.buffsByID / cache.debuffsByID. Expected profile impact after this commit: * UpdateAuras_Enhanced bytes/call should drop significantly in steady state — only the ~1-3 updated-aura refetches allocate. Full-scan spikes still happen on roster joins, mode switches, and isFullUpdate events. * UpdateDefensiveBar and UpdateExternalDefIcon bytes/call are UNCHANGED after this commit (commit 3 fixes them). * Total allocation rate should drop 40-60% in a raid combat profile. The remaining 30-50% comes with commits 3 and 4. Verification checklist: * /reload loads without errors * Enter a 5-man, verify buffs/debuffs display correctly * /dfscan player should still work and show hasFullScan=true * Dispel overlay still fires on dispellable debuffs * Defensive icons still appear for tank cooldowns * Aura Designer indicators still fire * Options page filter changes apply correctly after next UNIT_AURA * Roster changes (join/leave party) don't produce errors
DanderBot
added a commit
that referenced
this pull request
Apr 10, 2026
Replaces the scaffolded stubs with the full cast-lifecycle
implementation. Debug output via DF:Debug("TARGETEDLIST", ...) is
used as a stand-in for visual bars until commit #5 lands the render
pipeline — this lets in-game verification happen against the debug
console without requiring the full rendering work first.
All 13 correctness gotchas from the TS3 cross-reference in
_Reference/targeted-spells-findings.md are handled and tagged inline:
#1 0.2s delay before reading cast data (start events fire before
UnitSpellTargetName / duration are populated)
#2 Cast-ID matching at both pickup (via UnitCastingInfo) and stop
(via event castGuid) — prevents rapid-restart flicker
#3 UNIT_SPELLCAST_SUCCEEDED during an active channel is treated
as a no-op (channel tick, not a stop)
#4 INTERRUPTED with nil interrupter or a dead caster is treated
as a normal stop (no interrupter flash)
#6 Empower spellId/castGuid offset handled (same shape as regular
start on current retail — documented inline)
#7 Interrupter lookup via UnitNameFromGUID / UnitClassFromGUID
#8 Uninterruptible flag from UnitCastingInfo/UnitChannelInfo is
treated as secret-tainted and only ever fed to
SetVertexColorFromBoolean (applied in commit #5)
#9 UNIT_SPELLCAST_INTERRUPTIBLE / NOT_INTERRUPTIBLE overwrite the
stored uninterruptible field with a clean boolean
#11 LOADING_SCREEN_DISABLED triggers a full release sweep
Also adds the cast-targeting filter pipeline:
* TargetedList_IsRelevantCaster filters out non-nameplate units,
friendly units, and party-member nameplates
* TargetedList_ReadCastData unifies UnitCastingInfo / UnitChannelInfo
read paths, handling the positional offset difference for
castID vs notInterruptible between the two APIs
* Important-spells filter via C_Spell.IsSpellImportant
* Hide-own-casts filter
* Roster name cache used for O(1) target lookup
Event dispatcher extended to route NAME_PLATE_UNIT_ADDED and
UNIT_TARGET through the start handler so new nameplates and mid-cast
target swaps are picked up. UNIT_TARGET also fires an immediate stop
to drop the old tracking — the 0.2s delayed re-pickup recreates it
if the new target is still a party member.
Content-type filter (gotcha #13) is intentionally deferred to
commit #5 since the existing TargetedSpells content-type detection
can be reused rather than duplicated.
Krathe82
pushed a commit
to Krathe82/DandersFrames
that referenced
this pull request
Jun 6, 2026
Add sync toggle for linking Party & Raid settings per page
Krathe82
pushed a commit
to Krathe82/DandersFrames
that referenced
this pull request
Jun 6, 2026
Krathe82
pushed a commit
to Krathe82/DandersFrames
that referenced
this pull request
Jun 6, 2026
The main win of Fix A. Before this commit, every UNIT_AURA event for every roster unit triggered a full rescan via GetUnitAuras(HELPFUL) and GetUnitAuras(HARMFUL), classifying all auras from scratch and allocating ~40 fresh aura data tables per call. Plus downstream UpdateDefensiveBar and the AuraDesigner Engine did their own redundant scans, totaling 6-7 GetUnitAuras calls per unit per event. After this commit, the decision tree in directModeSubscriber:OnUnitAura routes through ScanUnitFull only on first-access, isFullUpdate, or when delta isn't safe. Every other UNIT_AURA flows through the cheap ApplyAuraDelta path which processes updateInfo.addedAuras, updatedAuraInstanceIDs, and removedAuraInstanceIDs — typically 1-3 entries per event — and reuses the auraData tables Blizzard ships in the event payload for added auras (zero allocation). This matches the oUF / ElvUI / BuzzardFrames pattern — see _Reference/fix-a-plan.md for the architecture and _Reference/BuzzardFrames/Libs/oUF/elements/auras.lua:296-434 for the reference implementation. Changes in this commit: * directModeSubscriber:OnUnitAura routes through ScanUnitFull or ApplyAuraDelta via the decision tree. ApplyAuraDelta returns false if the cache isn't ready and the caller falls back to ScanUnitFull. * ScanUnitDirect's legacy body is replaced with a thin delegation to ScanUnitFull. DirectScanAllUnits and DirectModeRosterUpdate (both cold paths: initial scan and roster changes) now use the new pipeline for free. Also means the initial bulk scan sets cache.hasFullScan = true so the very first UNIT_AURA per unit after login takes the fast delta path instead of falling back to full scan. * ScanUnitFull and ApplyAuraDelta now populate the LEGACY sorted arrays (cache.buffData, cache.buffOrder, cache.debuffData, cache.debuffOrder) via RebuildLegacySortedArrays. This keeps the icon renderer at UpdateAuraIconsDirect (~line 2528) reading cache.buffData unchanged — no downstream consumer has to know about the architectural shift. Uses module-level scratch tables (sortScratchBuffs, sortScratchDebuffs) so the rebuild itself doesn't allocate. * SortByTimeRemaining and SortByName moved earlier in the file (lexically before RebuildLegacySortedArrays) so the latter can reference them as upvalues. The pcall wrappers are kept in place per audit finding DanderBot#8 — some aura data fields may be secret on Midnight and would silently fail sort comparisons without the guard. * RebuildDirectFilterStrings now marks every cache entry as hasFullScan = false so a filter-settings change forces the next UNIT_AURA event to run ScanUnitFull with the new filter strings. Classification sets are rebuilt against the fresh filters on the next event. Off-event readers (options page preview, etc.) still see data until the next event lands — no wipe, just invalidation. * ApplyAuraDelta categorizes added auras via IsAuraFilteredOutByInstanceID with base HELPFUL/HARMFUL filters, NOT via auraData.isHarmful. oUF explicitly documents that isHarmful is a secret value on Midnight (auras.lua:276). What is still NOT migrated after this commit: * UpdateDefensiveBar still calls PopulateDefensiveCache on every render which does its own GetUnitAuras scan. Commit 3 will fix this — it reads cache.defensives directly (already kept fresh by ScanUnitFull / ApplyAuraDelta via ClassifyAura). * AuraDesigner Provider:GetUnitAuras still does its own 2-3 GetUnitAuras calls per AD Engine:UpdateFrame invocation. Commit 4 will migrate it to read cache.buffsByID / cache.debuffsByID. Expected profile impact after this commit: * UpdateAuras_Enhanced bytes/call should drop significantly in steady state — only the ~1-3 updated-aura refetches allocate. Full-scan spikes still happen on roster joins, mode switches, and isFullUpdate events. * UpdateDefensiveBar and UpdateExternalDefIcon bytes/call are UNCHANGED after this commit (commit 3 fixes them). * Total allocation rate should drop 40-60% in a raid combat profile. The remaining 30-50% comes with commits 3 and 4. Verification checklist: * /reload loads without errors * Enter a 5-man, verify buffs/debuffs display correctly * /dfscan player should still work and show hasFullScan=true * Dispel overlay still fires on dispellable debuffs * Defensive icons still appear for tank cooldowns * Aura Designer indicators still fire * Options page filter changes apply correctly after next UNIT_AURA * Roster changes (join/leave party) don't produce errors
Krathe82
pushed a commit
to Krathe82/DandersFrames
that referenced
this pull request
Jun 6, 2026
Replaces the scaffolded stubs with the full cast-lifecycle
implementation. Debug output via DF:Debug("TARGETEDLIST", ...) is
used as a stand-in for visual bars until commit DanderBot#5 lands the render
pipeline — this lets in-game verification happen against the debug
console without requiring the full rendering work first.
All 13 correctness gotchas from the TS3 cross-reference in
_Reference/targeted-spells-findings.md are handled and tagged inline:
#1 0.2s delay before reading cast data (start events fire before
UnitSpellTargetName / duration are populated)
DanderBot#2 Cast-ID matching at both pickup (via UnitCastingInfo) and stop
(via event castGuid) — prevents rapid-restart flicker
DanderBot#3 UNIT_SPELLCAST_SUCCEEDED during an active channel is treated
as a no-op (channel tick, not a stop)
DanderBot#4 INTERRUPTED with nil interrupter or a dead caster is treated
as a normal stop (no interrupter flash)
DanderBot#6 Empower spellId/castGuid offset handled (same shape as regular
start on current retail — documented inline)
DanderBot#7 Interrupter lookup via UnitNameFromGUID / UnitClassFromGUID
DanderBot#8 Uninterruptible flag from UnitCastingInfo/UnitChannelInfo is
treated as secret-tainted and only ever fed to
SetVertexColorFromBoolean (applied in commit DanderBot#5)
DanderBot#9 UNIT_SPELLCAST_INTERRUPTIBLE / NOT_INTERRUPTIBLE overwrite the
stored uninterruptible field with a clean boolean
DanderBot#11 LOADING_SCREEN_DISABLED triggers a full release sweep
Also adds the cast-targeting filter pipeline:
* TargetedList_IsRelevantCaster filters out non-nameplate units,
friendly units, and party-member nameplates
* TargetedList_ReadCastData unifies UnitCastingInfo / UnitChannelInfo
read paths, handling the positional offset difference for
castID vs notInterruptible between the two APIs
* Important-spells filter via C_Spell.IsSpellImportant
* Hide-own-casts filter
* Roster name cache used for O(1) target lookup
Event dispatcher extended to route NAME_PLATE_UNIT_ADDED and
UNIT_TARGET through the start handler so new nameplates and mid-cast
target swaps are picked up. UNIT_TARGET also fires an immediate stop
to drop the old tracking — the 0.2s delayed re-pickup recreates it
if the new target is still a party member.
Content-type filter (gotcha DanderBot#13) is intentionally deferred to
commit DanderBot#5 since the existing TargetedSpells content-type detection
can be reused rather than duplicated.
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.
Right now, keeping Party and Raid settings in sync for a section means manually clicking "Copy to Raid" after every tweak. This adds a "Sync with Raid/Party" toggle next to each of the existing Copy buttons.
When enabled, it copies current settings to the other mode and keeps them in sync going forward. Toggling it off lets the two modes diverge again. The sync state is saved per-profile and persists across reloads.
The existing Copy button still works for one-off copies without enabling persistent sync.