feat(bags): flag items taken from the mailbox as Recent - #1999
Merged
EllesmereGaming merged 1 commit intoSep 7, 2026
Merged
Conversation
Reported: unsold auction returns taken out of the mailbox never appear in Recent Items, so they have to be hunted down by hand in the bags, and which items make the list feels arbitrary. Working as designed until now. Recent Items watches bag counts rise, and detection froze completely at a mailbox or bank because from bag contents alone the traffic in either direction is ambiguous. That reasoning holds for a bank, where a rise may just be a withdrawal of something already owned. It does not hold for a mailbox: nothing there can raise a bag count except an item arriving, since sending only ever lowers one. So rises are now read at the mailbox while drops stay ignored, which keeps the protection the freeze was actually there for -- sent, sold and deleted still look identical, so neither the known peak nor the eviction sweep moves on a drop. The bank stays frozen in both directions. The stale half of the comment above the function is corrected with it: it described the mailbox as frozen entirely, which is no longer true.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reported by @thewildone (9.1.6): unsold auction returns taken out of the
mailbox never show up in Recent Items, so they have to be hunted down by
hand in the bags. He also noted that what lands in Recent Items generally feels
inconsistent.
This was working as designed
Recent Items watches bag counts rise. Detection froze completely at a mailbox
or a bank, because from bag contents alone the traffic is ambiguous in both
directions, and on close it resyncs the baseline so nothing that moved while
standing there flags as new. That is also the "inconsistent" part: looted items
flag, mailbox and bank items never do.
Why the mailbox is not the bank
At a bank a rise really is ambiguous, since withdrawing something already
owned looks exactly like acquiring it.
At a mailbox it is not. Nothing there can raise a bag count except an item
arriving, because sending only ever lowers one. The ambiguity the freeze was
protecting against lives entirely on the drop side, where sent, sold and
deleted are indistinguishable.
So rises are now read at the mailbox, and drops are still ignored there:
neither the known peak nor the eviction sweep moves on a drop, which preserves
exactly the protection the freeze existed for. The bank is untouched and stays
frozen in both directions.
The comment above the function is corrected in the same commit, since it
described the mailbox as frozen entirely and that is no longer true.
Worth weighing before merging
This reverses a deliberate decision rather than fixing a fault, so it is a
behaviour change and wants a second opinion.
One consequence to be aware of:
RECENT_MAXis 15, so emptying a largemailbox can push genuinely recent loot out of the list. That is inherent to
treating mail as an acquisition rather than a flaw in this change, but it is
the trade being made.
Testing
luac -pclean; house style check clean. Not click-tested. Reproduction is totake an unsold auction return out of the mailbox and check it appears under
Recent Items; the regressions to watch for are bank withdrawals not being
flagged, and mailing something away not re-flagging it as new when it comes
back.