🔴 Release v2.486.0
⭐⭐⭐ Complex • 55 commits • 483 files changedHosted legal policies, advanced leaderboard controls, and challenge branding—letting admins host compliance pages on their own domain, fine-tune leaderboards with user exclusions and date windows, and customize answer colors to match their brand. Security hardening throughout. Major upgrade to Next.js 16.3.1 and E2E test infrastructure.
What’s New
- Hosted Legal Policies – Admins host Terms, Privacy, and custom policies on a Nudj-managed domain; users access without login
- Legal Policy Editor – Rich-text editor with live preview and HTML sanitization for safe content hosting
- Challenge Answer Colors – Customize the color of answer choice areas to match community branding
- Leaderboard User Exclusions – Exclude specific users from appearing on leaderboards
- Time-Bound Leaderboard Exclusions – Set start and end dates for exclusion windows (seasonal events, competitive events, etc.)
- Manual Leaderboard Reward Distribution – Toggle whether rewards auto-distribute or require manual admin approval
- Social Handle Normalization – Improved parsing and validation of social media usernames across platforms
- MultiPlusCard Configuration – Move payment gateway settings to centralized third-party config UI
- Security and access-control hardening.
Admin Highlights
- Hosted Legal Policies – Host your own Terms of Service, Privacy Policy, and custom legal pages on Nudj’s domain without third-party redirects; legal pages accessible to non-logged-in users
- Rich Legal Editor – Full HTML sanitization and live preview when editing hosted legal content
- Challenge Answer Branding – Customize answer choice colors in theme settings to match your brand’s visual identity
- Leaderboard User Exclusions – Remove specific users from leaderboard rankings (e.g., internal testers, disqualified participants)
- Exclusion Date Ranges – Set start/end dates on exclusions for temporary removal (seasonal resets, competitive-event fairness)
- Manual Leaderboard Reward Distribution – Choose whether leaderboard rewards auto-distribute or wait for admin approval before awarding
- MultiPlusCard Configuration – Manage payment integration settings in the centralized third-party config panel
- Improved Chat Defaults – Admin chat now defaults to Claude Opus 5 for better reasoning
- CSV Export Safety – Formula injection prevention in challenge statistics CSV exports
- Confirm Dialog Persistence – Save failures no longer dismiss the dialog, letting admins retry immediately
User Highlights
- Access Legal Pages Without Login – View Terms of Service and Privacy Policy without signing in
- Branded Answer Choices – Question answer colors match your community’s theme for a polished look
- Fair Leaderboard Competition – Admins can now exclude users during specific windows to ensure fair play
- Social Profile Linking – Improved handling of social media handles when linking Instagram and TikTok profiles
Detailed Changes
Admin – Legal Policy Hosting & Configuration
Admin – Legal Policy Hosting & Configuration
Hosted Legal Policies (NJ-1860)
Admins can now host legal policies (Terms, Privacy, etc.) on a Nudj-managed domain without external redirects:- Admin Editor – Legal Settings tab gains a UI for creating/editing hosted policies with rich-text editing
- HTML Sanitization – Uploaded policy content is sanitized to prevent XSS and malicious scripts
- User Access – Legal pages render on a public-facing route accessible without login
- Fallback Support – Policies can fall back to external URLs if no hosted version is configured
- Org admin opens Legal Settings in Control Room
- Selects “Host on Nudj” for Terms, Privacy, or custom policies
- Enters HTML/rich-text content with live preview
- Content sanitized and stored in platform config
- Users see hosted pages at
yourapp.nudj.app/legal/termswithout authentication
Admin – Leaderboard Management Enhancements
Admin – Leaderboard Management Enhancements
User Exclusions & Date Ranges (NJ-1989, NJ-1990)
Leaderboard configs now support precise user exclusion control:- Exclude Users – Admins add a list of user IDs to exclude from leaderboard rankings
- Time Windows – Each exclusion can have optional start/end dates (e.g., exclude from Jan 1–15 only)
- Active Resolution – System compares current date/time to determine which exclusions apply
- Audit Trail – Exclusion history viewable in leaderboard config editor
- Exclude internal testing accounts permanently
- Temporary fairness windows during competitive events
- Seasonal resets that expire exclusions
- Disqualified participant removal with explicit end date
Manual Reward Distribution Toggle (NJ-1954)
Admins can now choose whether leaderboard rewards auto-distribute or require approval:- Toggle Setting – New “Manual Distribution” checkbox in leaderboard config
- Default Behavior – When enabled, rewards wait for admin approval before crediting
- Distribution Interface – Admin can bulk-approve/reject pending rewards in leaderboard dashboard
Admin – Branding & Customization
Admin – Branding & Customization
Challenge Answer Color Customization (NJ-1995)
Theme settings now include a dedicated color picker for answer choice areas:- Color Editor – New “Answer Area Color” picker in Branding settings
- Live Preview – Storybook fixtures show all question types with the selected color
- Applied Across – Color applies to multiple-choice, rate-your-experience, select-from-list, and other choice-based questions
- CSS Variable System – Uses CSS custom properties for easy theme switching
- Multiple-choice options
- Single-select buttons
- Rating stars and scales
- Date/time selectors
- Prediction choices
Admin – Third-Party Integration Configuration
Admin – Third-Party Integration Configuration
MultiPlusCard Settings Relocation (NJ-1982)
MultiPlusCard login configuration moved from feature flags to the centralized third-party config panel:- Third-Party Tab – New “Third-Party Platform Config” section in Admin settings
- MultiPlusCard Controls – Enable/disable MultiPlusCard login for the organisation
- Environment Selection – Choose sandbox or production environment
- Unified Interface – All payment/login integrations in one place (alongside OAuth, SSO, etc.)
User App – Legal Policies & Access
User App – Legal Policies & Access
Public Legal Pages (NJ-1860)
Security and access-control hardening.- Route Structure –
/legal/[policy](e.g.,/legal/terms,/legal/privacy) - No Login Required – Accessible to anonymous users
- Fallback Support – Missing pages can redirect to external URLs
- E2E Coverage – Full test suite for page rendering, routing, and error states
- Footer link to Terms/Privacy
- No sign-in required
- Page renders with proper layout and styling
- External fallback if no hosted version configured
User App – Branding & Visuals
User App – Branding & Visuals
Answer Choice Styling
All question types now respect the custom answer color from theme config:- Multiple-Choice – Button backgrounds use brand color
- Rate-Your-Experience – Star colors match answer theme
- Select-From-List – Option highlight color synchronized
- Predictions – Choice backgrounds branded
- Other Choices – Date, range, and image-selection controls all updated
Reward Drawer Visual Fix (NJ-2091)
Fixed background bleed issue in parallax reward drawer:- Overflow Prevention – Container no longer bleeds beyond viewport during scroll
- Parallax Smooth – Animation stays within bounds
Compliance & Security
Compliance & Security
Security Hardening: Org Membership Enforcement (NJ-2025)
Every admin API route now validates organisation membership:- Route Coverage – All
/api/admin/*endpoints checkorganisationIdcookie against user’s orgs - Test Suite – 679-line comprehensive test coverage for auth boundary violations
- Scope Validation – Prevents cross-tenant data access even with valid tokens
- Organisation settings endpoints
- Cache clear operations
- Chat context retrieval
- File uploads
- Preview deployment access
- MCP tool availability checks
- Widget preview rendering
GDPR Data Erasure (NJ-2016)
When admins initiate user data erasure,contactEmail field is now properly cleared:- Contact Email Cleanup – Email addresses removed alongside other PII on erasure
- Backfill Migration – Historical erased users’ contact emails cleaned up
- Service Layer – Dedicated email scrubbing utility for consistent erasure
Anonymous Reward Purchase Blocking (NJ-2054)
Users cannot purchase rewards while logged out:- Session Check – Purchase button disabled for anonymous users
- Validation – Reward purchase API rejects unauthenticated requests
- UX – Clear prompt to sign in before purchasing
Blob Deletion Org Scoping (NJ-2023)
Image/file uploads now scoped to uploading organisation:- Org Validation – Blob deletion checks org ownership before removal
- Security and access-control hardening.
Auth Link Platform Token Gating (NJ-2010)
Request-auth-link flow now requires valid platform token:- Token Check – Endpoint validates platform token before issuing auth link
- Prevents Brute Force – Limits auth link generation without valid credentials
OAuth State Validation (NJ-2007)
Improved handling of malformed OAuth state parameters:- Graceful Degradation – Invalid state hints don’t cause login failure
- Fallback Flow – Routes to standard OAuth flow if state parsing fails
Admin – Data Export & Error Handling
Admin – Data Export & Error Handling
CSV Export Formula Injection Prevention (NJ-2019)
Challenge statistics CSV exports now escape formula characters:- Escaping – Leading
=,+,@characters prefixed with single quote - Prevents Malicious Cells – Excel/Sheets won’t execute embedded formulas
Confirm Dialog Persistence (NJ-2006)
Save-failure dialogs now stay open:- Retry UX – Users can immediately correct and resubmit without reopening dialog
- Error Visibility – Error message remains visible during retry
API & Platform Services
API & Platform Services
Third-Party Config API Extensions
Admin and Integration APIs updated with new endpoints:GET /third-party-config– Fetch all third-party platform settingsPATCH /third-party-config– Update MultiPlusCard, OAuth, SSO, legal policy configs- New DTOs:
ThirdPartyPlatformConfigDtoModel,MultiPlusCardPlatformConfigDtoModel
Legal Policy Content Storage
Platform config schema extended for legal policy hosting:LegalPlatformConfigDtoModel– Stores Terms, Privacy, and custom policy contentLegalPolicySourceEnum–EXTERNAL_URLorHOSTED_ON_NUDJLegalPolicyTypeEnum–TERMS,PRIVACY,CUSTOM- Content sanitized via
sanitizeLegalPolicyContent()utility
Leaderboard Query Model Extensions
LeaderboardExclusionDtoModel– User ID + optional date rangeLeaderboardConfigDtoModel.exclusions– Array of exclusion windowsLeaderboardConfigDtoModel.isManuallyDistributed– Boolean flagresolveActiveExcludedUserIds()– Computes active exclusions by current date
Search & Pattern Functions
normalizeSocialHandle()– Utility for parsing social usernamesbuildSocialProfileUrl()– Constructs canonical profile URLs per platform
Database Migrations
Database Migrations
Leaderboard Schema Migrations
20260812154937_backfill_leaderboard_exclude_users.ts– Adds exclusion list to leaderboard configs20260812160000_reshape_leaderboard_exclude_users_to_windows.ts– Extends schema with date ranges20260812123456_backfill_leaderboard_is_manually_distributed.ts– Adds distribution toggle with default=false
GDPR Erasure Migration
20260812120000_backfill_erased_user_contact_email.ts– Clears contact emails for previously erased users (87-line migration with test coverage)
All migrations include full test suites with rollback validation.
E2E Test Infrastructure
E2E Test Infrastructure
Test Foundation Reliability (NJ-1475, 3 commits)
Three-part improvement to test infrastructure:- E2E Test Foundation – Fixed race conditions and timing issues in base test setup
- Admin Visible Controls – E2E tests now interact with rendered challenge controls instead of DOM manipulation
- E2E Results Reporting – Test runner now reports truthful outcomes without false negatives
Browser Automation Improvements
- Removed polling fakes from visibility checks (
isVisible({timeout})) - E2E tests now properly await DOM readiness before asserting rendered state
- Shopify harness test reports upload correctly on green test runs
Infrastructure & DevOps
Infrastructure & DevOps
Next.js 16.3.1 Upgrade (NJ-2044)
All applications upgraded to Next.js 16.3.1 (from 16.3):- Performance – Latest rendering optimizations
- Security – Latest framework patches
- Compatibility – Apps and MCP server fully validated post-upgrade
CI/CD Improvements
- Shopify harness reports now upload on green runs (NJ-2058)
- A11y budget ratchet auto-populated from harvested data (NJ-2056)
- Code review load-balanced across multiple reviewers (NJ-2066)
- PR coverage specs integrated into smoke lane (NJ-2059)
- Preview smoke lane now excludes package-only changes (NJ-2081)
- Cancelled lint-and-test runs no longer report as failures (NJ-2060)
- Linear-sync workflow retired; “Not Ready” label auto-applied to PRs (NJ-2085)
Chat Defaults
- Admin chat now defaults to Claude Opus 5 (medium reasoning) for better inference
Documentation & Brand
- Nudj corporate brand guidelines added to docs (fonts, colors, tone, logo usage)
- Brand template pack created (deck templates, LinkedIn cards, email signatures, OG images)
- Nudj brand skill added for on-brand design work
Observability & Error Handling
Observability & Error Handling
Error Logging Improvements
- Stop logging tRPC request bodies on error (NJ-2017) – Prevents PII/secrets in logs
- Nested
extrafields scrubbed before error capture (NJ-2018) – Improved error context isolation - Excluded
auth_accountsfrom parquet export (NJ-2020) – Prevents sensitive auth data in analytics
Documentation Security
- Dev MongoDB URIs redacted from committed docs (NJ-2014)
- Generated release notes auto-redact security details (NJ-2037)
- High-risk code paths flagged in PR review (updated High-Risk Areas registry)
Apps Updated
User App
✓ Updated - Legal pages, answer branding, social handles, reward drawer, security
API
✓ Updated - Legal config, leaderboards, third-party settings, GDPR erasure
Admin
✓ Updated - Legal editor, leaderboard controls, answer colors, org membership enforcement
MCP Server
✓ Updated - Integration config, environment support
Games
— No changes
Packages
✓ Updated - Models, API client, design system, database
Contributors
jamescockayne4 commits • +2,651/-136 linesRelease Stats
v2.486.0 deployed on August 18, 2026







