See the best posts from any Bluesky account
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Render 404 page in dev and redesign not-found view

Always render the 404 status page (not only in production) so unmatched
routes show the themed page instead of a raw exception. Guard auth in
the auth_buttons partial for requests that bypass router middleware.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+29 -11
+7 -4
app/exceptions/handler.ts
··· 15 15 * codes. You might want to enable them in production only, but feel 16 16 * free to enable them in development as well. 17 17 */ 18 - protected renderStatusPages = app.inProduction 18 + protected renderStatusPages = true 19 19 20 20 /** 21 21 * Status pages is a collection of error code range and a callback ··· 25 25 '404': (error, { view }) => { 26 26 return view.render('pages/errors/not_found', { error }) 27 27 }, 28 - '500..599': (error, { view }) => { 29 - return view.render('pages/errors/server_error', { error }) 30 - }, 28 + ...(app.inProduction 29 + ? { 30 + '500..599': (error, { view }) => 31 + view.render('pages/errors/server_error', { error }), 32 + } 33 + : {}), 31 34 } 32 35 33 36 /**
+20 -5
resources/views/pages/errors/not_found.edge
··· 4 4 @endslot 5 5 6 6 @slot('main') 7 - <div class="py-16 text-center"> 8 - <h1 class="text-2xl mb-4"> 7 + <div class="pt-20 pb-16 text-center animate-[fade-in-up_0.5s_var(--ease-out-quart)_both]"> 8 + <div class="inline-flex items-center justify-center mb-6"> 9 + <i class="ph-fill ph-heart-break text-red-500 text-7xl"></i> 10 + </div> 11 + 12 + <h1 class="font-heading text-4xl font-bold tracking-tight mb-3"> 9 13 @if(handle) 10 - We can't find {{ '@' + handle }} on Bluesky. Did you typo? 14 + We couldn't find {{ '@' + handle }} 11 15 @else 12 - Page not found. 16 + Page not found 13 17 @endif 14 18 </h1> 15 - <p><a href="/" class="text-blue-600 dark:text-blue-400 hover:underline">← Try another handle</a></p> 19 + 20 + <p class="text-gray-600 dark:text-gray-400 mb-8 max-w-[480px] mx-auto"> 21 + @if(handle) 22 + This handle doesn't exist on Bluesky — check for typos, or try someone else. 23 + @else 24 + The page you're looking for doesn't exist. Try searching for a Bluesky handle instead. 25 + @endif 26 + </p> 27 + 28 + <p> 29 + <a href="/" class="text-sm text-blue-600 dark:text-blue-400 hover:underline">← Back home</a> 30 + </p> 16 31 </div> 17 32 @endslot 18 33 @endcomponent
+2 -2
resources/views/partials/auth_buttons.edge
··· 1 - @eval(await auth.check()) 2 - @if(auth.isAuthenticated) 1 + @eval(auth && await auth.check()) 2 + @if(auth && auth.isAuthenticated) 3 3 <a 4 4 href="/profile/{{ auth.user.handle }}/likes" 5 5 class="text-sm text-gray-600 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200"