diff --git a/openspec/changes/user-accounts/tasks.md b/openspec/changes/user-accounts/tasks.md index e4c6f06..5cfa551 100644 --- a/openspec/changes/user-accounts/tasks.md +++ b/openspec/changes/user-accounts/tasks.md @@ -46,7 +46,7 @@ - [x] 8.1 `[haiku]` Create `src/app/(public)/layout.tsx` — minimal layout for public pages (shared fonts/theme, no sidebar) - [x] 8.2 `[haiku]` Move current `src/app/page.tsx` to `src/app/app/page.tsx` (workspace at `/app`) -- [ ] 8.3 `[sonnet]` Create `src/app/app/layout.tsx` — protected layout with `SessionProvider`, user menu nav bar, sidebar with settings link +- [x] 8.3 `[sonnet]` Create `src/app/app/layout.tsx` — protected layout with `SessionProvider`, user menu nav bar, sidebar with settings link - [ ] 8.4 `[haiku]` Update any hardcoded `/` links in existing components to `/app` ## 9. Landing Page diff --git a/src/app/app/layout.tsx b/src/app/app/layout.tsx new file mode 100644 index 0000000..312c704 --- /dev/null +++ b/src/app/app/layout.tsx @@ -0,0 +1,59 @@ +'use client'; + +import { SessionProvider } from 'next-auth/react'; +import Link from 'next/link'; +import { Settings } from 'lucide-react'; + +/** + * Protected app layout. + * + * Wraps all /app/* pages with SessionProvider so that auth hooks + * (useSession, signIn, signOut) are available throughout the workspace. + * + * Contains a minimal top nav bar with: + * - App title / home link + * - Settings link (→ /app/settings) + * - Placeholder slot for the user menu (task 13.1) + * + * The full user-menu dropdown (avatar, sign-out, etc.) is wired up in task 13.1. + */ +export default function AppLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + {/* Minimal nav bar — user menu dropdown added in task 13.1 */} +
+ + Candle Annotator + + + +
+ + {/* Push content below the fixed nav bar */} +
+ {children} +
+
+ ); +}