sirgwain / craig-stars

Web based Stars! clone
https://craig-stars.net
MIT License
8 stars 3 forks source link

Opening one of the "command" pages blanks out enemy fleets and ship counts #146

Closed tmcmh closed 3 weeks ago

tmcmh commented 3 weeks ago

When you open a command page like Ship Design and then hit 'Save' and return to the main map, the information on any ships not your own is missing: no fleet markers, no ship counts.

If you exit the game and re-enter, the information is all there. Of course that's not entirely satisfactory because you get put back at the beginning of the message queue, which can be quite long.

sirgwain commented 3 weeks ago

I don't see this when I try.

Any other information you can provide to help are reproduce it? I just tried in chrome and safari, creating and then editing a design. My fleet counts under planets and in flight stayed the same.

I've had issues like this before and it's caused by the server returning some incomplete state that I replace on the client, which causes lost info until you refresh. I hoped I had found all those edge cases though. :)

tmcmh commented 3 weeks ago

I'm using Chrome Version 125.0.6422.142 (Official Build) (arm64) on a Mac Mini running Ventura 13.6.7. I've only seen it when I open "Ship Designer" from the Command menu. (I haven't checked all the other commands or reports).

I go back to the game by clicking on the name of the game in the upper left corner.

tmcmh commented 3 weeks ago

Experimenting with this some more, I think it happens when I delete a design in the Ship Designer. I've been able to recreate the effect twice; but when I look at Ship Designer (but don't add or delete a design) then it seems OK.

sirgwain commented 3 weeks ago

Oh! I missed the "fleets not your own" part. That makes sense. I'm not returning all the intel a player knows, just their own fleets/designs/starbases. I need to not overwrite intel after deleting a design.