Skip to content

fix(stash): retain categories on repeated Unique tab requests - #1000

Merged
evrydayjunglist merged 2 commits into
LocalExile:mainfrom
zqs1223041447-blip:fix/unique-category-retention-998
Nov 18, 2026
Merged

evrydayjunglist merged 2 commits into
LocalExile:mainfrom
zqs1223041447-blip:fix/unique-category-retention-998

Conversation

@zqs1223041447-blip

@zqs1223041447-blip zqs1223041447-blip commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What changes

After the first-open selection window expires, another request for the same Unique Collection tab unloaded its own hidden category inventories, sent the tab list with them marked not loaded, and registered them all again in the same burst (live on main: 22 × 0xc1, then 23 registrations, for one 0xc7). The selected Unique tab now keeps its registered categories. Switching to another tab still unloads that family; other families and ordinary tabs can still be unloaded, and shop-currency tabs stay registered.

The change is one condition in the unload predicate in Modules/Core/Game/Item/Stash.cs. Explicit RefreshUniqueCollection still removes and registers category inventories on purpose, and the inventory-change reload path is unchanged.

This removes the reopen churn. It is not shown to fix the freeze or crash reported in #998: the crash dump posted there happens when switching from the Unique tab to the Delirium tab, which this PR does not change.

Layer

Module: Modules/Core/Game/Item/Stash.cs.
Gateway regression tests: tests/GameServer.Gateway.Tests/StashTabReloadTests.cs.
Status and roadmap: Agents/status/stash.md, Agents/roadmap/stash.md.

Issue

Refs #998 (does not close it).

Checks

  • Base commit of main: bc95d68c4 (merged into the branch as 1bc5d36c5)
  • Head commit: 1bc5d36c5
  • dotnet build GameServer.slnx: 0 warnings, 0 errors
  • Core 443, Data 43, Gateway 594, all passed
  • The new repeat-request test fails with main's Stash.cs and passes with this change
  • Seen in the client (3.29.3c): stash opened with the real client in Lioneye's Watch, Unique tab (15) requested, then requested again after the first-open window, then the stash reopened. This branch: no unloads on the repeat, the client kept running (9.3 fps). Main: 22 unloads and 23 re-registrations for the same request. Neither build froze with an empty Unique tab, so Client freezes or crashes when reopening the Unique Collection stash tab #998's freeze did not reproduce here.

For the reviewer

  • Adds a project, a solution entry or a package
  • Makes a network request, opens a listener or starts a process: the new tests reuse the existing loopback Wire helper; production adds none.
  • Adds or changes files under sql/
  • Changes a file listed in .github/CODEOWNERS
  • Adds a game-data file or changes what a generator writes

@evrydayjunglist
evrydayjunglist marked this pull request as ready for review November 18, 2026 07:23

@evrydayjunglist evrydayjunglist left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Picked this up and merged main in (1bc5d36). The build and all three suites pass (Core 443, Data 43, Gateway 594), and the new test fails on main and passes with the fix. On 3.29.3c, asking for the Unique tab again no longer unloads and re-registers its 22 categories. The #998 crash dump is on switching away from the Unique tab, which this doesn’t touch, so the description now says Refs rather than Closes. Thanks for the careful work!

@evrydayjunglist
evrydayjunglist merged commit 0fd21fc into LocalExile:main Nov 18, 2026
2 checks 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