> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nudj.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Performance Boost, Better Error Tracking, & Refined Game Configuration

| Metric        | Value   |
| ------------- | ------- |
| Commits       | 6       |
| Lines added   | +3,684  |
| Lines removed | -1,977  |
| Files changed | 114     |
| Size          | Massive |
| Complexity    | 2       |

## What's New in v2.276.4

This release delivers **significant performance improvements** to the admin dashboard, **enhanced error tracking and observability** across all platforms, and **improved game configuration accuracy** with refined typography support.

### 🚀 Performance Optimization: Faster Admin Experience

<Check>
  We've applied 26+ Vercel React best practices across the admin platform, making it measurably faster. The admin dashboard now loads **50-100ms faster** with eliminated request waterfalls, optimized re-rendering, and strategic bundle size reductions.
</Check>

**What's Better:**

* **Dashboard loads faster** — Parallelized sequential fetches (org page, overview data, activity data) eliminate request queuing
* **Tables render smoothly** — Removed per-row provider instantiations; `TooltipProvider` hoisted from 11+ table rows to a single table-level instance
* **Search & filtering are snappier** — Memoized RegExp compilation and O(1) role filtering (was O(n²)) eliminate unnecessary re-renders
* **Incognito mode works without crashes** — Added try-catch guards around `localStorage` and `sessionStorage` access throughout the platform
* **Less JavaScript to download** — Optimized imports for `date-fns` and `@tabler/icons-react` reduce cold start overhead

**Who Benefits:**

* **Community managers** — Faster navigation between dashboard, challenges, and user management pages
* **Platform admins** — Quicker game config editing and preview cycles
* **Everyone with large communities** — Tables with 100+ rows render without lag

### 📊 Error Tracking & Observability Overhaul

<Info>
  We've rebuilt error tracking and observability infrastructure across **4 major apps** (admin, user, games, MCP server) for better visibility into platform health and faster incident resolution.
</Info>

**What's Better:**

* **Errors are tracked with full context** — Every error now includes user ID, organization ID, and community context automatically, making it easier to reproduce issues
* **Source maps work end-to-end** — Minified stack traces in production now resolve back to original source code for clearer debugging
* **Environment tagging** — Staging, production, and preview deployments are automatically separated in error dashboards, eliminating confusion
* **Real-time error alerts** — Set up in BetterStack; you'll now see errors as they happen with full context

**Who Benefits:**

* **Support teams** — When customers report issues, errors include the exact user/organization context to reproduce them immediately
* **Engineering teams** — Minified production errors now resolve to readable source code, slashing debugging time
* **SREs & platform operators** — Unified error tracking across all apps with environment-based filtering

### 🎮 Game Configuration: More Accurate, Better Error Messages

<Tip>
  Game configuration previews now show **real errors instead of English placeholders**, making it obvious when a game has been misconfigured. Text search now matches what you actually saved, not just language defaults.
</Tip>

**What's Better:**

* **Game previews show real errors** — If a game config fails to load, you see the actual error message in the language you configured, not a generic English placeholder
* **Text search works as expected** — Searching game text (Catch, Flick, Memory, Scratch) now matches the values you saved, not just language defaults
* **Easier troubleshooting** — No more guessing why a game won't preview; actual error messages guide you to the fix

**Who Benefits:**

* **Community managers** — Know immediately if a game is misconfigured before players see it
* **Localized game creators** — Game text search works correctly in any language you're using

### ✍️ Typography: Extended Font Support

Added **Freight Sans Bold** font to the user-facing platform, expanding customization options for communities that want bolder, more prominent typography.

**Who Benefits:**

* **Brand-conscious communities** — More typography control to match community branding
* **Accessibility-focused admins** — Bold font option improves readability for users with low vision

***

## Detailed Changes

### For Platform Administrators

**Performance Improvements:**

