fix: center trick pile; add error boundary (surface post-buy crash)
CI/CD / CI - API (dotnet build + engine sim) (push) Successful in 1m51s
CI/CD / CI - Web (tsc + next build) (push) Successful in 1m4s
CI/CD / Deploy - local stack (db + server + web) (push) Has been cancelled

- Trick area: smaller offsets (±50/52) + retuned scale so the played pile sits
  centered in the felt instead of flung out to the side seats.
- ErrorBoundary around screens + overlays: a render error now shows a recoverable
  in-app message with the cause (and logs componentStack) instead of the browser's
  blank "page couldn't load" — helps pinpoint the post-purchase crash.

Verified: tsc + next build clean; web rebuilt on :1500.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-07 07:27:34 +03:30
parent 12177d2a33
commit b0668e6e31
3 changed files with 62 additions and 12 deletions
+10 -7
View File
@@ -21,6 +21,7 @@ import { NotificationToaster } from "@/components/online/NotificationToaster";
import { ResumeGameBar } from "@/components/online/ResumeGameBar";
import { CelebrationOverlay } from "@/components/online/CelebrationOverlay";
import { MusicToggle } from "@/components/online/MusicToggle";
import { ErrorBoundary } from "@/components/ErrorBoundary";
import { PublicProfileModal } from "@/components/online/PublicProfileModal";
import { CapacitorBack } from "@/components/CapacitorBack";
import { useSessionStore } from "@/lib/session-store";
@@ -193,13 +194,15 @@ export default function Page() {
// reducedMotion="user" makes every Framer Motion animation honor the OS
// "reduce motion" accessibility setting (coin rain, confetti, count-ups…).
<MotionConfig reducedMotion="user">
{renderScreen(screen)}
<DailyRewardModal />
<NotificationToaster />
<ResumeGameBar />
<CelebrationOverlay />
<MusicToggle />
<PublicProfileModal />
<ErrorBoundary>
{renderScreen(screen)}
<DailyRewardModal />
<NotificationToaster />
<ResumeGameBar />
<CelebrationOverlay />
<MusicToggle />
<PublicProfileModal />
</ErrorBoundary>
<CapacitorBack />
{loading && null}
</MotionConfig>