🔵 Small Release v2.387.9
⭐ Simple Complexity • 5 commits • 18 files changedv2.387.9 is a focused stability release that fixes a critical issue preventing first-time players from seeing game completion results, and improves Shopify merchant workflows with search state preservation during configuration. These targeted fixes enhance both end-user experience and platform reliability.
What’s New
- Game Completion Screen Fix — First-time players can now see game results and rewards immediately after completing a game
- Shopify Settings Search Persistence — Community settings search now preserves your input when refetching data, eliminating search resets
- Improved Game Completion Detection — Refined session-ready logic distinguishes between first plays and repeat attempts for accurate result display
- Configurable Shopify Session Storage — Shopify session collection name is now customizable via environment variable for deployment flexibility
Apps Updated
User App
✓ Updated - 4 changes
Shopify
✓ Updated - 6 changes
Admin
— No changes
API
— No changes
Games
— No changes
MCP Server
— No changes
Detailed Changes
User App – Game Completion Fixes
User App – Game Completion Fixes
Game Completion Screen Stability
- Game Completion Hang Fix (NJ-1169) — Fixed critical issue where first-time players’ game-complete screens would hang indefinitely and fail to show results. The issue was in the session-ready detection logic which incorrectly used the current session as a baseline, causing first-time players to never receive a “new session detected” signal. The fix separates first-play logic (any completed session is ready) from repeat-play logic (new completed session must differ from prior), with comprehensive test coverage.
- Extracted isCompletedSessionReady Helper (NJ-1169) — New
isCompletedSessionReady()function encapsulates the readiness logic with clear semantics: readiness is “the latest session is completed”, NOT “the latest session differs from the one before play”. Tests validate all scenarios: missing sessions, in-progress sessions, first-time completion, and repeat-play detection. - Server-Side Game Data Seeding (NJ-1169) — Game-complete wrapper now seeds React Query cache with server-fetched game data (which includes the just-completed session), preventing data loss during client-side polling and enabling immediate result display.
Shopify Loyalty Admin – Settings & Configuration
Shopify Loyalty Admin – Settings & Configuration
Settings Search UX
- Settings Community Search Persistence (NJ-1185) — Community selector in Shopify settings now preserves your search input and results when the query refetches, eliminating the frustrating behavior where search was reset on every data refresh. Uses React Query’s
keepPreviousDataoption to hold stale results while fetching fresh data. - Search Query Testing (NJ-1185) — Added harness E2E test verifying search persistence flow, ensuring the UX remains stable through future refactors.
- Configurable Session Collection Name (NJ-1193) — Shopify session collection MongoDB name is now configurable via the
SHOPIFY_SESSION_COLLECTION_NAMEenvironment variable, eliminating hardcoded defaults and supporting flexible deployment scenarios. - Session Service Configuration (NJ-1193) — Updated Shopify session service and initialization to use the environment variable, with dev-setup documentation updated to show the configuration option.
Admin Highlights
- Shopify Community Search Persistence – Settings community selector now preserves search input during data refetch, preventing manual re-entry
- Configurable Session Storage – Shopify session collection name customizable via environment variable for deployment flexibility
User Highlights
- Game Completion Results Guaranteed – First-time game players now see results immediately after completing a game without hanging or delays
- Reliable Game Results Display – Session detection logic now correctly identifies game completion for both first plays and repeated attempts
Breaking Changes
None. All changes are backwards-compatible.Technical Notes
Game Session Logic- The game-complete screen polling mechanism distinguishes between two readiness conditions:
- First play (no prior session): Ready when
latestSession.completedAtexists - Repeat play (prior session exists): Ready when a different session becomes latest AND completed
- First play (no prior session): Ready when
- Prior buggy logic conflated these cases, causing first-time players to wait indefinitely for a “different” session
- The extracted
isCompletedSessionReady()function makes this distinction explicit with comprehensive test coverage for all branches
- Server-side page renders game with completed session already present
- Client-side wrapper seeds React Query cache with this data via
setQueryData()to prevent race conditions - Polling loop checks readiness on refetch without clobbering fresher background fetches (guarded by
seededRef)
- React Query’s
keepPreviousDataoption holds stale search results while new data is fetching - This provides instant visual feedback instead of clearing the list mid-refresh, creating a smoother merchant experience
Usage Examples
Related Features
- Games & Challenges — Complete games and earn rewards
- Game Customization — Configure game variants and branding
- Shopify Integration — Loyalty platform configuration
- Settings & Configuration — Manage platform and storefront settings
Contributors
@dch2 commits • +254/-12 lines
@jamescockayne1 commit • +49/-10 lines
@solicshop1 commit • +104/-31 lines
@nudj-changelog-bot[bot]1 commit • +0/-0 linesRelease Stats
| Metric | Value |
|---|---|
| Total Commits | 5 |
| Lines Added | +705 |
| Lines Removed | -54 |
| Files Changed | 18 |
| Release Size | 🔵 Small |
| Complexity | ⭐ Simple |
v2.387.9 deployed on June 17, 2026

