Skip to main content

HealOverlay

Source: components/ui/modal/HealOverlay.tsx (41 lines) The HealOverlay is a full-screen modal that blocks all user interaction during database reconstruction operations. It operates in two distinct modes driven by the useHealStore.

Dual-Mode Display

The overlay renders one of two states based on the store:

Healing Mode

Shown during Triple-Write saga operations and Manual Resync. The overlay displays a spinning loader with the current operation status message. Both the confirm and cancel buttons are no-ops, preventing the user from dismissing the modal during an atomic operation. Triggered by:

Crash Mode

Shown when an unrecoverable error is detected. The overlay displays the crash message with a single “OK” button that triggers nuclearReset() from the recovery-module:
The nuclearReset() function from the Kotlin recovery-module performs a full process restart, clearing all in-memory state and triggering Amnesia Mode on the next launch.

Mount Location

The HealOverlay is mounted at the root _layout.tsx level alongside the HydrationEngine. Because it sits above the navigation stack, it can block interaction with any screen in the app regardless of the current route.

Store Integration

The overlay reads from useHealStore which exposes three actions: