UnityChain#124
Open
Blaqkenny wants to merge 3 commits into
Open
Conversation
…yChainxx#107) Backend - New @global CacheModule backed by Redis (lazyConnect, no offline queue) with CacheService.getOrSet() and in-process single-flight coalescing. Reads missing or stale fall through to the loader; Redis read/write errors degrade to direct DB calls without throwing. - StreakService.getLeaderboard caches via CacheService (60s + 0-10s jitter). AnalyticsService.getMostSolvedPuzzles caches via CacheService (5min + 0-15s jitter) and eagerly invalidates on recordPuzzleSolve(). - AnalyticsService.recordPuzzleSolve() fires-and-forgets invalidation of the most-solved keys so writes become visible immediately instead of after the 5min TTL (UnityChainxx#107). - CacheService takes an @optional DI parameter so existing manual-DI unit tests stay green and the service gracefully no-ops without Redis. - New scripts/bench-mint.ts: concurrency-controlled latency benchmarker for POST /nft-claim/claim with p50/p95/p99/min/max/mean output. Ship with npm run bench:mint / bench:mint:json (UnityChainxx#108). - CacheService.spec.ts: 7 cases (single-flight, error propagation, Redis-down read fallthrough, write-fallthrough, corrupt-cache, invalidate tolerances, in-flight drain). - AnalyticsService.spec.ts now supplies a no-op CacheService for Nest DI. Frontend - New NftGalleryVirtualized component: windowed gallery that only mounts rows in the viewport via absolute-positioned row containers + a ResizeObserver. No new runtime dependencies. Fires onReachEnd() paginated hook for infinite scroll (UnityChainxx#104). - useGameStore persists only a 50-item lightweight index (metadata stripped) and re-fetches the first page on rehydrate so cards render with full payloads after a refresh. Wraps localStorage in defensive try/catch so quota-exceeded drops the NFT index instead of crashing hydration (UnityChainxx#104). - next.config.mjs: experimental.optimizePackageImports list for lucide-react / date-fns / lodash(-es) / ramda so unused icons/imports are eliminated at build time (UnityChainxx#106). Refs UnityChainxx#107 UnityChainxx#104 UnityChainxx#106 UnityChainxx#108.
feat(perf): Redis cache + single-flight, virtualised gallery, mint-latency bench (UnityChainxx#107 UnityChainxx#104 UnityChainxx#106)
Pulls upstream commits (Soroban migration, CI fixes, Cargo.lock commit) into the fork while preserving our cache/bench perf work (UnityChainxx#107). The single conflict on frontend/package-lock.json is resolved by keeping our version because our package.json still pins the @nestjs-modules/ioredis + related deps needed by CacheModule and the bench-mint script (UnityChainxx#107, UnityChainxx#108). Resolves the dirty mergeable_state on UnityChainxx/StellarHunts PR UnityChainxx#124.
|
@Blaqkenny Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #107
Closes #106
Closes #104
Closes #108
Summary
Changes
Testing
Related Issues