Skip to content

Make structure icon recovery state-sourced after runtime renderer disruption#3

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/investigate-rendering-bug
Closed

Make structure icon recovery state-sourced after runtime renderer disruption#3
Copilot wants to merge 4 commits intomainfrom
copilot/investigate-rendering-bug

Conversation

Copy link

Copilot AI commented Mar 20, 2026

Description:

I don't have a clean repro for the mid-match structure icon issue yet, so this PR is meant to reduce the chance of structure icons getting lost after a renderer reset.

This also does not address the separate issue where structure icons sometimes fail to show from game start.

This changes structure icon rendering to rebuild from the current game state instead of mostly waiting for future unit updates.

Main changes:

  • make StructureIconsLayer.redraw() rebuild structure icons from game.units()
  • rebuild the layer again after WebGL context restore
  • recalculate structure positions after resize/reset
  • clear stale Pixi children before rebuilding
  • add focused tests around redraw/rebuild behavior

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced

Please put your Discord username so you can be contacted if a bug or regression is found:

skigim

Copilot AI and others added 2 commits March 20, 2026 16:43
Co-authored-by: Skigim <217411484+Skigim@users.noreply.github.com>
Co-authored-by: Skigim <217411484+Skigim@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate rare runtime rendering bug in Skigim/OpenFrontIO Recover structure rendering from runtime layer disruption and add render debug hooks Mar 20, 2026
Copilot AI requested a review from Skigim March 20, 2026 16:50
Co-authored-by: Skigim <217411484+Skigim@users.noreply.github.com>
Copilot AI changed the title Recover structure rendering from runtime layer disruption and add render debug hooks Make structure icon recovery state-sourced after runtime renderer disruption Mar 20, 2026
@sonarqubecloud
Copy link

Copy link
Owner

Skigim commented Mar 20, 2026

Closing this fork-local PR in favor of the upstream PR: openfrontio#3480

@Skigim Skigim closed this Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants