From 4edc69e29eeb34d6f26086b45775a90e0544eef9 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 14 Aug 2026 18:56:25 +0700 Subject: [PATCH] case-folded slots, a chat-type table, and a seated spellbook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GetInventorySlotInfo folds case the way the client does, and gains the twelve bag-slot rows the shipped data really carries - ChatTypeGroup exists for addons that register their own chat types at file scope — one missing table was taking five addons down - GetChannelList answers in join order, shaped by the addons that consume it, and the harness's `--why` can now open any demand count - the survey seats a spellbook, and the shapeshift bar's shelf art exists hidden, both exposing paths an empty fixture could never reach Co-Authored-By: Claude Fable 5 --- crates/benilla-app/assets/ui/ChatFrame.xml | 30 +++++ crates/benilla-app/assets/ui/PartyFrame.xml | 22 ++++ crates/benilla-app/assets/ui/StanceBar.xml | 39 ++++++ crates/benilla-app/examples/addon_harness.rs | 31 +++++ crates/benilla-app/src/addon_harness/mod.rs | 73 +++++++++++ crates/benilla-ui/src/script/channel.rs | 37 ++++++ crates/benilla-ui/src/script/char_stats.rs | 122 +++++++++++++----- crates/benilla-ui/src/script/tests/channel.rs | 51 ++++++++ .../src/script/tests/reference_surface.rs | 97 ++++++++++++++ 9 files changed, 471 insertions(+), 31 deletions(-) diff --git a/crates/benilla-app/assets/ui/ChatFrame.xml b/crates/benilla-app/assets/ui/ChatFrame.xml index 42da4dc5..b28ae9fa 100644 --- a/crates/benilla-app/assets/ui/ChatFrame.xml +++ b/crates/benilla-app/assets/ui/ChatFrame.xml @@ -47,6 +47,36 @@ -- where the reference registers them here. That divergence is recorded in `slash.rs`. SlashCmdList = {} + -- ── ChatTypeGroup / OtherMenuChatTypeGroups — declared, and deliberately EMPTY ──────── + -- The reference builds `ChatTypeGroup` at ChatFrame.lua l.115-348: 68 entries mapping a + -- chat TYPE to the list of `CHAT_MSG_*` events that belong to it, which its + -- `ChatFrame_RegisterForMessages` walks to register events on a chat window. + -- + -- Declared here for the same reason `SlashCmdList` above is: an addon REGISTERS ITS OWN + -- chat type at file scope, and a missing table is not a missing feature — it is + -- `attempt to index global 'ChatTypeGroup'` on the addon's very first chunk. CT_RaidAssist + -- does exactly that three lines apart (`CT_RaidAssist.lua:59` assigns + -- `ChatTypeGroup["CTRAID"]`, `:63` tinserts into `OtherMenuChatTypeGroups`), and it dies + -- there — taking `CT_RA_OnEvent` with it, which is why FOUR MORE corpus addons + -- (CT_RABossMods, FixCTGroups, FuBar_CTRaid, SmartRes) die on that function being nil. + -- One missing table, five addons. + -- + -- **EMPTY, not populated, and that is the honest shape rather than a shortcut.** Two + -- reasons, in order of weight: + -- · The 68 entries are 233 lines of the reference's own Lua. We RUN the reference's + -- files where we can (1234) and write our own where we cannot; what we do not do is + -- paste its source into a repo that mirrors publicly. + -- · Nothing would read them. Measured across the 218-addon corpus with `grep -a`: + -- CT_RaidAssist is the ONLY addon that touches either table, and it only WRITES. Not + -- one addon reads a group out. + -- + -- The divergence that leaves, stated rather than discovered: our chat frames do not + -- register through this table at all — `ui_chat` routes host-side, the same split + -- `SlashCmdList` records above. So an addon that adds a group gets no routing from it. + -- That is the `ChatFrame_OnEvent` architecture question, not this table's. + ChatTypeGroup = {} + OtherMenuChatTypeGroups = {} + -- ── ChatTypeInfo — the per-chat-type table addons read colors out of ────────────────── -- Declared HERE because the 1.12 client declares it at the top of ChatFrame.lua, and it -- is an ADDON-FACING table before it is ours: `local info = ChatTypeInfo["SAY"]` then diff --git a/crates/benilla-app/assets/ui/PartyFrame.xml b/crates/benilla-app/assets/ui/PartyFrame.xml index 7fe515df..393967bd 100644 --- a/crates/benilla-app/assets/ui/PartyFrame.xml +++ b/crates/benilla-app/assets/ui/PartyFrame.xml @@ -30,6 +30,28 @@ real job is the timeout/override/escape paths. -->