Skip to content

Docs: add The Burning Crusade Anniversary to keyring documentation (#1359) - #1370

Merged
Cidan merged 1 commit into
mainfrom
docs/keyring-tbc-anniversary-1359
Nov 19, 2026
Merged

Cidan merged 1 commit into
mainfrom
docs/keyring-tbc-anniversary-1359

Conversation

@Cidan

@Cidan Cidan commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Fixes #1359.

Problem

BetterBags_TBC.toc loads core/era/constants.lua, which adds Enum.BagIndex.Keyring (-2) to const.BACKPACK_BAGS and const.BACKPACK_ONLY_BAGS. No keyring check inspects the running client; each keyring check tests the bag ID and const.BACKPACK_BAGS. On The Burning Crusade Anniversary, BetterBags therefore reads the keyring with the backpack, reads only the slots opened by GetKeyRingSize(), excludes keyring slots from free space, labels the keyring "#6: Keyring" in Show Bags, and orders the keyring after every bag, matching Classic Era behavior. Previously, the rules files, code comments, and README files named only Classic Era and WoW: Forever, and the IncludeBagInFreeSpace comment named only WoW: Forever.

Evidence

Blizzard's TBC Anniversary UI source (branch classic_anniversary, 2.5.6.70577) defines the same keyring as Classic Era:

  • Enum.BagIndex.Keyring is -2 (BagIndexConstantsDocumentation.lua), and KEYRING_CONTAINER equals Enum.BagIndex.Keyring (Blizzard_FrameXMLBase/Classic/Constants.lua).
  • Blizzard_MainMenuBarBagButtons/Classic/MainMenuBarBagButtons.lua defines GetKeyRingSize() identically to Classic Era and loads at startup on every classic game type.
  • ContainerFrame_GetContainerNumSlots (Blizzard_UIPanels_Game/Classic/ContainerFrame_Shared.lua) returns GetKeyRingSize() for the keyring.

Changes

Documentation and code comments only; no code behavior changes.

File Change
.claude/rules/keyring.md Add TBC Anniversary to the introduction, section 1, and the section 2 coverage note; record that no keyring check inspects the running client and that BetterBags does not call IsKeyRingEnabled() on Classic Era or TBC Anniversary, so a keyring with zero slots yields zero slots
.claude/rules/bag-drop-zone.md Document the keyring for keys on TBC Anniversary
.claude/rules/item-drawing.md Extend the open in-game check on empty keyring slots to TBC Anniversary
data/items.lua Update comments on isBackpackKeyring, items:GetBagName, IncludeBagInFreeSpace, and items:Harvest
util/sort.lua Update the comment on slotOrder
core/constants.lua Update the comment describing the WoW: Forever keyring
spec/helpers/wow_mocks.lua Add TBC Anniversary to the source the GetKeyRingSize mock cites
README.md, data/README.md, util/README.md Add TBC Anniversary to the keyring client lists

Testing

No tests were added because code behavior is unchanged and the existing Classic Era keyring specs (keyring -2 with bags 0-4) exercise TBC Anniversary's bag IDs. luacheck and the full test suite pass.

…1359)

Issue #1359: BetterBags_TBC.toc loads core/era/constants.lua, which adds Enum.BagIndex.Keyring (-2)
to const.BACKPACK_BAGS and const.BACKPACK_ONLY_BAGS. No keyring check inspects the running client;
each keyring check tests the bag ID and const.BACKPACK_BAGS. On The Burning Crusade Anniversary,
BetterBags therefore reads the keyring with the backpack, reads only the slots opened by
GetKeyRingSize(), excludes keyring slots from free space, labels the keyring "#6: Keyring" in
Show Bags, and orders the keyring after every bag, matching Classic Era behavior. Previously, the
rules files, code comments, and README files named only Classic Era and WoW: Forever, and one
comment named only WoW: Forever.

Blizzard's TBC Anniversary UI source (branch classic_anniversary, 2.5.6.70577) defines the same
keyring as Classic Era: Enum.BagIndex.Keyring is -2, KEYRING_CONTAINER equals
Enum.BagIndex.Keyring, Blizzard_MainMenuBarBagButtons/Classic/MainMenuBarBagButtons.lua defines
GetKeyRingSize() identically to Classic Era and loads at startup on every classic game type, and
ContainerFrame_GetContainerNumSlots returns GetKeyRingSize() for the keyring.

This change edits documentation and code comments only; no code behavior changes:

- .claude/rules/keyring.md: Add TBC Anniversary to the introduction, section 1, and the section 2
  coverage note. Record that no keyring check inspects the running client, and that on Classic Era
  and TBC Anniversary BetterBags does not call IsKeyRingEnabled() (unlike Blizzard's keyring
  button), so a keyring with zero slots yields zero slots.
- .claude/rules/bag-drop-zone.md: Document the keyring for keys on TBC Anniversary.
- .claude/rules/item-drawing.md: Extend the open in-game check on whether empty keyring slots
  display the key glyph to TBC Anniversary alongside Classic Era.
- Code comments: Update comments in data/items.lua (isBackpackKeyring, items:GetBagName,
  IncludeBagInFreeSpace, items:Harvest), util/sort.lua (slotOrder), core/constants.lua (the
  WoW: Forever keyring), and spec/helpers/wow_mocks.lua (the source reference for the
  GetKeyRingSize mock).
- README.md, data/README.md, util/README.md: Update the keyring client list in each file.

No tests were added because code behavior is unchanged and the existing Classic Era keyring specs
(keyring -2 with bags 0-4) exercise TBC Anniversary's bag IDs. luacheck and the full test suite
pass.
@Cidan
Cidan merged commit 9772293 into main Nov 19, 2026
4 checks passed
@Cidan
Cidan deleted the docs/keyring-tbc-anniversary-1359 branch November 19, 2026 05:18
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.

.claude/rules/keyring.md and data/items.lua comments omit The Burning Crusade Anniversary

1 participant