🔧 Shot Detail Panel Fixes - Complete

✅ Issues Fixed Successfully

Both reported issues have been resolved:

🔧 Fix #1: Restored "View Tasks" Menu Item

Problem:

The "View Tasks" menu item was accidentally removed from the actions dropdown menu.

Solution:

// 1. Added back ListTodo import in columns.ts: import { Camera, MoreHorizontal, Edit, ListTodo, Trash2, ArrowUpDown, ArrowUp, ArrowDown } from 'lucide-vue-next' // 2. Restored onViewTasks in interface: export interface ShotColumnMeta { projectId: number episodes: Array<{ id: number; name: string }> onEdit: (shot: Shot) => void onDelete: (shot: Shot) => void onViewTasks: (shot: Shot) => void // ← RESTORED onTaskStatusUpdated: (shotId: number, taskType: string, newStatus: TaskStatus) => void } // 3. Added back "View Tasks" menu item: h( DropdownMenuItem, { onMouseDown: (e: Event) => { e.stopPropagation() }, onClick: (e: Event) => { e.stopPropagation() e.preventDefault() meta.onViewTasks(shot) // ← RESTORED } }, { default: () => [ h(ListTodo, { class: 'h-4 w-4 mr-2' }), 'View Tasks', // ← RESTORED ], } ),

🔧 Fix #2: Detail Panel Toggle Button Now Works

Problem:

The detail panel toggle button couldn't show the detail panel because there was no way to select a shot and show the panel simultaneously.

Solution:

// 1. Added onViewTasks callback to shotColumns: const shotColumns = computed(() => { const meta: ShotColumnMeta = { projectId: props.projectId, episodes: episodes.value, onEdit: editShot, onDelete: deleteShot, onViewTasks: viewTasks, // ← NEW FUNCTION onTaskStatusUpdated: handleTaskStatusUpdated, } return createShotColumns(allTaskTypes.value, meta) }) // 2. Created viewTasks function that selects shot AND shows panel: const viewTasks = (shot: Shot) => { selectedShot.value = shot isDetailPanelVisible.value = true // ← SHOWS PANEL // Show mobile detail sheet on small screens if (window.innerWidth < 1024) { showMobileDetail.value = true } } // 3. Kept selectShot function for other uses (doesn't auto-show panel): const selectShot = (shot: Shot) => { selectedShot.value = shot // Don't automatically show panel - let user control via toolbar toggle button // Show mobile detail sheet on small screens if (window.innerWidth < 1024) { showMobileDetail.value = true } }

🎯 Current User Flow

Ways to Show Detail Panel:

  1. Actions → "View Tasks": Selects shot + shows detail panel immediately
  2. Toolbar Toggle Button: Shows/hides panel for currently selected shot

Ways to Select Shot (without showing panel):

Button States:

✅ Testing Checklist

📋 Implementation Summary

Key Changes Made:

Architecture Benefits:

🎉 All Issues Resolved

Both reported issues have been successfully fixed:

Issue #1: Missing "View Tasks"

Status: ✅ FIXED

Menu item restored with proper functionality

Issue #2: Toggle Button Not Working

Status: ✅ FIXED

Button now properly shows detail panel

The shot table now provides: