From e9d59a4ca227cac9df43b83ff5f7c8379c0af92c Mon Sep 17 00:00:00 2001 From: Dan Crosby Date: Wed, 15 Jul 2026 13:29:06 -0700 Subject: [PATCH] Distinguish unlisted games from missing saves --- .../go/net/eagle0/admin_server/admin_server.go | 16 +++++++++++++--- .../admin_server/templates/game_detail.html | 12 +++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/main/go/net/eagle0/admin_server/admin_server.go b/src/main/go/net/eagle0/admin_server/admin_server.go index 7d461cd91f..24a7b7bac4 100644 --- a/src/main/go/net/eagle0/admin_server/admin_server.go +++ b/src/main/go/net/eagle0/admin_server/admin_server.go @@ -714,7 +714,8 @@ type GamesPageData struct { type GameDetailPageData struct { Title string Game GameInfo - IsOrphaned bool + IsUnlisted bool + CanImport bool BuildInfo BuildInfo } @@ -883,6 +884,8 @@ func handleGameDetailPage(w http.ResponseWriter, r *http.Request, gameIDHex stri } var game *GameInfo + isUnlisted := false + canImport := false for i := range games { if games[i].GameIDInt == gameID { game = &games[i] @@ -909,17 +912,24 @@ func handleGameDetailPage(w http.ResponseWriter, r *http.Request, gameIDHex stri return } + isUnlisted = true + canImport = !existsResp.ExistsInMemory && existsResp.ExistsOnDisk + runStatus := "Running (not listed)" + if canImport { + runStatus = "Persisted save (not listed)" + } game = &GameInfo{ GameID: gameIDHex, GameIDInt: gameID, - RunStatus: "Persisted save (not indexed)", + RunStatus: runStatus, } } data := GameDetailPageData{ Title: fmt.Sprintf("Game %s", gameIDHex), Game: *game, - IsOrphaned: game.RunStatus == "Persisted save (not indexed)", + IsUnlisted: isUnlisted, + CanImport: canImport, BuildInfo: getBuildInfo(), } diff --git a/src/main/go/net/eagle0/admin_server/templates/game_detail.html b/src/main/go/net/eagle0/admin_server/templates/game_detail.html index b12257be3e..b47defb8af 100644 --- a/src/main/go/net/eagle0/admin_server/templates/game_detail.html +++ b/src/main/go/net/eagle0/admin_server/templates/game_detail.html @@ -11,7 +11,7 @@ {{.Game.RunStatus}} Download Save - {{if .IsOrphaned}} + {{if .CanImport}} -{{if .IsOrphaned}} +{{if .IsUnlisted}}
- This game still has persisted history but is missing from the running-games index. + This game still exists but is missing from the game list currently served by Eagle. + {{if .CanImport}} Use the raw action history below to rewind past the corrupt action, then click Import and Continue. The imported game initially has no assigned human players; assign your faction after import. + {{else}} + Its in-memory controller is still running, so normal history and rewind remain available below. + {{end}}
+{{if .CanImport}}
{{end}} +{{end}}