fix(inventory): address code review findings
Some checks failed
Deploy to Production / test (push) Failing after 31s

- Replace setTimeout race in use-item flow with explicit Back button
- Fix collector end handler to re-render current view instead of blanking
- Add appendUseBackButton helper to attach navigation to use results
- Remove unused isInventoryInteraction import
- Fix rarity test type assertions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
syntaxbullet
2026-03-28 17:49:12 +01:00
parent 6a1498813f
commit 5188d86d61
3 changed files with 82 additions and 31 deletions

View File

@@ -16,12 +16,12 @@ describe("getRarityConfig", () => {
it("falls back to Common for unknown rarity", () => {
const result = getRarityConfig("LEGENDARY");
expect(result).toEqual(RARITY_CONFIG["C"]);
expect(result).toEqual(RARITY_CONFIG["C"]!);
});
it("falls back to Common for null/undefined input", () => {
expect(getRarityConfig(null as any)).toEqual(RARITY_CONFIG["C"]);
expect(getRarityConfig(undefined as any)).toEqual(RARITY_CONFIG["C"]);
expect(getRarityConfig(null as any)).toEqual(RARITY_CONFIG["C"]!);
expect(getRarityConfig(undefined as any)).toEqual(RARITY_CONFIG["C"]!);
});
});