OK, we have issues either with the DisabledItemComboBox or with how we use it.
The SkillBuffFrame has a "skillSelect" field which is-a AutoFilterComboBox which is-a DisabledItemsComboBox.
That is created when the frame is created. It is initialized with model = KoLConstants.usableSkills.
You can use the Skill Type combo box which will then use setModel to point it to KoLConstants.summoningSkills, KoLConstants.remedySkills, and so on.
Those are all LockableListModel<UseSkillRequest> and are cleared whenever the session is refreshed. The CharSheet will refill them, learning skills will add to them, and so on. When a new character is logged in, the lists are cleared and repopulated with the new character's skills.
I added a "dumpDisabledItems" method to the DisabledItemsComboBox and to the SkillBuffFrame and added "test dump_disabled_items" to the gCLI.
I am logged in with my main who has used her summoning skills for the day.
I do "test dump_disabled_items" and the following appears on stdout:
Code:
Summon Confiscated Things (5 mp)
Summon Carrot (11 mp)
Grab a Cold One (30 mp)
Summon Geeky Gifts (5 mp)
Summon Holiday Fun! (11 mp)
Summon Rad Libs (2 mp)
Advanced Cocktailcrafting (10 mp)
Advanced Saucecrafting (10 mp)
Spaghetti Breakfast (30 mp)
Summon Smithsness (2 mp)
Pastamastery (10 mp)
-------
I switch to "Remedies" on the SkillBuffFrame and do it again.
Code:
Summon Confiscated Things (5 mp)
Summon Carrot (11 mp)
Grab a Cold One (30 mp)
Summon Geeky Gifts (5 mp)
Summon Holiday Fun! (11 mp)
Summon Rad Libs (2 mp)
Advanced Cocktailcrafting (10 mp)
Advanced Saucecrafting (10 mp)
Spaghetti Breakfast (30 mp)
Summon Smithsness (2 mp)
Pastamastery (10 mp)
-------
(Note that none of those items are actually in that ListModel).
I log out and call up the gCLI (without restarting KoLmafia), and do it again:
Code:
Summon Confiscated Things (5 mp)
Summon Carrot (11 mp)
Grab a Cold One (30 mp)
Summon Geeky Gifts (5 mp)
Summon Holiday Fun! (11 mp)
Summon Rad Libs (2 mp)
Advanced Cocktailcrafting (10 mp)
Advanced Saucecrafting (10 mp)
Spaghetti Breakfast (30 mp)
Summon Smithsness (2 mp)
Pastamastery (10 mp)
-------
I log in as a different character (without restarting KoLmafia) and do it again:
Code:
Summon Confiscated Things (5 mp)
Summon Carrot (11 mp)
Grab a Cold One (30 mp)
Summon Geeky Gifts (5 mp)
Summon Holiday Fun! (11 mp)
Summon Rad Libs (2 mp)
Advanced Cocktailcrafting (10 mp)
Advanced Saucecrafting (10 mp)
Spaghetti Breakfast (30 mp)
Summon Smithsness (2 mp)
Pastamastery (10 mp)
-------
So this is the root cause of the problem: the disabledItems HashSet is not cleared when the underlying model is changed - or is cleared and updated. I see removeItem, removeItemAt, and removeAllItems methods in the DisabledItemsComboBox - but those don't seem to be called when I did the various things above.
I also suspect that we should call the update() method of the SkillBuffFrame whenever we change the model, refresh skills, or add skills.
This is not a simple bug.