Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions jesse/mcp/tools/services/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,27 @@ def create_optimization_draft_service(
'warm_up_candles': int(warm_up_candles),
}

# Persist the FULL results shape the dashboard's optimization store expects (see
# dashboard-v1 stores/optimizationStore.ts state()). The frontend's loadSession patches
# this state in and then reads nested objects directly (results.progressbar.current,
# results.exception.error); a partial shape here left those undefined and crashed
# "Failed to load session". Keep this in sync with the store's default results.
state_dict = {
'form': form_data,
'results': {
'showResults': False,
'executing': False,
'logsModal': False,
'status': '',
'progressbar': {'current': 0, 'estimated_remaining_seconds': 0},
'routes_info': [],
'best_candidates': [],
'metrics': [],
'generalInfo': [],
'selectedObjectiveMetric': '',
'infoLogs': '',
'info': [],
'exception': {'error': '', 'traceback': ''},
'alert': {'message': '', 'type': ''},
},
}
Expand Down
Loading