Seamless modal navigation powered by Next.js intercepted routes. This release modernizes how users explore content across the platform—challenges, rewards, posts, achievements, and shop features now open in smooth, full-height modals with browser history support. Users can navigate between modals and stacked content while maintaining scroll position and browsing context, delivering a native app-like experience without page reloads.
Intercepted Modal Navigation - Challenges, rewards, posts, and achievements now open in elegant modal overlays instead of full-page views, keeping users in context while exploring related content
Browser History Support - Full back/forward navigation works intuitively through modals—back button closes the modal and returns to the previous view with scroll position preserved
Stacked Modal Support - Discover related content seamlessly; clicking a reward within a challenge opens a second modal while keeping the challenge in the background, fully visible when you navigate back
Unified UX Across Viewports - Same consistent modal behavior on mobile, tablet, and desktop—no viewport-specific logic or layout shifts required
Zero-Config Route Integration - Standard Next.js links work automatically without custom context providers or viewport detection; developers simply use regular <Link> components
Modernized Content Discovery with Next.js Intercepted RoutesThe user app now implements Next.js 15’s parallel routes and route interception pattern for a native app-like modal experience. This architectural change improves UX, simplifies navigation logic, and eliminates custom viewport detection code.How It Works for UsersClicking any content card (challenge, reward, post, achievement) opens a full-height drawer modal that:
Appears instantly with smooth animation
Preserves the underlying list with scroll position maintained
Closes when user taps the X button, returning to the exact scroll position
Supports stacked modals—discover related content without losing your place
Works identically on mobile, tablet, and desktop
Implementation Architecture
Next.js Parallel Routes (@modal slot)
Dedicated app/@modal/ directory for all modal content
Next.js 15 Intercepted Routes PatternThis release implements the modern Next.js 15 parallel routes + route interception pattern, providing a robust foundation for future modal-based features. The pattern is:
Copy
Ask AI
User clicks link to /challenge/123↓Next.js recognizes (.)challenge/[id] route interception↓@modal/(.)challenge/[id]/page.tsx renders in <modal> slot↓Main layout renders both page content + modal simultaneously↓User closes modal → router.back() → URL changes → @modal/default.tsx renders null↓Modal slot unmounts, underlying page content is visible again
Performance Improvements
No full page reloads when opening modals (soft navigation)
Scroll position preserved through React state, no DOM recreation
Lazy-loaded modal content with React Query integration
Animations use GPU acceleration (transform/opacity)
Architectural Benefits
Eliminates custom viewport detection and branching logic
Single source of truth for detail views (reusable components)
Browser history naturally handles modal stacking
Future-proof for additional modal routes (without code changes to core patterns)
Accessible out-of-the-box with proper ARIA attributes via Vaul drawer