Table of Contents

Method ReloadApp

Namespace
GrindFest
Assembly
GrindFest.dll

ReloadApp()

Re-evaluates app.js, so the UI starts from a state neither a test nor a player left behind: every panel closed, every tab back on its default, every bit of React state gone.

A reload is the only reset that reaches the state a panel keeps while it stays mounted but hidden. App.tsx toggles each panel's visible prop instead of unmounting it (for instant open), so the tab the player picked survives a close: two CharacterScreenUiTests failed with "Timeout waiting for 'Strength' visible" because the Skills tab - picked by hand before the run - was still selected, so StatsTab was never rendered. Closing the panel cannot fix that, and naming the default tab from here would put app internals in the test framework.

The app is quick back: its __grindfest.openCharacterScreen is registered again three frames after JSRunner.ForceReload() (measured 2026-09-16), and the 23 s UiReloadTests takes is the menu opening, not the reload. That is the mount, not the cost - an app that has just mounted keeps initialising behind the scene, and a test running in that window pays for it. Measured by doing this before every test: 888 s of a 1194 s suite outside the test bodies, against 119 s of a 358 s suite without it, about 8,5 s per test. Called only for the tests that read the UI (NeedsFreshUi).

public static IEnumerator ReloadApp()

Returns

IEnumerator