* **Faster page loads** — Dashboard now parallelize auth and data fetches instead of sequential waterfall calls (\~50-100ms faster)
* **Smoother table interactions** — 11 major tables (achievements, challenges, leaderboards, posts, rewards) now have optimized provider structure, eliminating re-renders on each row
* **Better search performance** — Search highlighting in admin tools now uses memoized RegExp compilation; role filtering uses O(1) Set lookups instead of O(n²) array searches
* **Incognito mode support** — Admin panel now works correctly in private/incognito browsing mode (fixed localStorage crashes)
* **Optimized bundle size** — Import optimization for date-fns and tabler icons reduces cold start times

**Game Configuration & Observability:**

* **Better game config errors** — Game previews now display actual error messages in the configured language, not generic English placeholders
* **Accurate text search** — Game text search (Catch, Flick, Memory, Scratch games) now matches saved values in all languages
* **Error tracking with context** — All errors now include organization, community, and user context; source maps resolve minified stack traces in production

### For End Users

**Typography & Appearance:**

* **Bold typography option** — Communities can now use Freight Sans Bold for headings and CTAs, enabling stronger visual hierarchy
* **Better game reliability** — Games won't silently fail; communities can now see configuration errors and fix them before players encounter issues

***

## Technical Details

### Admin Performance Audit (26 Optimizations)

**Commit:** `12e342195` — Vercel React best practices audit across 52 files

| Category                   | Optimizations                                                                    | Impact                                                        |
| -------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| **Eliminating Waterfalls** | Parallelized auth + fetches in chat route, org-id route, dashboard queries       | \~200-500ms faster Shopify chat init; faster admin page loads |
| **Server Performance**     | Deduplicated `auth()` with `React.cache()`                                       | Eliminates duplicate auth DB queries per request              |
| **Re-render Optimization** | Removed trivial `useMemo`, hoisted `TooltipProvider` from per-row to table level | Fewer context provider instantiations; reduced hook overhead  |
| **Client Data**            | Added try-catch around `localStorage`/`sessionStorage` (7 locations)             | Prevents crashes in incognito mode                            |
| **Bundle Size**            | Optimized imports for date-fns, @tabler/icons-react in `next.config.ts`          | Faster cold starts across 69+ files                           |
| **JavaScript Performance** | Memoized RegExp compilation in search, cached Math.ceil in date computations     | Eliminates per-render object allocation                       |

### Observability Infrastructure (Sentry + BetterStack)

**Commit:** `eca7823f9` — Rebuilt error tracking across 4 apps, 46 files

* **Environment tagging** — Each deployment (staging, prod, preview) tagged automatically
* **Scope enrichment** — User ID, org ID, community ID included on every error for context
* **Source map upload** — Configured across all apps; minified errors now resolve to original source
* **Client-side instrumentation** — Added Sentry client-side tracking with user sync across admin, user, and games apps
* **Global error handlers** — Proper error boundaries in Games and MCP Server apps

### Game Configuration Fixes

**Commits:** `ec965ea21` (game text search), `185f2ba71` (preview error handling)

* **Game text search** — Now queries actual saved values instead of falling back to language defaults
* **Preview failures** — Error context preserved through API layer; displays actual error messages in configured language
* **API caller resilience** — Enhanced error propagation from games to admin preview page

***

## Breaking Changes

None in this release.

***

## Migration Guide

No migration required. Update and restart your services.

```bash theme={null}
# Standard deployment
vercel deploy

# Or if using Docker
docker pull nudj:v2.276.4
docker run nudj:v2.276.4
```

***

## Related Features

* [Performance Tuning Guide](/) — Optimize your Nudj instance for large communities
* [Error Tracking with BetterStack](/) — Monitor platform health in real-time
* [Game Configuration Reference](/) — Best practices for setting up game challenges
* [Typography & Theming](/) — Customize fonts and colors for your community

***

## Contributors

This release was built by:

| Contributor | Commits |
| ----------- | ------- |
| ZuhayrK00   | 2       |
| erek\_d     | 1       |
| SaadK94     | 1       |
| dch         | 1       |

***

**Questions?** Reach out to [support@nudj.co](mailto:support@nudj.co) or check the [Nudj Docs](/).
