How to get app.html.heex to use assigns properly with LiveView

Yeah in the modern era you end up needing to pre assign(:current_user, nil) somewhere. You can enforce this at compile time by using a functional component for your header:

attr :current_user, :map, required: true
def header(assigns) do
  ~H""
end