What the second player actually saw: four panel entries and no nameplates

A second player's four `/errors` entries, all from one session, none of them a
fault in the two addons he was reporting:

  1. `FloatingChatFrame.xml: SetScript("OnInputLanguageChanged") unsupported`.
     Ours. The slot is real 1.12 and the *realm's own* FrameXML sets it on
     `ChatFrameEditBox`, so every player met a red error on every login for a
     line none of them wrote. `SCRIPT_KINDS` now accepts it and never fires it,
     which is also what the reference does — a client with no IME never fires it
     either. The rule the old test stated is unchanged and restated: a 1.12 slot
     benilla neither fires nor finds in a shipped file still raises.

  2. `bindings.xml: root element is <Bindings>, not <Ui>; tolerated`. Every
     `Bindings.xml` in the corpus has that root and `bindings_xml` reads it
     correctly. No longer said.

  3. `bindings.xml: Unknown frame type: Binding`, counted 69. Faithful — the
     reference logs the same line (`0x871124`) for every row while `0x51f400`
     registers them separately — and ours registers them too:
     AlternativeClassicActionBars' 69 bindings all answer `GetBinding`. Now a
     trace, so the terminal keeps it and the panel does not.

  4. `SetOwner: unknown anchor 'BOTTOMRIGHT' on owner 'WorldFrame'`, counted 292.
     The hunt for that caller ended a while ago: it is `Shop_ProcessEntries` in
     the realm's own `Turtle_ShopUI`, off the player's patch chain, and the
     reference accepts an unknown anchorType silently (mode 0, ANCHOR_LEFT), as
     we do. The diagnostic has done its job; it is now host-log-once
     (`Model::warn_host_only_once`) and not retained.

The panel is where someone looks to find what is broken in *their* interface.
A line that is faithful, or names a file they cannot reach, crowds out the ones
that are theirs.

----

A second player sent a video: Options → Nameplates with all six boxes ticked,
the V binding set, and no plates at all — while the overhead *names* drew fine.

`VPlateMode::default().range_sq` was `0.0`, and the gate is
`distance_squared > range_sq`. Zero is not "no cull"; it is "cull everything, at
any distance". `NameplateRange` is a registered CVar with default `"80"`, and a
registered default is not written to `config.toml`, so no `CvarChanged` ever
fired and the field never left its derived value.

This is the trap the paragraph three fields above already documents, and which
`occlusion` and `spread` were fixed by writing their registered defaults into
`Default`; `range_sq` was left behind. It stayed hidden because
`NameConfig::default()` — the overhead names — already carried `80.0 * 80.0`, so
names drew and only plates were missing, which reads as a nameplate-addon
problem rather than an engine one. It could not be reproduced here either:
grom's own `config.toml` carries `NP_NameplateDistance = "62"`, which seeds the
same field through the other observer arm.

`the_plate_range_default_agrees_with_its_registered_cvar` now pins the default
to `registered_pairs()`'s row and pins the plate and the name culls to each
other, since a disagreement between those two is what made this read as
somebody else's bug.

It also answers the other half of his report. The gate `continue`s before the
plate is seated at all, so with `range_sq` at 0 no plate frame ever exists —
and UnitPlates works by adopting the plate frames under WorldFrame. One bug,
both symptoms: "nameplates will not turn on" and "UnitPlates does nothing" are
the same line.

