Skip to content

Fix/collection-gallery#78

Open
j-audrick wants to merge 12 commits into
mainfrom
fix/collection-gallery
Open

Fix/collection-gallery#78
j-audrick wants to merge 12 commits into
mainfrom
fix/collection-gallery

Conversation

@j-audrick

Copy link
Copy Markdown
Collaborator

PR Summary: Fix Collection Slot Updates Not Persisting and Rendering

This PR fixes an issue where users could run qsetcollection successfully but see no visible update in qshowcollection.

Root Cause

The in-memory user cache merge logic did not correctly handle dotted update paths containing list indices (example: collections.iu.0).

When qsetcollection updated a slot, the cached collection structure could be reshaped incorrectly (list-like data treated as dict-like), so later reads and rendering in qshowcollection appeared unchanged.

What Changed

  1. Fixed dotted-path in-memory merge to support list indices safely
  • Updated traversal and write behavior in update_user.
  • Added index-aware handling for set, unset, inc, and pathing behavior for push and pull flows.
  1. Added collection shape normalization on user load
  • Added a normalization helper to repair corrupted collection shapes in cache (numeric-key dicts converted back into 6-slot lists).
  • This makes the fix resilient for users already affected before deployment.
  1. Fixed collection modal edge case
  • Initialized card before conditional lookup to avoid undefined-variable behavior when clearing a slot.
  • Stored and reused resolved card id consistently for local view state and logs.

This branch has commits from chii/fixes. Probably better to merge that first

j-audrick added 12 commits May 30, 2026 21:57
- Improved track selection logic to handle unavailable tracks more gracefully.
- Added optional authentication for restricted YouTube videos via environment variables.
- Updated requirements for discord.py and yt-dlp to the latest versions.
- Implemented RewardCardView class to manage reward card interactions.
- Added methods for normalizing probabilities, rolling cards, and building embeds.
- Included Claim and Reroll buttons with respective interaction handling.
- Integrated user inventory checks and currency management for rerolls.
- Enhanced logging for card claims and rerolls.
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.

1 participant