Add deferred world spawn tracking and visible failure badge during background population#1138
Open
Copilot wants to merge 3 commits into
Open
Add deferred world spawn tracking and visible failure badge during background population#1138Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
5 tasks
5 tasks
Owner
|
Note from workspace: I pre-seeded the first slice of the plan (SpawnTracker + live failure badge in the deferred populating indicator + wiring + main.ts integration + window.__worldPopulationReport) so the PR can focus on review / polish / remaining bullets rather than starting from zero. See detailed comment + verification steps on the parent issue #1135. Files touched in support of this PR:
The changes are intentionally minimal and safe. Happy path perf unaffected. Please continue with the WIP plan (e.g. also update the duplicate DOM creation path if needed, add a small css rule for .deferred-fail if the inline style is insufficient, consider exposing failed count from BackgroundProcessor.onComplete, etc.). Then open for review. |
Copilot
AI
changed the title
[WIP] Fix loading UX for background object population
Add deferred world spawn tracking and visible failure badge during background population
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After interactive load completes, deferred/background population could fail silently (
console.warn/erroronly), leaving users with missing objects and no clear signal. This change adds centralized spawn failure accounting and surfaces failures directly in the deferred HUD while preserving normal happy-path behavior.Spawn telemetry + debug surface
src/world/spawn-tracker.tsto track:attemptCount,successCount,failCountbyType)errors)window.__worldPopulationReportfor debugging/tests.Wired into existing failure/creation paths
generation-core.tsgenerateMapstartprocessMapEntitygeneration-decorators.tsbackground-processor.tsdeferred-loader.tsDeferred indicator: user-visible failure signal
.deferred-failbadge.setDeferredFailures(failed: number)to loading-screen API surface.core/main.tsto sync badge from tracker report."{n} objects failed to load").API/export updates
src/ui/loading-screen.tssrc/ui/loading-screen-progress.tssrc/ui/index.tsExample (new debug surface):