fix cross-process scenario switching and stale flights on scenario change
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
2026-04-16 01:42:10 -03:00
parent 22c924d3b0
commit e03ac3982a
5 changed files with 13 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted, watch, inject } from 'vue'
import { ref, onMounted, watch, inject, type Ref } from 'vue'
import { Panel, SplitPane, LogRenderer } from 'soleprint-ui'
import NotificationCard from '../components/NotificationCard.vue'
import HandoverBrief from '../components/HandoverBrief.vue'
@@ -12,7 +12,7 @@ const fceStatus = ref<'idle' | 'processing' | 'live' | 'error'>('idle')
const handoverStatus = ref<'idle' | 'processing' | 'live' | 'error'>('idle')
const notification = ref<any>(null)
const handoverBrief = ref<any>(null)
const scenarioVersion = inject<any>('scenarioVersion')
const scenarioVersion = inject<Ref<number>>('scenarioVersion', ref(0))
const showOps = inject<any>('showOps')
const showInternals = inject<any>('showInternals')
@@ -21,7 +21,7 @@ const { agentStatus, entries, graphNodes, currentRun, connect } = useAgentEvents
// Connect WebSocket immediately so we don't miss events
onMounted(connect)
watch(scenarioVersion, () => {
watch(() => scenarioVersion.value, () => {
loadFlights()
notification.value = null
handoverBrief.value = null