diff --git a/lib/towerops_web/components/layouts.ex b/lib/towerops_web/components/layouts.ex
index 7b7f56e6..c1bec5a7 100644
--- a/lib/towerops_web/components/layouts.ex
+++ b/lib/towerops_web/components/layouts.ex
@@ -7,6 +7,7 @@ defmodule ToweropsWeb.Layouts do
alias ToweropsWeb.Components.ConsentPrompt
alias ToweropsWeb.Components.CookieConsent
+ alias ToweropsWeb.Helpers.StatusHelpers
alias ToweropsWeb.Live.Components.GlobalSearchComponent
require Logger
@@ -1046,4 +1047,18 @@ defmodule ToweropsWeb.Layouts do
"""
end
+
+ @doc """
+ Returns the page title with status emoji prepended based on organization health.
+ """
+ def status_title(assigns) do
+ page_title = assigns[:page_title] || "TowerOps"
+ organization = get_in(assigns, [:current_scope, Access.key(:organization)])
+
+ if organization do
+ StatusHelpers.title_with_status(page_title, organization)
+ else
+ page_title
+ end
+ end
end
diff --git a/lib/towerops_web/components/layouts/root.html.heex b/lib/towerops_web/components/layouts/root.html.heex
index 0587578b..698fd994 100644
--- a/lib/towerops_web/components/layouts/root.html.heex
+++ b/lib/towerops_web/components/layouts/root.html.heex
@@ -27,7 +27,7 @@
<.live_title suffix=" | TowerOps">
- {assigns[:page_title] || "TowerOps"}
+ {status_title(assigns)}