diff --git a/lib/livebook_web/live/output.ex b/lib/livebook_web/live/output.ex index c8a470a32..30ffb4f07 100644 --- a/lib/livebook_web/live/output.ex +++ b/lib/livebook_web/live/output.ex @@ -15,6 +15,7 @@ defmodule LivebookWeb.Output do id: "#{@id}-output#{group_idx}_#{idx}", socket: @socket, runtime: @runtime, + cell_validity_status: @cell_validity_status, input_values: @input_values }) %> @@ -117,8 +118,11 @@ defmodule LivebookWeb.Output do live_component(LivebookWeb.Output.ControlComponent, id: id, attrs: attrs) end - defp render_output({:error, formatted, :runtime_restart_required}, %{runtime: runtime}) - when runtime != nil do + defp render_output({:error, formatted, :runtime_restart_required}, %{ + runtime: runtime, + cell_validity_status: cell_validity_status + }) + when runtime != nil and cell_validity_status == :evaluated do assigns = %{formatted: formatted, is_standalone: Livebook.Runtime.standalone?(runtime)} ~H""" diff --git a/lib/livebook_web/live/session_live/cell_component.ex b/lib/livebook_web/live/session_live/cell_component.ex index 056a46f23..46766ccd1 100644 --- a/lib/livebook_web/live/session_live/cell_component.ex +++ b/lib/livebook_web/live/session_live/cell_component.ex @@ -120,6 +120,7 @@ defmodule LivebookWeb.SessionLive.CellComponent do id={"cell-#{@cell_view.id}-evaluation#{evaluation_number(@cell_view.evaluation_status, @cell_view.number_of_evaluations)}-outputs"} socket={@socket} runtime={@runtime} + cell_validity_status={@cell_view.validity_status} input_values={@cell_view.input_values} /> <% end %>