refactor(live-atc): extract FlightInfoSheet, SettingsSheet, BugReportDialog, DebugPanel

DebugPanel now owns the FAB, the drawer, and useDebugSimulation, and the page
mounts it behind `v-if="debugMode"` — so on the normal cockpit path the whole
simulation machinery is never constructed. That required moving `debugMode`
out of useDebugSimulation and into the page: a flag cannot both live inside the
thing it gates and be the gate. The settings sheet is the one place it is
toggled. runFullSimulation's `debugMode = true` line went with it; nothing
called that function, so the write was already unreachable.

BugReportDialog takes the useBugReport handle as a single prop rather than a
dozen individual ones. The composable stays owned by the page because the HUD's
"Report issue" button starts the screenshot capture before the dialog exists.

SettingsSheet carries its own copy of the .pm-seg segmented-control styles and
routes the theme choice back through the page, so usePmTheme.setPreference
still persists it to the cookie.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
itsrubberduck
2026-07-10 16:35:34 +02:00
parent e836edd108
commit 39a3650b4e
6 changed files with 858 additions and 704 deletions

View File

@@ -25,8 +25,6 @@ export function useDebugSimulation(
} = engine
const { setLastTransmission, clearLog, startDemoFlight } = deps
const debugMode = ref(true)
const simulationRunning = ref(false)
const simulationTrace = ref<SimulationTraceEntry[]>([])
const simulationError = ref('')
@@ -297,7 +295,6 @@ export function useDebugSimulation(
simulationTrace.value = []
simulationError.value = ''
recordedAtcStates.clear()
debugMode.value = true
try {
simulationTrace.value.push({
@@ -418,7 +415,6 @@ export function useDebugSimulation(
}
return {
debugMode,
simulationRunning,
simulationTrace,
simulationError,