fix: move ViewToggle into header bars and remove subtitle

Eliminates the dedicated ViewToggle row on CockpitPage by merging
it into IncidentHeader's action group via extraActions prop. Removes
subtitle from ViewToggle component entirely — the icon + label is
self-explanatory. Cleans up showSubtitle prop from all call sites.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-04-04 01:48:09 +00:00
parent 47e71c4753
commit aca976a49a
5 changed files with 32 additions and 38 deletions

View File

@@ -12,6 +12,8 @@ interface IncidentHeaderProps {
onStatusUpdate?: () => void
onPause?: () => void
onClose?: () => void
/** Extra elements rendered in the action group (e.g. ViewToggle) */
extraActions?: React.ReactNode
}
interface EditPopoverProps {
@@ -168,6 +170,7 @@ export function IncidentHeader({
onStatusUpdate,
onPause,
onClose,
extraActions,
}: IncidentHeaderProps) {
return (
<div className="bg-card border-b border-default px-4 py-2 flex items-center gap-4 flex-wrap">
@@ -223,6 +226,7 @@ export function IncidentHeader({
</button>
)}
<OverflowMenu onPause={onPause} onClose={onClose} />
{extraActions}
</div>
</div>
)