Skip to content

Add opt-in chat reports to damage meter windows - #2092

Draft
NYTEMODEONLY wants to merge 2 commits into
EllesmereGaming:mainfrom
NYTEMODEONLY:proposal/damage-meter-chat-reports
Draft

NYTEMODEONLY wants to merge 2 commits into
EllesmereGaming:mainfrom
NYTEMODEONLY:proposal/damage-meter-chat-reports

Conversation

@NYTEMODEONLY

@NYTEMODEONLY NYTEMODEONLY commented Sep 15, 2026

Copy link
Copy Markdown

What does this PR do?

Adds opt-in chat reports to damage meter windows. Enable Damage Meters > Header > Enable Chat Reports to add the existing speaker asset to each header. The dialog previews that window's metric and segment, defaults to five entries, and sends the header followed by every selected available entry in ranked order from one click.

  • Supports Say, Party, Raid, Instance Chat, Guild, Officer, Whisper and joined custom channels. Unavailable destinations are disabled; whisper recipients and custom-channel IDs are validated before sending.
  • Uses the house dropdown, button, font, accent and popup-scale systems, with a compact preview and event-driven scrollbar. Header controls retain the existing sizing, icon-color and hover behavior, including when reports are enabled after window creation.
  • Reads an immutable snapshot from the native damage meter. Damage/healing totals, rates and percentages use the whole segment; count metrics and filtered chronological deaths use their corresponding formats. Combat-restricted, secret and empty data cannot be reported.
  • Builds controls lazily, registers dialog events only while open, and cancels pending lines on close, disable, combat or profile/window teardown. Messages preserve UTF-8 boundaries within the chat byte limit.

This is an independent addition based on main; it does not depend on #2090, Details, or changes to the chat module. The new setting defaults off. This PR stays draft while feature submissions are paused under the contribution guide and until the live checks and screenshots below are complete.

Sending behavior

Outdoor Say/custom-channel messages stay on the original button-click stack. Other destinations use a cancellable 0.3-second interval solely to pace the explicitly requested chat messages. There is no background reporting, collection, polling, or timer gate for combat-data access. Blizzard channel permissions, flood limits and server delivery still apply; a successful API call does not acknowledge server delivery.

How was it tested?

  • python .tools/damage-meter-report-tests/run_reports.py with Python and lupa's Lua 5.1 runtime: passes. Compiles all damage-meter Lua files and the options file, including Lua 5.1 local/upvalue limits.
  • 86 report checks cover snapshots, ranking, percentages, secret data, UTF-8 limits, destination validation, complete ordered sends, cancellation, opt-in behavior, dialog event cleanup, and the shared UI factory/accent/scale contracts.
  • Executes the production header-button lifecycle against lightweight controls: default-off, insertion order, owning-window click, late hover setup, refresh without duplication, disable and re-enable all pass.
  • Static locale catalog regenerated using the repository extractor's matching and C-sort rules (821 keys). The Windows environment's minimal Git lacks the shell utilities needed to run the Bash script directly; the repository's locale-key CI remains the authoritative check.
  • Staged git diff --check and ASCII checks on every added line: pass. Tests and their README live under .tools, already excluded from release packages.

The installed precursor was exercised by the contributor, but this upstream cleanup has not yet been validated in the live client. Native widget rendering, actual chat delivery, combat taint and the default-off/profile lifecycle need a Midnight 12.1+ pass. The mocks do not certify those results. The repeatable live checklist is in .tools/damage-meter-report-tests/README.md.

Screenshots

Contributor-provided in-game capture of the installed version, showing the themed report dialog and the damage/healing meter headers. The selected five-entry limit previews the one available player plus the report header.

Themed Report to Chat dialog with Say selected, five-entry limit, one-player damage preview, and damage/healing meter headers

This captures the installed version; the upstream cleanup's remaining live checks are still pending. A matched before capture and the resulting chat messages are not shown here.

Checklist

  • New settings default OFF (no behavior change without opt-in)
  • Zero cost while disabled: no feature events registered, no polling, no hooks doing work, no report frames built before first enable; closing releases dialog events and cancels its send timer
  • Cheap while enabled: event-driven UI, no polling or per-frame allocations; the bounded send timer only paces requested chat messages as described above
  • No writes onto Blizzard-owned frames; scripts and header hooks attach only to addon-created controls
  • Tested in-game on live; this cleanup still needs that pass. No version gates or pre-Midnight API fallbacks were added

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.

1 participant