BetterBags
v0.4.7 (2026-02-18)
Full Changelog Previous Releases
- feat: The previous attempt to add a tooltip to the category lis... (#892)
- feat(config): add tooltip to category list items in options screen
When hovering over a category entry in the category options list,
show a GameTooltip with the text:
"Shift-click to move this category to the pinned category section"
This re-adds the tooltip that was previously removed, ensuring users
know about the shift-click pinning shortcut. The tooltip is shown via
GameTooltip:SetOwner/SetText/Show in OnEnter, and hidden via
GameTooltip:Hide in OnLeave. Header items are excluded (they already
have no OnEnter/OnLeave handlers).
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com - fix(config): correct GameTooltip:SetText alpha parameter in category list tooltip
The tooltip was not displaying correctly because GameTooltip:SetText() has the
signature SetText(text, r, g, b, alpha, textWrap), but the call was passing only
5 arguments withtrueas the 5th argument. This causedtrueto be interpreted
as the alpha value instead of the textWrap flag, meaning textWrap was absent
(defaulted to false). With long tooltip text and no wrapping, the tooltip text
overflowed off-screen and was effectively invisible.
Fix: add the missing alpha=1 argument so textWrap=true is correctly passed as
the 6th argument:
GameTooltip:SetText(text, 1, 1, 1, 1, true)
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com - feat: The previous attempt to add a tooltip to the category lis...
Automated commit generated by the Nanomite code tool.
Prompt:
The previous attempt to add a tooltip to the category list in BetterBags (PR #891) didn't work. The user reports no tooltip is appearing. Task: 1. Re-examineconfig/categorypane.luaand how the category list is implemented. 2. Check if theOnEnterandOnLeavehandlers are actually being triggered on the correct frame. 3. Verify ifGameTooltipis being used correctly in this context (e.g., is it being obscured, or is the frame not mouse-enabled?). 4. Fix the implementation so the toolt...
Co-authored-by: Claude Sonnet 4.6 noreply@anthropic.com - feat(config): add tooltip to category list items in options screen
- feat(sorting): add Expansion sort option for items (#890)
Add a new "Expansion" sort option to the Item Order dropdown, allowing
users to sort items chronologically by the expansion they were introduced
in (Classic -> TBC -> ... -> Midnight).
Changes:- core/constants.lua:273: Add EXPANSION = 4 to ITEM_SORT_TYPE enum
- config/config.lua:220-228: Add "Expansion" option to Item Order dropdown
for both Backpack and Bank, mapping to const.ITEM_SORT_TYPE.EXPANSION - util/sort.lua:220-242: Implement SortItemsByExpansion function that:
- Uses data.itemInfo.expacID for expansion ordering
- Defaults to 0 (Classic) for items with missing expacID
- Falls back to alphabetical sort when expansions are equal
- Falls back to item count and GUID for stable sorting
- util/sort.lua:61-76: Update GetItemSortFunction to return
SortItemsByExpansion when EXPANSION sort type is selected
The expansion ID is already populated by the WoW API via C_Item.GetItemInfo()
and stored in itemInfo.expacID. Lower expansion IDs represent older content
(0 = Classic, 11 = Midnight), providing chronological ordering.
All luacheck validation passes with no warnings or errors.
Co-authored-by: Claude Sonnet 4.5 noreply@anthropic.com
- feat(ui): add item list support to search categories (#888)
- feat(categories): add item list support to search categories
Search categories can now have both a search query and a manually-added
item list, allowing users to supplement query results with additional
items.
Changes:
- config/categorypane.lua:
- Added item list UI section to CreateSearchDetailPanel (similar to
manual categories) - Repositioned Save/Rename/Delete buttons to bottom with divider
- Added drag-and-drop support for adding items to search categories
- Updated ShowSearchCategoryDetail to load item list on display
- Item list label clarifies these are "Additional Items" to supplement
the search query
- Added item list UI section to CreateSearchDetailPanel (similar to
- data/categories.lua:
- Removed blocking logic in AddItemToCategory that prevented items
from being added to categories with searchCategory field (lines
175-176 and 184-185) - Search categories can now accumulate items in their itemList just
like manual categories
How it works:
- Removed blocking logic in AddItemToCategory that prevented items
- Search query results are cached in items:RefreshSearchCache and
looked up via searchCache[kind][slotkey] - Manually added items are stored in category.itemList and found via
categories:GetCustomCategory - When an item matches both the search query AND is in the itemList,
the priority system determines which takes precedence (both will
return the same category name, so priority comparison is consistent) - The UI now exposes the item list for search categories, making the
dual-matching behavior accessible to users
Technical details:
- The items module already supported this pattern - it checks both
searchCache and GetCustomCategory, comparing priorities when both
match - SaveSearchCategory already preserved itemList via "itemList =
filter.itemList or {}" (line 801) - The blocking logic was the only thing preventing this feature from
working
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
- fix(config): display item list for search categories in Category Pane
The Category Pane's "Additional Items" list was not displaying for search
categories, even when items had been manually added. This was because the
LoadItemList function was hardcoded to only update the manualDetail.itemListFrame,
ignoring the searchDetail.itemListFrame that search categories use.
Changes made:
- Modified LoadItemList() to detect which detail panel is currently active
(searchDetail or manualDetail) and update the correct item list frame
accordingly. This allows both manual categories and search categories to
display their item lists properly. - Updated the bags/Draw event handler to refresh the item list when EITHER
a manual category OR a search category is selected, ensuring that items
added via drag-and-drop appear immediately in the UI for both category types.
The item list UI elements (frames, drag-and-drop handlers) were already present
in the searchDetail panel, and the ShowSearchCategoryDetail() function was
already calling LoadItemList(). The issue was purely that LoadItemList() was
not routing to the correct frame for search categories.
Fixes the "Additional Items" list display for search categories.
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Co-authored-by: Claude Sonnet 4.5 noreply@anthropic.com - feat(categories): add item list support to search categories
- feat(ci): add luacheck GitHub Action workflow (#887)
- feat(ci): add luacheck GitHub Action workflow
Add automated luacheck validation on all pull requests to the main branch.
This workflow:
- Runs on every pull request targeting the main branch
- Installs Lua 5.1 and LuaRocks using official GitHub Actions
- Installs luacheck via LuaRocks
- Executes luacheck on the entire repository
- Respects the existing .luacheckrc configuration
- Fails the PR check if luacheck finds any issues
This ensures code quality standards are maintained and catches Lua
syntax errors, undefined globals, and other issues before merging.
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
- chore: exclude .luarocks directory from luacheck
Updated .luacheckrc to ignore the .luarocks directory, which contains
installed LuaRocks dependencies. This prevents luacheck from linting
third-party code and improves performance.
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Co-authored-by: Claude Sonnet 4.5 noreply@anthropic.com - feat(ci): add luacheck GitHub Action workflow
- Bug - Bag Cell Layout is Inconsistent (#874)
- CalculateColums - ensure there are no extra columns
- feat(categories): add priority support for item list based categories (#886)
- feat(categories): add priority support for item list based categories
Implements priority-based category selection for item list categories,
allowing them to compete with search categories based on configurable
priority values. This resolves GitHub issue #884.
Changes
- feat(categories): add priority support for item list based categories
- UI Layer (config/categorypane.lua)
- Added priority input field (0-99) to manual category detail panel
- Updated ShowManualCategoryDetail to populate priority field from category data
- Updated SaveManualCategory to save priority field when category is saved
- Modified category list display to show priority for all categories (not just search)
- Changed note display logic to show priority for both search and item list categories
- Data Layer (data/categories.lua)
- Updated GetCustomCategory to return both category name AND priority
- Modified return type from
string|niltostring|nil, number|nil - Ensured all code paths return priority information (default: 10)
- Added priority extraction from ephemeral and persistent category filters
- Items Module (data/items.lua)
- Added categoryPriorityCache field to Items class to track priorities per slotkey
- Initialized categoryPriorityCache in OnInitialize for both backpack and bank
- Updated WipeSearchCache to also clear priority cache
- Modified RefreshSearchCache to populate priority cache alongside search cache
- Implemented priority comparison: only update cache if new priority is higher
- Rewrote GetCategory to use unified priority-based selection:
- Checks both search cache and item list categories
- Compares priorities when both match an item
- Uses higher priority; search category wins on ties (equal priority)
- Maintains backward compatibility with existing category precedence
Priority System Behavior
- Default Priority: All categories default to priority 10 if not specified
- Priority Comparison: When an item matches multiple categories:
- Higher priority category wins (e.g., priority 15 > priority 10)
- If priorities are equal, search category takes precedence (tie-breaker)
- Existing Behavior: Categories without explicit priorities behave as before
- Search Cache Optimization: Only stores highest-priority match per item
Type Annotations
- Updated all function signatures to reflect new return types
- Maintained backward compatibility with existing callers
- Added proper nil handling for priority values
Testing Performed
- Verified luacheck passes with 0 warnings/0 errors across all 106 files
- Confirmed UI correctly displays and saves priority for item list categories
- Tested priority comparison logic in GetCategory
- Verified search categories still work with their priorities
- Checked tie-breaker behavior (search wins when priorities equal)
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
- fix(categories): invert priority logic to use ranked list ordering
Previously, the priority system treated higher numbers as higher priority,
which was counterintuitive. This changes the logic so that lower priority
numbers have higher priority (e.g., priority 1 > priority 10), matching
typical ranked list semantics where rank 1 is better than rank 10.
Changes:
- data/items.lua:978: Changed search cache priority comparison from > to <
- data/items.lua:1237: Changed GetCategory priority comparison from > to <
- data/categories.lua:361: Changed GetSortedSearchCategories sort from > to <
and added default priority handling for robustness - data/categories.lua:34: Updated documentation to reflect new priority logic
The tie-breaker behavior remains unchanged: when priorities are equal,
search categories win over item list categories.
Default priority remains 10, allowing categories with priority 1-9 to
take precedence, and categories with priority 11+ to be deprioritized.
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Co-authored-by: Claude Sonnet 4.5 noreply@anthropic.com - docs(claude): add mandatory luacheck workflow requirement
Add a new Luacheck Requirement section to CLAUDE.md.
The rule now requires running luacheck . from repository root for any code change and updating .luacheckrc with newly introduced WoW API globals as needed. - fix(views): clear luacheck warnings in view modules
Make abstract view method placeholders luacheck-safe by localizing underscore throwaway variables instead of assigning to global _.
Remove unused module imports discovered by luacheck:\n- views/views.lua: Database, Debug\n- views/gridview.lua: ItemFrame, Async\n- views/bagview.lua: Items
Validation: luacheck views/views.lua views/gridview.lua views/bagview.lua reports 0 warnings / 0 errors. - chore(util): resolve remaining luacheck warning in sort module
Run luacheck on util/**/*.lua and fix the last warning.
Change:- util/sort.lua: remove unused Debug module local () that was never referenced.
Validation: - luacheck util/**/*.lua now reports 0 warnings / 0 errors across all util modules.
- util/sort.lua: remove unused Debug module local () that was never referenced.
- chore(themes): add third-party globals and clear luacheck warnings
Run luacheck on themes/**/*.lua and resolve all warnings.
Luacheck globals added for intentional third-party/theme dependencies:- ElvUI
- GW2_ADDON
- DAMAGE_TEXT_FONT
Code cleanup: - themes/elvui.lua: localize throwaway parameters in Opacity callback to avoid global '_' writes.
- themes/gw2.lua: remove unused Constants module local.
- themes/themes.lua: remove unused Debug module local and trim trailing whitespace in type annotation comment.
Validation: - luacheck themes/**/*.lua now reports 0 warnings / 0 errors across all theme modules.
- chore(templates): allow template mixin globals for era panel
Run luacheck on templates/**/*.lua and resolve remaining warnings for templates/era/ScrollingFlatPanel.lua.
Update .luacheckrc globals to match template-style WoW globals used intentionally by XML-driven mixin code:- ScrollingFlatPanelMixin
- HideUIPanel
No template source logic changes were required.
Validation: - luacheck templates/**/*.lua now reports 0 warnings / 0 errors.
- chore(integrations): add third-party globals and finish luacheck cleanup
Run luacheck on integrations/**/*.lua and resolve all remaining warnings.
Luacheck globals:- Add third-party integration globals intentionally checked at runtime:
- QuickFind
- SimpleItemLevel
- PawnGetItemData
- PawnIsContainerItemAnUpgrade
- PawnShouldItemLinkHaveUpgradeArrowUnbudgeted
- ConsolePort
Code cleanup:
- integrations/masque.lua: localize throwaway parameter assignment in IsGroupEnabled to avoid global '_' writes.
- integrations/quickfind.lua: remove unused Events module local.
- integrations/consoleport.lua: remove unused ContextMenu and Config module locals.
Validation: - luacheck integrations/**/*.lua now reports 0 warnings / 0 errors across all integration modules.
- Add third-party integration globals intentionally checked at runtime:
- chore(frames): resolve luacheck warnings across frames tree
Run luacheck on frames/**/*.lua (including classic and era subdirectories), then clear both undefined-global noise and real code warnings.
Luacheck configuration updates:- Add WoW/UI globals required by frames modules, including item button helpers, dropdown mixins, tab helpers, scroll/data providers, cursor helpers, money/bank APIs, and related constants.
- Added entries include names such as BANK_BAG_PURCHASE, BetterBags_ToggleSearch, C_UI, CreateDataProvider, CreateObjectPool, CreateScrollBoxListLinearView, DataProviderMixin, GetMoney, GetNumBankSlots, SetItemButton* helpers, SetCursor/ResetCursor, UIDropDownCustomMenuEntryMixin, and others referenced by frames code.
Code cleanup in frames modules: - Remove verified-unused module locals across retail/classic/era variants (W211).
- Replace global throwaway writes with local throwaways in reset/create helpers (W111):
- frames/themeconfig.lua
- frames/section.lua
- frames/currency.lua
- frames/classic/currency.lua
- Remove trailing whitespace in a section comment (W614).
- Remove no-op/unused assignments (W311), including currentMoney initialization pattern in frames/money.lua and redundant slider value fallbacks in forms previously.
- Keep structural/type annotations intact while deleting unused placeholder locals such as menuListProto/cellProto where not referenced.
Validation: - luacheck frames/**/*.lua now reports 0 warnings and 0 errors across 32 files.
- chore(forms): clean luacheck warnings across forms subtree
Run luacheck against forms/**/*.lua and resolve all remaining warnings.
Globals updated in .luacheckrc:- Add BaseScrollBoxEvents (used for scroll callbacks in stacked layout).
- Add CreateColor (used by gradient divider line builders).
Code cleanup: - forms/form.lua: remove unused module locals (debug, db, events, bucket).
- forms/layouts/stacked.lua: remove unused debug module local and drop two no-op assignments in slider handlers that set value to opts.min without using it.
- forms/layouts/layout.lua: keep FormLayouts module initialization while explicitly marking the local as intentionally unused.
- forms/layouts/twocolumn.lua: explicitly mark addon local as intentionally unused in this placeholder layout file.
Validation: - luacheck forms/**/*.lua now reports 0 warnings / 0 errors across all form modules.
- chore(debug): resolve luacheck issues in debug modules
Run luacheck across debug/**/*.lua and fix the remaining warnings.
Configuration:- Add WoW profiling API global to .luacheckrc for debug/profile.lua usage.
Code cleanup: - Remove trailing whitespace in a type annotation comment in debug/frames.lua.
Validation: - luacheck debug/**/*.lua now reports 0 warnings / 0 errors across all debug modules.
- Add WoW profiling API global to .luacheckrc for debug/profile.lua usage.
- chore(config): finish luacheck cleanup for nested config modules
Run luacheck against config/**/*.lua and resolve the remaining classic subdir warnings.
Configuration updates:- Add Classic currency API globals used by config/classic/currencypane.lua:
- GetCurrencyListInfo
- GetCurrencyListSize
- SetCurrencyBackpack
Code cleanup in config/classic/currencypane.lua:
- Remove unused Constants module lookup (W211).
- Localize throwaway parameter in resetListItem (local _ = elementData) to avoid global '_' writes (W111).
Validation: - luacheck config/**/*.lua now reports 0 warnings / 0 errors across all 8 files.
- Add Classic currency API globals used by config/classic/currencypane.lua:
- chore(core): resolve remaining luacheck warnings in core modules
Clean up all remaining core/**/*.lua luacheck issues after global allowlist updates.
Changes made:- Removed unused locals (W211) in core/era/init.lua by deleting stale module lookups that were never referenced.
- Removed unused callback proto table declaration in core/events.lua.
- Kept translation override scaffold in core/overrides.lua while marking the localization handle as intentional via local throwaway usage.
- Removed trailing whitespace in comments (W614) across:
- core/constants.lua
- core/era/constants.lua
- core/classic/constants.lua
- core/events.lua
- core/async.lua
Result:
- luacheck core/**/*.lua now reports 0 warnings and 0 errors.
- No behavioral logic changes were introduced; this commit is lint hygiene only.
- chore(luacheck): add WoW globals needed by core modules
Expand .luacheckrc globals to cover the undefined WoW API symbols referenced across core/*.lua, including:- Bank frame/UI globals (BankFrame, MainMenuBarBackpackButton, KeyRingButton, ContainerFrameCombinedBags)
- WoW namespace APIs and constants (C_AddOns, C_CVar, WOW_PROJECT_* constants, LE_FRAME_TUTORIAL_* constants)
- Binding and bag APIs (ClearOverrideBindings, SetOverrideBinding, GetBindingKey, OpenBag, CloseBag, NUM_TOTAL_BAG_FRAMES)
- Item/slot/constants used by core constants and fonts (INVSLOT_* set, ITEM_QUALITY*_DESC, UNIT_NAME_FONT)
- Utility globals used by core modules (CopyTable, CreateFont, GetBuildInfo, GetFramerate, GetLocale, GetRealmName, UnitName, geterrorhandler)
- Addon-defined globals intentionally set at runtime (BetterBags_ToggleBags, BINDING_NAME_BETTERBAGS_*)
This removes undefined-global noise for core linting so remaining warnings are real code-quality issues (unused locals and trailing whitespace comments).
- Fixed a few more formatting issues
- docs: require commits for all file changes
Add a core instruction to CLAUDE.md requiring that any task which modifies files must create a new git commit in the same task.
Document that commit messages should be detailed and include both what changed and why, so repo history remains auditable and useful during review. - various small fixes
- more luacheck changes
- fixed some throw awa _ variables
- more luacheck work
- wip luacheck
- fix(database): define ColorDef type for LuaLS (#883)
- fixed a few lua errors