Your calm window into the Atmosphere. morgen.blue
rss atproto
3
fork

Configure Feed

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

refactor(auth): drop /dashboard, land on /consume after login

Removes the starter-kit dashboard route and page; OAuth callback now
redirects to /consume, which is the real product landing under
WindowLayout. Welcome and the legacy AppSidebar/AppHeader nav helpers
swap dashboard() -> consume(). Renames DashboardTest -> ConsumeTest to
keep the guests-redirected-to-login coverage on a real auth-gated route.

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

+16 -53
+1 -1
app/Http/Controllers/Auth/OAuthCallbackController.php
··· 38 38 39 39 Auth::login($user, remember: true); 40 40 41 - return to_route('dashboard'); 41 + return to_route('consume'); 42 42 } 43 43 }
+3 -3
resources/js/components/app-header.tsx
··· 38 38 import { UserMenuContent } from '@/components/user-menu-content'; 39 39 import { useCurrentUrl } from '@/hooks/use-current-url'; 40 40 import { cn, toUrl } from '@/lib/utils'; 41 - import { dashboard } from '@/routes'; 41 + import { consume } from '@/routes'; 42 42 import type { BreadcrumbItem, NavItem } from '@/types'; 43 43 44 44 type Props = { ··· 48 48 const mainNavItems: NavItem[] = [ 49 49 { 50 50 title: 'Dashboard', 51 - href: dashboard(), 51 + href: consume(), 52 52 icon: LayoutGridIcon, 53 53 }, 54 54 ]; ··· 156 156 </div> 157 157 158 158 <Link 159 - href={dashboard()} 159 + href={consume()} 160 160 prefetch 161 161 className="flex items-center space-x-2" 162 162 >
+3 -3
resources/js/components/app-sidebar.tsx
··· 17 17 SidebarMenuButton, 18 18 SidebarMenuItem, 19 19 } from '@/components/ui/sidebar'; 20 - import { dashboard } from '@/routes'; 20 + import { consume } from '@/routes'; 21 21 import type { NavItem } from '@/types'; 22 22 23 23 const mainNavItems: NavItem[] = [ 24 24 { 25 25 title: 'Dashboard', 26 - href: dashboard(), 26 + href: consume(), 27 27 icon: LayoutGridIcon, 28 28 }, 29 29 ]; ··· 49 49 <SidebarMenuItem> 50 50 <SidebarMenuButton 51 51 size="lg" 52 - render={<Link href={dashboard()} prefetch />} 52 + render={<Link href={consume()} prefetch />} 53 53 > 54 54 <AppLogo /> 55 55 </SidebarMenuButton>
-36
resources/js/pages/dashboard.tsx
··· 1 - import { Head } from '@inertiajs/react'; 2 - import { PlaceholderPattern } from '@/components/ui/placeholder-pattern'; 3 - import { dashboard } from '@/routes'; 4 - 5 - export default function Dashboard() { 6 - return ( 7 - <> 8 - <Head title="Dashboard" /> 9 - <div className="flex h-full flex-1 flex-col gap-4 overflow-x-auto rounded-xl p-4"> 10 - <div className="grid auto-rows-min gap-4 md:grid-cols-3"> 11 - <div className="relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border"> 12 - <PlaceholderPattern className="absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20" /> 13 - </div> 14 - <div className="relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border"> 15 - <PlaceholderPattern className="absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20" /> 16 - </div> 17 - <div className="relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border"> 18 - <PlaceholderPattern className="absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20" /> 19 - </div> 20 - </div> 21 - <div className="relative min-h-[100vh] flex-1 overflow-hidden rounded-xl border border-sidebar-border/70 md:min-h-min dark:border-sidebar-border"> 22 - <PlaceholderPattern className="absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20" /> 23 - </div> 24 - </div> 25 - </> 26 - ); 27 - } 28 - 29 - Dashboard.layout = { 30 - breadcrumbs: [ 31 - { 32 - title: 'Dashboard', 33 - href: dashboard(), 34 - }, 35 - ], 36 - };
+3 -3
resources/js/pages/welcome.tsx
··· 3 3 import AppLogoIcon from '@/components/app-logo-icon'; 4 4 import { Button } from '@/components/ui/button'; 5 5 import { Window } from '@/components/window'; 6 - import { dashboard, login } from '@/routes'; 6 + import { consume, login } from '@/routes'; 7 7 8 8 export default function Welcome() { 9 9 const { auth } = usePage().props; 10 - const target = auth.user ? dashboard().url : login().url; 10 + const target = auth.user ? consume().url : login().url; 11 11 12 12 useEffect(() => { 13 13 const handler = (event: KeyboardEvent) => { ··· 25 25 } 26 26 27 27 event.preventDefault(); 28 - router.visit(auth.user ? dashboard().url : login().url); 28 + router.visit(auth.user ? consume().url : login().url); 29 29 }; 30 30 window.addEventListener('keydown', handler); 31 31
-1
routes/web.php
··· 37 37 ->name('bluesky.oauth.redirect'); 38 38 39 39 Route::middleware(['auth'])->group(function () { 40 - Route::inertia('dashboard', 'dashboard')->name('dashboard'); 41 40 Route::inertia('discover', 'discover')->name('discover'); 42 41 Route::inertia('consume', 'consume')->name('consume'); 43 42 Route::inertia('create', 'create')->name('create');
+2 -2
tests/Feature/Auth/OAuthCallbackTest.php
··· 18 18 19 19 $this->withSession(['atproto.hint' => 'alice.bsky.social']) 20 20 ->get(route('bluesky.oauth.redirect')) 21 - ->assertRedirect(route('dashboard')); 21 + ->assertRedirect(route('consume')); 22 22 23 23 $user = User::find('did:plc:testuser1234567890abcd'); 24 24 ··· 46 46 $this->fakeBlueskyCallback($session); 47 47 48 48 $this->get(route('bluesky.oauth.redirect')) 49 - ->assertRedirect(route('dashboard')); 49 + ->assertRedirect(route('consume')); 50 50 51 51 $existing->refresh(); 52 52 expect($existing->refresh_token)->toBe('new-refresh-token')
+3 -3
tests/Feature/DashboardTest.php tests/Feature/ConsumeTest.php
··· 3 3 use App\Models\User; 4 4 5 5 test('guests are redirected to the login page', function () { 6 - $response = $this->get(route('dashboard')); 6 + $response = $this->get(route('consume')); 7 7 $response->assertRedirect(route('login')); 8 8 }); 9 9 10 - test('authenticated users can visit the dashboard', function () { 10 + test('authenticated users can visit consume', function () { 11 11 $user = User::factory()->create(); 12 12 $this->actingAs($user); 13 13 14 - $response = $this->get(route('dashboard')); 14 + $response = $this->get(route('consume')); 15 15 $response->assertOk(); 16 16 });
+1 -1
tests/Feature/InertiaSharedDataTest.php
··· 17 17 18 18 $this->actingAs($user) 19 19 ->withSession(['atproto.handle' => 'alice.bsky.social']) 20 - ->get(route('dashboard')) 20 + ->get(route('consume')) 21 21 ->assertInertia(fn ($page) => $page 22 22 ->where('auth.user.did', $user->did) 23 23 ->where('auth.handle', 'alice.bsky.social')