And a packaging answer that comes before both, for UnitPlates specifically:
GitHub's "Download ZIP" unpacks `Redbu11dev/UnitPlates` as `UnitPlates-main`
with `UnitPlates.toc` inside it. The client looks for `<Folder>/<Folder>.toc`,
so the addon never loads — here or on the real client. The harness says it in
as many words: "no manifest under other-addons/UnitPlates-main — is that an
addon folder?". It has to be renamed `UnitPlates`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
This commit is contained in:
2026-10-30 09:02:47 -06:00
co-authored by Claude Opus 5
parent 5751857890
commit 89dc99f4d1
9 changed files with 180 additions and 44 deletions
+7 -1
View File
@@ -434,8 +434,14 @@ pub const SCREEN: crate::layout::Handle = 0;
/// ScrollFrame's three scroll kinds are `+0x32c`/`+0x334`/`+0x33c` (script-name map `0x786c40`).
/// The EditBox's vtable (`0x81c910`) replaces the key and char slots: an EditBox never fires
/// `OnKeyDown`, and fires `OnChar` only from `Insert`, with the inserted text (`0x77c13c`).
const SCRIPT_KINDS: [&str; 42] = [
const SCRIPT_KINDS: [&str; 43] = [
"OnLoad",
// Accepted and never fired, deliberately: the realm's own `FloatingChatFrame.xml` sets it on
// `ChatFrameEditBox`, so refusing it put a red `SetScript: unsupported script` in front of
// every player on every login for a line none of them wrote. The reference registers the slot
// (an IME language switch) and a client with no IME never fires it either, so accepting and
// never calling it is what 1.12 does, not a silent failure of ours.
"OnInputLanguageChanged",
"OnEvent",
"OnUpdate",
// The model pane's two, fired by the tick's model pass (`tick_model_panes`): `OnUpdateModel`
+19
View File
@@ -1452,6 +1452,11 @@ pub(crate) struct Model {
/// The tokens a combat-stats verb has already answered the stand-in for, so the warning it
/// records is one line per VM rather than one per call (`char_stats::with_unit_stats`).
pub(crate) stats_stand_in_warned: std::collections::HashSet<String>,
/// Messages [`Model::warn_host_only_once`] has already put on the host's terminal, so a
/// diagnostic about something the player cannot act on says itself once a session and never
/// reaches the retained log.
pub(crate) host_only_warned: std::collections::HashSet<String>,
pub(crate) inventory_slots: char_stats::InventorySlots,
/// The six bank-bag slots, ids 64..=69, fed from the player descriptor's guids.
pub(crate) bank_bag_slots: char_stats::BankBagSlots,
@@ -1722,6 +1727,19 @@ impl Model {
self.warnings.push(msg);
}
/// [`Self::warn_host_only`], said once a session: the host's terminal gets the first copy and
/// the retained log — the one `/errors` and `BenillaScriptLogFrame` read — gets none.
///
/// For a diagnostic that is **true, settled and not the player's to act on**. The panel is
/// where someone looks to find what is broken in *their* interface, so a line that names a
/// file off their own patch chain, or an engine note the reference logs too, crowds out the
/// lines that are theirs. The terminal and the session log still carry it.
pub(crate) fn warn_host_only_once(&mut self, msg: String) {
if self.host_only_warned.insert(msg.clone()) {
self.warnings.push(msg);
}
}
/// A model pane's subject: the guid its `SetUnit` pinned ([`crate::widget::ModelState::unit_guid`]),
/// else its token re-read, for a pane seated before its unit streamed in.
///
@@ -2347,6 +2365,7 @@ impl Model {
player_combat_stats: None,
pet_combat_stats: None,
stats_stand_in_warned: Default::default(),
host_only_warned: Default::default(),
inventory_slots: Default::default(),
bank_bag_slots: Default::default(),
inventory_alerts: [0; 12],
+22 -19
View File
@@ -559,29 +559,32 @@ fn set_script_on_double_click_is_accepted_because_something_fires_it() {
assert!(s.eval::<bool>("return ran").unwrap(), "…and it FIRED");
}
/// Script names nothing fires still raise; a name leaves this list only when something fires it.
/// A script name nothing resolves still raises rather than being silently accepted.
///
/// A name leaves this test for one of two reasons. `OnHyperlinkEnter`/`Leave` left when
/// `pointer::update_hyperlink_hover` started firing them off the rasterized link spans, and
/// `OnMessageScrollChanged` when the scroll verbs did — something started firing them.
/// `OnInputLanguageChanged` left for the other reason: **the reference's own interface sets it**
/// (`FloatingChatFrame.xml`, on `ChatFrameEditBox`), so refusing it is a fault report about a line
/// the player did not write, and a client with no IME never fires it there either — see
/// `SCRIPT_KINDS`' own comment. What is left is the case neither reason covers: a slot no 1.12
/// resolver has at all.
#[test]
fn the_unfired_script_kinds_still_raise_rather_than_silently_accepting() {
fn an_unresolvable_script_kind_still_raises_rather_than_silently_accepting() {
let s = script();
s.run(r#"Raiser = CreateFrame("EditBox", "RaiserBox")"#)
.unwrap();
for name in [
// A 2.0 secure-frame slot; no 1.12 resolver has it.
"OnAttributeChanged",
// Real 1.12 slots that benilla does not fire. `OnHyperlinkEnter`/`Leave` left this list
// when `pointer::update_hyperlink_hover` started firing them off the rasterized link
// spans, and `OnMessageScrollChanged` when the scroll verbs did — which is the rule this
// test states, not an exception to it.
"OnInputLanguageChanged",
] {
let err = s
.run(&format!(r#"Raiser:SetScript("{name}", function() end)"#))
.unwrap_err();
assert!(
err.to_string().contains(name),
"{name} must raise by name, got {err}"
);
}
// A 2.0 secure-frame slot; no 1.12 resolver has it, and nothing shipped sets it.
let err = s
.run(r#"Raiser:SetScript("OnAttributeChanged", function() end)"#)
.unwrap_err();
assert!(
err.to_string().contains("OnAttributeChanged"),
"it must raise by name, got {err}"
);
// …while the one that left does not raise, and stores nothing anyone can fire.
s.run(r#"Raiser:SetScript("OnInputLanguageChanged", function() end)"#)
.expect("a slot the reference's own FrameXML sets must be accepted");
}
/// Hiding the hovered frame fires its `OnLeave` inside the hide, before its `OnHide` (`0x764ba0`'s
+24 -16
View File
@@ -140,10 +140,15 @@ pub(in crate::script) fn install(lua: &Lua) -> mlua::Result<()> {
// in TurtleWoW's own `Interface\FrameXML\Turtle_ShopUI`, off the
// player's patch chain: not an addon, not ours, nothing the player
// can fix, and our mode-0 fallback already matches the reference. 283
// identical lines a session bury every other warning in the log; the
// first is still the whole diagnostic, and the retained row's `count`
// keeps the true total for `BenillaScriptLogFrame`.
model.record_warning_once(format!(
// identical lines a session bury every other warning in the log.
//
// And `warn_host_only_once`, not `record_warning_once`: the retained
// row showed up in the player's own `/errors` panel as one entry
// counted 292 times, next to the faults that *are* theirs, for a call
// the reference itself accepts silently (see the mode-0 note above)
// from a file off their patch chain. The terminal and the session log
// still carry the full diagnostic, once.
model.warn_host_only_once(format!(
"SetOwner: unknown anchor '{other}' on owner '{owner_name}' \
from {site} (mode 0, ANCHOR_LEFT)"
));
@@ -512,10 +517,15 @@ mod tests {
}
/// The hunt is over, so the repeats are noise: one terminal line per distinct `(anchor, owner,
/// site)`, while the retained log still counts every occurrence. The caller the diagnostic
/// found is `Shop_ProcessEntries` in TurtleWoW's own `Interface\FrameXML\Turtle_ShopUI` — off
/// the player's patch chain, so nothing in the session can stop it calling, and 283 copies of
/// one unfixable warning bury every other line in the log.
/// site)`, and **nothing retained**. The caller the diagnostic found is `Shop_ProcessEntries`
/// in TurtleWoW's own `Interface\FrameXML\Turtle_ShopUI` — off the player's patch chain, so
/// nothing in the session can stop it calling, and 283 copies of one unfixable warning bury
/// every other line in the log.
///
/// It stopped being retained when a second player's `/errors` opened on four entries and one
/// of them was this, counted 292 times, for a call the reference itself accepts silently
/// (the mode-0 note on `SetOwner` above). A panel someone reads to find what is broken in
/// their own interface must not lead with the one line that is not theirs.
#[test]
fn a_repeated_unknown_anchor_reaches_the_host_once_and_the_retained_row_counts_them_all() {
let mut s = UiScript::new().unwrap();
@@ -541,14 +551,12 @@ mod tests {
host[0].contains("on owner 'NoisyHost'") && host[0].contains("ShopProcessEntries"),
"the one line kept must still name the owner and the call site: {host:#?}"
);
let row = s
.diagnostics()
.into_iter()
.find(|d| d.message.contains("unknown anchor 'BOTTOMRIGHT'"))
.expect("the warning is retained for the player's log");
assert_eq!(
row.count, 283,
"…and nothing is lost: the retained row carries the true total"
assert!(
!s.diagnostics()
.into_iter()
.any(|d| d.message.contains("unknown anchor 'BOTTOMRIGHT'")),
"…and the player's retained log takes none of it: the session log has the line, and \
`/errors` is for faults the player can act on"
);
}