From 3cdfba636e647590f7933d39c3032f18f1b81435 Mon Sep 17 00:00:00 2001 From: Knacky Date: Sun, 21 Jun 2026 23:16:00 +0200 Subject: [PATCH] feat(frontend): merge Schedule tab into Description on EngagementDetailPage Reduces from 3 tabs (Schedule / Description / Simulations) to 2 (Description / Simulations). Schedule content (start/end/status/created_at + Edit button) moved into a header block at the top of the Description panel, separated from description text by a hairline
. Default tab changed from 'schedule' to 'description'. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/pages/EngagementDetailPage.tsx | 53 ++++++++++----------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/frontend/src/pages/EngagementDetailPage.tsx b/frontend/src/pages/EngagementDetailPage.tsx index 47ca46c..f0ff78e 100644 --- a/frontend/src/pages/EngagementDetailPage.tsx +++ b/frontend/src/pages/EngagementDetailPage.tsx @@ -1,4 +1,4 @@ -import { useParams } from 'react-router-dom'; +import { useParams, Link } from 'react-router-dom'; import { extractApiError } from '@/api/client'; import { useAuth } from '@/hooks/useAuth'; import { useEngagement } from '@/hooks/useEngagements'; @@ -11,9 +11,8 @@ import { SimulationList } from '@/components/SimulationList'; import { ExportEngagementButton } from '@/components/ExportEngagementButton'; import { BackLink } from '@/components/BackLink'; import { Tabs } from '@/components/Tabs'; -import { Link } from 'react-router-dom'; -type TabId = 'schedule' | 'description' | 'simulations'; +type TabId = 'description' | 'simulations'; export function EngagementDetailPage(): JSX.Element { const { id } = useParams<{ id: string }>(); @@ -23,7 +22,7 @@ export function EngagementDetailPage(): JSX.Element { const detail = useEngagement(numericId); const simsQuery = useEngagementSimulations(numericId); - const [activeTabRaw, setActiveTab] = useHashTab('schedule'); + const [activeTabRaw, setActiveTab] = useHashTab('description'); const activeTab = activeTabRaw as TabId; if (detail.isLoading) return ; @@ -41,7 +40,6 @@ export function EngagementDetailPage(): JSX.Element { const simCount = simsQuery.data?.length; const tabs = [ - { id: 'schedule', label: 'Schedule' }, { id: 'description', label: 'Description' }, { id: 'simulations', label: 'Simulations', count: simCount }, ]; @@ -60,12 +58,7 @@ export function EngagementDetailPage(): JSX.Element { {canEditEngagements ? ( -
- - - Edit - -
+ ) : null} @@ -76,25 +69,27 @@ export function EngagementDetailPage(): JSX.Element { id={`tabpanel-${activeTab}`} aria-labelledby={`tab-${activeTab}`} > - {activeTab === 'schedule' && ( -
-

Schedule

-
-
Start date
-
{eng.start_date}
-
End date
-
{eng.end_date ?? '—'}
-
Status
-
{eng.status}
-
Created at
-
{eng.created_at}
-
-
- )} - {activeTab === 'description' && ( -
-

Description

+
+
+
+
Start date
+
{eng.start_date}
+
End date
+
{eng.end_date ?? '—'}
+
Status
+
+
Created at
+
{eng.created_at}
+
+ {canEditEngagements ? ( + + Edit + + ) : null} +
+
+

Description

{eng.description?.trim() ? eng.description : 'No description provided.'}