From 0f363744450001fec8f4c1c9c0d6daf764c06e06 Mon Sep 17 00:00:00 2001 From: Sam Sung <51686767+samwhosung@users.noreply.github.com> Date: Mon, 28 Sep 2026 23:52:14 +0700 Subject: [PATCH] The core loads the player's own FrameXML.toc in its order, and the boot VM loads no Fonts.xml (#568) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The core now loads the player's own `Interface\FrameXML\FrameXML.toc` off their chain, row by row in its order (`0x6edb90`, from `UI_Init` at `0x48ffed`), instead of benilla's copy of the list, and `benilla.toc` is gone. Order is observable in 1.12.1: event listeners run in registration order, children are kept in creation order, and hit-test ties go to the earlier frame. - The world VM starts bare: `GlobalStrings.lua` and `Fonts.xml` load as the toc's first rows. The boot VM keeps `GlobalStrings.lua` and the emote tokens, and no longer loads `Fonts.xml`, which nothing reads there (#307). - A chain without `FrameXML.toc` builds no stock UI and still loads the layer and addons, as the reference does (`"Couldn't open %s"`, severity 2, return unread); benilla reports it as an error. - Every test kit now loads in the production order, `FrameXML.toc`'s rows then `layer.toc`'s, and a guard fails any kit that loads out of it. Two tests whose premises the stock order disproves are gone. - `scripts/smoke.sh` counts VMs by the VM marker, since `Fonts.xml` now loads once per world VM. Verified: new tests for the load list against the chain toc and a reordered fixture toc, the missing-toc case, and two stock frames on one event running in the toc's order (ExhaustionTick before PlayerFrame on `PLAYER_UPDATE_RESTING`), each failing on main's order. A before/after dump of globals, frames, draw order, event listeners and saved variables differs only in stock-order effects: the reordered listeners and children, draw-order ties between non-overlapping frames, and `UnitPopup`'s quality colours now sharing the live tables. `scripts/gates.sh` and `scripts/smoke.sh` are green, and live before/after runs show 0 errors and identical warnings. Built on macOS; no platform seam touched. Fixes #555 Fixes #307 πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 (1M context) --- crates/benilla-app/assets/ui/benilla.toc | 152 ------ crates/benilla-app/assets/ui/layer.toc | 2 +- crates/benilla-app/src/bindings/commands.rs | 19 +- crates/benilla-app/src/ui_chat/tests.rs | 14 +- crates/benilla-app/src/ui_gossip/mod.rs | 6 +- crates/benilla-app/src/ui_items/drain.rs | 8 +- .../src/ui_script/action_bar_tests.rs | 213 ++++----- crates/benilla-app/src/ui_script/addons.rs | 45 +- crates/benilla-app/src/ui_script/bag_tests.rs | 220 ++++++--- .../src/ui_script/battlefield_tests.rs | 4 +- .../benilla-app/src/ui_script/binder_tests.rs | 12 +- .../benilla-app/src/ui_script/buff_tests.rs | 24 +- .../benilla-app/src/ui_script/cast_tests.rs | 14 +- .../src/ui_script/character_tests.rs | 10 +- .../src/ui_script/chat_options_tests.rs | 26 +- .../src/ui_script/chat_resize_tests.rs | 32 +- .../benilla-app/src/ui_script/chat_tests.rs | 66 ++- .../src/ui_script/cinematic_tests.rs | 6 +- .../src/ui_script/color_picker_tests.rs | 20 +- .../src/ui_script/combat_text_tests.rs | 2 +- .../src/ui_script/combo_frame_tests.rs | 12 +- crates/benilla-app/src/ui_script/content.rs | 27 +- .../benilla-app/src/ui_script/death_tests.rs | 12 +- .../src/ui_script/delete_item_tests.rs | 60 ++- .../src/ui_script/dressup_tests.rs | 104 ++--- .../benilla-app/src/ui_script/duel_tests.rs | 12 +- .../src/ui_script/durability_tests.rs | 35 +- .../src/ui_script/enchant_confirm_tests.rs | 12 +- .../benilla-app/src/ui_script/errors_tests.rs | 24 +- .../benilla-app/src/ui_script/escape_tests.rs | 144 +++--- .../src/ui_script/exp_bar_tests.rs | 16 +- .../benilla-app/src/ui_script/fade_tests.rs | 20 +- .../src/ui_script/faux_scroll_tests.rs | 4 +- .../src/ui_script/game_menu_tests.rs | 185 ++++---- .../src/ui_script/group_loot_tests.rs | 152 +++--- .../src/ui_script/help_frame_tests.rs | 25 +- .../src/ui_script/honor_frame_tests.rs | 10 +- .../src/ui_script/inspect_tests.rs | 17 +- .../src/ui_script/instance_tests.rs | 16 +- .../src/ui_script/keybindings_tests.rs | 17 +- .../benilla-app/src/ui_script/layer_tests.rs | 9 +- crates/benilla-app/src/ui_script/lifecycle.rs | 56 +-- .../benilla-app/src/ui_script/loot_tests.rs | 108 +++-- .../benilla-app/src/ui_script/macro_tests.rs | 11 +- crates/benilla-app/src/ui_script/manifest.rs | 360 ++++++++------- .../src/ui_script/merchant_tests.rs | 154 ++++--- .../src/ui_script/micro_menu_tests.rs | 16 +- .../src/ui_script/minimap_tests.rs | 6 +- .../src/ui_script/mirror_timer_tests.rs | 6 +- crates/benilla-app/src/ui_script/mod.rs | 2 +- .../src/ui_script/multibar_stance_tests.rs | 340 ++++---------- .../src/ui_script/options_tests.rs | 177 +++---- .../src/ui_script/panel_template_tests.rs | 20 +- .../benilla-app/src/ui_script/panel_tests.rs | 190 ++++---- .../src/ui_script/perf_bar_tests.rs | 32 +- .../src/ui_script/pet_bar_tests.rs | 38 +- .../src/ui_script/pet_frame_tests.rs | 6 +- .../src/ui_script/pet_stable_tests.rs | 6 +- .../src/ui_script/petition_tests.rs | 26 +- .../src/ui_script/quest_share_tests.rs | 12 +- .../benilla-app/src/ui_script/quest_tests.rs | 106 ++--- .../src/ui_script/quest_timer_tests.rs | 9 +- .../src/ui_script/questlog_tests.rs | 436 ++++++++---------- .../benilla-app/src/ui_script/reference_ui.rs | 130 ++++-- .../src/ui_script/screenshot_tests.rs | 10 +- .../src/ui_script/shipped_xml_tests.rs | 95 +--- .../src/ui_script/spellbook_tests.rs | 129 +++--- .../src/ui_script/static_popup_tests.rs | 14 +- .../benilla-app/src/ui_script/summon_tests.rs | 12 +- .../benilla-app/src/ui_script/tabard_tests.rs | 16 +- .../src/ui_script/talent_wipe_tests.rs | 12 +- .../src/ui_script/target_aura_tests.rs | 22 +- .../benilla-app/src/ui_script/taxi_tests.rs | 17 +- crates/benilla-app/src/ui_script/test_ui.rs | 374 ++++++++++----- .../src/ui_script/tooltip_anchor_tests.rs | 103 ++--- .../src/ui_script/tooltip_compare_tests.rs | 25 +- .../src/ui_script/tot_frame_tests.rs | 18 +- .../src/ui_script/trainer_tests.rs | 36 +- .../src/ui_script/tutorial_tests.rs | 4 +- .../src/ui_script/ui_menu_tests.rs | 16 +- .../src/ui_script/uiparent_tests.rs | 2 +- .../src/ui_script/unit_frame_tests.rs | 116 ++--- .../src/ui_script/unit_popup_tests.rs | 58 +-- .../src/ui_script/world_entry_tests.rs | 4 +- .../src/ui_script/world_map_tests.rs | 16 +- .../src/ui_script/world_state_tests.rs | 14 +- .../src/ui_script/zone_text_tests.rs | 4 +- crates/benilla-app/tests/auction_frame.rs | 12 +- crates/benilla-app/tests/character_stats.rs | 12 +- crates/benilla-app/tests/common/mod.rs | 95 +++- .../tests/create_frame_template.rs | 20 +- crates/benilla-app/tests/item_text_frame.rs | 16 +- crates/benilla-app/tests/mail_frame.rs | 18 +- crates/benilla-app/tests/talent_frame.rs | 16 +- crates/benilla-app/tests/trade_frame.rs | 12 +- crates/benilla-app/tests/tradeskill_frame.rs | 24 +- crates/benilla-ui/src/script/mod.rs | 10 - scripts/smoke.sh | 11 +- 98 files changed, 2687 insertions(+), 2731 deletions(-) delete mode 100644 crates/benilla-app/assets/ui/benilla.toc diff --git a/crates/benilla-app/assets/ui/benilla.toc b/crates/benilla-app/assets/ui/benilla.toc deleted file mode 100644 index 8e1bad2e..00000000 --- a/crates/benilla-app/assets/ui/benilla.toc +++ /dev/null @@ -1,152 +0,0 @@ -# The core interface, in load order: the reference's own `FrameXML.toc` files, off the player's -# patch chain. Entry 0, Fonts.xml, loads alone into every boot VM, from Startup on; the rest loads -# on entering the world, then benilla's layer (`layer.toc`), then the third-party addons. -# The font objects thus exist before the login screen; the reference loads Fonts.xml with the -# rest of FrameXML. -# `inherits=`, `parent=` and a named `relativeTo=` resolve only against names declared above; a -# missing one only warns (the template is skipped, the parent falls back to the enclosing frame). -# A later Lua global or template replaces an earlier one; a named frame publishes its global -# only while the name is free. -# A stock `.xml` that does not `