Skip to content

Add Brewmaster Monk Stagger bar as a new chained bar module - #110

Merged
argium merged 5 commits into
mainfrom
copilot/brewmaster-stagger-bar
Jul 6, 2026
Merged

Add Brewmaster Monk Stagger bar as a new chained bar module#110
argium merged 5 commits into
mainfrom
copilot/brewmaster-stagger-bar

Conversation

@argium

@argium argium commented Jul 6, 2026

Copy link
Copy Markdown
Owner

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 StaggerBar module that renders the stagger pool as a continuous StatusBar filled to UnitStagger("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

  • Class vs spec gating. OnEnable gates on the Monk class (which never changes at runtime) so the frame is only ever built for monks. ShouldShow gates on the Brewmaster spec via ClassUtil.IsBrewmasterMonk(), so spec swaps are handled by the existing PLAYER_SPECIALIZATION_CHANGED layout pulse rather than a module-owned event.
  • Drain ticker. Stagger drains continuously between UNIT_AURA events, 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 uses OnUpdate.
  • Secret values. UnitStagger and UnitHealthMax are not secret (unlike UnitPower*), so the percentage is computed directly; color selection reads active stagger debuffs via C_UnitAuras.GetPlayerAuraBySpellID.
  • No schema bump. AceDB auto-merges the new staggerBar defaults 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 in Tests/Modules/StaggerBar_spec.lua, Tests/UI/StaggerBarOptions_spec.lua, and ClassUtil_spec.lua; the two UI section-registration fixtures were updated to include the new section.
  • luacheck: clean for all new/changed files (UnitStagger/UnitHealthMax added to the WoW globals allowlist). The only remaining warnings are pre-existing unrelated Runtime.lua shapeshift globals.

Docs updated: docs/StaggerBar.md (new module reference), docs/ARCHITECTURE.md module table and event listings, and the README feature list.

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>
Copilot AI review requested due to automatic review settings July 6, 2026 14:39

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread Modules/StaggerBar.lua Outdated
Comment thread ClassUtil.lua

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.lua and 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.

Comment thread Modules/StaggerBar.lua
Comment thread Modules/StaggerBar.lua
Comment thread UI/StaggerBarOptions.lua Outdated
argium and others added 3 commits July 7, 2026 00:55
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>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Test Results

944 tests   944 ✅  2s ⏱️
  4 suites    0 💤
  4 files      0 ❌

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>
@argium
argium merged commit 7ac2da4 into main Jul 6, 2026
2 checks passed
@argium
argium deleted the copilot/brewmaster-stagger-bar branch July 6, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants