# `MishkaCmsCoreWeb.Live.Admin.Dashboard.Runtime.RuntimeStatusLive`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core_web/live/admin/dashboard/runtime/runtime_status_live.ex#L5)

Shared expanded-row wiring for every runtime admin table (Component, Layout,
ErrorPage, Page, Stylesheet, JsHook). The expanded row shows the record's real
runtime status (`MishkaCmsCore.Runtime.RuntimeStatus`) as a live timeline that
refreshes while open.

Each page keeps its own `handle_info/2` and `handle_async/3` clauses (so they
stay grouped) and delegates the body here:

    def mount(_p, _s, socket) do
      socket =
        RuntimeStatusLive.setup(socket,
          resource: MishkaCmsCore.Runtime.JsHook,
          table_id: "js-hooks-table",
          master_action: :master_get,
          tenant_action: :get_for_tenant_with_globals,
          master_load: [:site],
          tenant_load: [:site]
        )

      # ...then ActivityFeed.setup(socket, ...) — AFTER this call.
    end

    def handle_info({:expand_row, id}, socket),
      do: {:noreply, RuntimeStatusLive.expand(socket, id)}

    def handle_async({:runtime_status_load, _id}, result, socket),
      do: {:noreply, RuntimeStatusLive.loaded(socket, result)}

`setup/2` MUST run before `ActivityFeed.setup/2`: the feed attaches a hook that
`{:halt}`s Oban broadcasts, and the realtime refresh here needs to see them
first. `tenant_action: nil` omits the `action:` option for tenant reads (the
resource's default tenant read), used by ErrorPage and Page.

# `expand`

Track the open row and load its status off the LiveView process.

# `loaded`

Render the loaded record's status into the gervaz expanded row.

# `refresh`

Re-load the open row, if any (used by realtime refresh paths).

# `refresh_if_match`

Refresh the open row when an Ash notification targets it (instant feedback on
active/precompile toggles, before the compile job's Oban event lands). Call
from the page's existing resource-notification `handle_info/2` clause.

# `setup`

Init expanded-row state and attach the realtime Oban refresh hook.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
