mirror of
https://github.com/nearai/ironclaw.git
synced 2026-09-02 23:56:24 +08:00
fix(gateway): wire standalone missions tab (load, back, refresh) (#2745)
Three parallel wiring gaps in the engine v2 Missions tab — each one was code that only handled the Projects drill-in (cr-*) path and silently no-op'd on the standalone tab, so the surface looked empty or frozen even when the backend returned data: - switchTab had no branch for 'missions', so opening the tab rendered the panel shell but never fetched data. /api/engine/missions returned rows; the table stayed empty. - close-mission-detail only hid the cr-detail drawer, so the Back button on the standalone detail view did nothing. - refreshMissionView refreshed the detail view or the project drill-in but not the Missions list, so fire/pause/resume actions succeeded but the list stayed stale. [skip-regression-check]
This commit is contained in:
@@ -732,6 +732,7 @@ function switchTab(tab) {
|
||||
// the Projects tab so widgets don't keep running in the background.
|
||||
crBackToOverview();
|
||||
}
|
||||
if (tab === 'missions') loadMissions();
|
||||
if (tab === 'routines') loadRoutines();
|
||||
if (tab === 'logs') { connectLogSSE(); applyLogFilters(); }
|
||||
else if (logEventSource) { logEventSource.close(); logEventSource = null; }
|
||||
|
||||
@@ -346,7 +346,11 @@ document.addEventListener('click', function(e) {
|
||||
openMissionDetail(el.dataset.id);
|
||||
break;
|
||||
case 'close-mission-detail':
|
||||
if (crCurrentProjectId) { document.getElementById('cr-detail').style.display = 'none'; }
|
||||
if (crCurrentProjectId) {
|
||||
document.getElementById('cr-detail').style.display = 'none';
|
||||
} else {
|
||||
closeMissionDetail();
|
||||
}
|
||||
break;
|
||||
case 'fire-mission':
|
||||
e.stopPropagation();
|
||||
|
||||
@@ -813,6 +813,8 @@ function refreshMissionView(missionId) {
|
||||
openMissionDetail(missionId);
|
||||
} else if (crCurrentProjectId) {
|
||||
drillIntoProject(crCurrentProjectId);
|
||||
} else if (currentTab === 'missions') {
|
||||
loadMissions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user