--- task_id: sprint_4_story_1_task_1 story_id: sprint_4_story_1 sprint_id: sprint_4 status: not_started type: frontend assignee: Frontend Developer 1 created_date: 2025-11-05 estimated_hours: 4 --- # Task 1: Create Story Detail Page Route and Layout ## Description Create the Story detail page route at `app/(dashboard)/stories/[id]/page.tsx` with a two-column layout structure. This task establishes the foundational page structure that will be enhanced with components in subsequent tasks. ## What to Do 1. Create new directory: `app/(dashboard)/stories/[id]/` 2. Create page component: `page.tsx` 3. Copy layout structure from Epic detail page (`app/(dashboard)/epics/[id]/page.tsx`) 4. Implement two-column grid layout (main content + sidebar) 5. Add basic page wrapper and container 6. Set up TypeScript types and props 7. Test route accessibility **Key Changes from Epic Page**: - Route: `/stories/[id]` instead of `/epics/[id]` - Page title: "Story Detail" instead of "Epic Detail" - Breadcrumb: Add Story level in hierarchy - Prepare sections: Description, Acceptance Criteria (placeholder), Tasks (placeholder for Story 2) ## Files to Modify/Create - `app/(dashboard)/stories/[id]/page.tsx` (new, ~100 lines initial structure) ## Implementation Details ```typescript // app/(dashboard)/stories/[id]/page.tsx import { Suspense } from 'react'; import { notFound } from 'next/navigation'; import { Card } from '@/components/ui/card'; import { Skeleton } from '@/components/ui/skeleton'; interface StoryDetailPageProps { params: { id: string }; } export default function StoryDetailPage({ params }: StoryDetailPageProps) { return (
{/* Breadcrumb Navigation - Task 1 */}
{/* Placeholder for breadcrumb */}
{/* Story Header - Task 2 */}
{/* Placeholder for story header */}
{/* Two-column layout */}
{/* Main Content Column */}
{/* Story Description Card */} {/* Placeholder for description - Task 4 */} {/* Acceptance Criteria Card */} {/* Placeholder for acceptance criteria - Story 3 */} {/* Tasks Section - Story 2 dependency */} {/* Placeholder for tasks list - Story 2 */}
{/* Metadata Sidebar Column - Task 3 */}
); } // Loading state export function StoryDetailPageSkeleton() { return (
); } ``` ## Acceptance Criteria - [ ] Route `/stories/[id]` is accessible (no 404 error) - [ ] Page renders with two-column layout on desktop - [ ] Layout is responsive (single column on mobile) - [ ] TypeScript types are properly defined - [ ] No console errors or warnings - [ ] Loading skeleton displays during data fetch ## Testing ```bash # Start dev server npm run dev # Test route # Navigate to: http://localhost:3000/stories/[any-valid-story-id] # Should see basic page structure (not 404) # Test responsive layout # Resize browser window # Desktop (> 1024px): Two columns # Mobile (< 1024px): Single column ``` ## Dependencies **Prerequisites**: - ✅ Next.js 15 app directory structure - ✅ shadcn/ui Card and Skeleton components **Blocks**: - Task 2, 3, 4, 5, 6 (all depend on page structure existing) ## Estimated Time 4 hours ## Notes This task creates the "skeleton" of the Story detail page. Subsequent tasks will fill in the components and functionality. Keep the structure simple and focus on layout correctness.