Skip to content

feat(bags): flag items taken from the mailbox as Recent - #1999

Merged
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
dfrisone:feat/recent-items-from-mail
Sep 7, 2026
Merged

feat(bags): flag items taken from the mailbox as Recent#1999
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
dfrisone:feat/recent-items-from-mail

Conversation

@dfrisone

@dfrisone dfrisone commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

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_MAX is 15, so emptying a large
mailbox 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 -p clean; house style check clean. Not click-tested. Reproduction is to
take 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.

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.
@EllesmereGaming
EllesmereGaming merged commit c593f8f into EllesmereGaming:main Sep 7, 2026
1 check passed
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.

2 participants