Add Brewmaster Monk Stagger bar as a new chained bar module - #110
Conversation
Adds a StaggerBar module that displays the Brewmaster Monk stagger pool as a continuous StatusBar filled to UnitStagger/UnitHealthMax, labelled with a whole-number percentage and recoloured by active stagger level (light, moderate, heavy). Gated to the Monk class at OnEnable and the Brewmaster spec via ShouldShow, with a self-stopping drain ticker driven by UNIT_AURA. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33022a9bd3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds a new chained-bar module (StaggerBar) to display Brewmaster Monk Stagger as a health-percentage bar, integrated into ECM’s existing BarMixin/Runtime chain and configurable via the settings UI.
Changes:
- Introduces
Modules/StaggerBar.luaand wires it into module load/chain order, defaults, options registration, and TOC load order. - Adds a dedicated options section (
UI/StaggerBarOptions.lua) with localization (EN/RU) and new persisted config fields. - Adds module/options/unit stubs test coverage plus supporting documentation updates.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| UI/StaggerBarOptions.lua | New Settings section spec for configuring the Stagger bar (enable, bar rows, colors, gating message). |
| UI/Options.lua | Registers the new StaggerBar options section in the root options tree. |
| Tests/UI/StaggerBarOptions_spec.lua | Verifies options getters/setters/defaults and Brewmaster gating behavior. |
| Tests/UI/OptionsSections_spec.lua | Updates options section assembly fixture to include staggerBar. |
| Tests/UI/Options_spec.lua | Updates OptionUtil/options fixtures to include staggerBar. |
| Tests/stubs/Unit.lua | Extends unit stub with UnitStagger / UnitHealthMax test support. |
| Tests/Modules/StaggerBar_spec.lua | New unit tests for StaggerBar values/colors, event behavior, and ticker lifecycle. |
| Tests/ClassUtil_spec.lua | Adds tests for ClassUtil.IsBrewmasterMonk() and stubs GetSpecialization. |
| README.md | Documents the new Brewmaster Stagger Bar feature. |
| Modules/StaggerBar.lua | New Brewmaster-only chained bar module with aura-based coloring and drain ticker. |
| Locales/ru.lua | Adds Russian strings for Stagger bar label and options. |
| Locales/en.lua | Adds English strings for Stagger bar label and options. |
| EnhancedCooldownManager.toc | Ensures StaggerBar module + options file are loaded. |
| docs/StaggerBar.md | New module reference documentation for StaggerBar behavior/flows. |
| docs/ARCHITECTURE.md | Adds StaggerBar to module list, chain-order docs, and event listings. |
| Defaults.lua | Adds persisted defaults for profile.staggerBar (enabled/layout/colors/etc). |
| Constants.lua | Adds Stagger spell IDs and includes StaggerBar in config keys, chain order, and load order. |
| ClassUtil.lua | Adds ClassUtil.IsBrewmasterMonk() helper used for spec gating. |
| .luacheckrc | Allows UnitStagger / UnitHealthMax globals for luacheck. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Force a final immediate refresh on the tick where stagger clears so a large global updateFrequency cannot leave a stale non-zero value on screen. Restart the drain ticker from a new UpdateLayout override when the bar is re-shown mid-stagger, and only start the ticker while a stagger aura is present instead of on every player UNIT_AURA. Make the Brewmaster-only options warning always present with a hidden predicate so it tracks the live spec. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The SetStagger/SetHealthMax setters, backing state, and _G.UnitStagger/UnitHealthMax installs in the shared Unit stub were never consumed. StaggerBar_spec and ClassUtil_spec use inline _G stubs, so restore the stub to its pre-feature shape. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Runtime.lua calls GetShapeshiftFormID, GetNumShapeshiftForms, and GetShapeshiftFormInfo, but they were missing from the .luacheckrc read_globals list, so luacheck failed with undefined-global errors and broke the Unit Tests CI check. Add the three APIs alongside the existing GetShapeshiftForm entry. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Test Results944 tests 944 ✅ 2s ⏱️ Results for commit ef91889. ♻️ This comment has been updated with latest results. |
Add scripts/update-deprecated-apis.ps1, which discovers every Blizzard_Deprecated* folder in the wow-ui-source mirror at a given tag, extracts the top-level deprecated symbols with scope-aware parsing, and rewrites docs/BlizzardDeprecatedApis.md. Regenerate the doc for 12.0.7, expanding it from a hand-maintained subset to every deprecated folder. Add .agents/prompts/update-deprecated-apis.md documenting the refresh workflow. Point the Serena memory at the authoritative doc instead of duplicating the list, and bump the 12.0.5 version references in AGENTS.md and the memories to 12.0.7. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Why
Brewmaster Monks manage their Stagger pool as a core survival mechanic, but ECM had no dedicated readout for it. This adds a first-class Stagger bar so tanks can read their danger level at a glance without a separate WeakAura.
What
Adds a new
StaggerBarmodule that renders the stagger pool as a continuous StatusBar filled toUnitStagger("player") / UnitHealthMax("player"), labelled with a whole-number percentage. The fill color follows the active stagger level debuff, recoloring from light to moderate to heavy as the pool climbs.It slots into the existing chained-bar architecture as the fourth bar (after PowerBar, ResourceBar, and RuneBar) using the shared
BarMixin.AddBarMixin, so it inherits layout, fade, profile, options, and Edit Mode behavior for free.Design notes
OnEnablegates on the Monk class (which never changes at runtime) so the frame is only ever built for monks.ShouldShowgates on the Brewmaster spec viaClassUtil.IsBrewmasterMonk(), so spec swaps are handled by the existingPLAYER_SPECIALIZATION_CHANGEDlayout pulse rather than a module-owned event.UNIT_AURAevents, so a lightweight self-stopping ticker (the same pattern RuneBar uses) polls while any stagger aura is present and stops once the pool clears. It refreshes before the emptiness check so the bar always renders a final frame at 0. ECM never usesOnUpdate.UnitStaggerandUnitHealthMaxare not secret (unlikeUnitPower*), so the percentage is computed directly; color selection reads active stagger debuffs viaC_UnitAuras.GetPlayerAuraBySpellID.staggerBardefaults section, so no migration is needed.Options
New Stagger Bar settings page with an enable toggle, the standard bar rows, a Brewmaster-only warning for other specs, and light/moderate/heavy color pickers. Localized in English and Russian.
Tests and validation
busted Tests: 844 successes / 0 failures / 0 errors. New coverage inTests/Modules/StaggerBar_spec.lua,Tests/UI/StaggerBarOptions_spec.lua, andClassUtil_spec.lua; the two UI section-registration fixtures were updated to include the new section.luacheck: clean for all new/changed files (UnitStagger/UnitHealthMaxadded to the WoW globals allowlist). The only remaining warnings are pre-existing unrelatedRuntime.luashapeshift globals.Docs updated:
docs/StaggerBar.md(new module reference),docs/ARCHITECTURE.mdmodule table and event listings, and the README feature list.