From 88091936c523eb64e1bc0bef7996560b907fb717 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Thu, 18 Jun 2026 23:07:12 -0400 Subject: [PATCH] fix(ui): unify header/breadcrumb treatment, drop redundant back buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The page-top chrome was inconsistent: most nested views used the breadcrumb kicker + page-title pattern, but plugin sub-pages used ad-hoc "← back" links, ~11 pages stacked a breadcrumb AND a redundant ancestor back button, and two (monitors/edit, hosts/uptime) had a back button but no breadcrumb. The settings/plugin_detail page stacked all of it at once. Unify on the breadcrumb-led model: - settings/_tabs.html: drop the hardcoded "Settings" h1; the breadcrumb ("Settings › …") plus the tab strip is the header. - settings/plugin_detail: drop the "← Plugins" back button. - docker container_detail/swarm/disk + snmp/device: replace ad-hoc back links with the standard crumbs() breadcrumb. - host_agent, ansible/*, alerts/maintenance: remove redundant ancestor back buttons (the breadcrumb's parent crumbs already link there); keep lateral shortcuts (Inventory/Schedules/Browse/Targets/Groups/New). - monitors/edit, hosts/uptime: add the missing breadcrumb, drop the back link. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_016Jg27rgypiW2efULXJDtMC --- plugins/docker/templates/docker/container_detail.html | 6 ++---- plugins/docker/templates/docker/disk.html | 5 ++--- plugins/docker/templates/docker/swarm.html | 5 ++--- plugins/host_agent/templates/host_detail.html | 1 - plugins/host_agent/templates/settings_list.html | 1 - plugins/snmp/templates/snmp/device.html | 3 ++- steward/templates/alerts/maintenance.html | 1 - steward/templates/ansible/browse.html | 2 -- steward/templates/ansible/inventory/group_detail.html | 1 - steward/templates/ansible/inventory/groups.html | 1 - steward/templates/ansible/inventory/target_detail.html | 1 - steward/templates/ansible/inventory/targets.html | 1 - steward/templates/ansible/playbook_editor.html | 1 - steward/templates/ansible/run_detail.html | 1 - steward/templates/ansible/schedules.html | 1 - steward/templates/hosts/uptime.html | 3 ++- steward/templates/monitors/edit.html | 5 +++-- steward/templates/settings/_tabs.html | 5 +++-- steward/templates/settings/plugin_detail.html | 1 - 19 files changed, 16 insertions(+), 29 deletions(-) diff --git a/plugins/docker/templates/docker/container_detail.html b/plugins/docker/templates/docker/container_detail.html index 377c6a2..bf4d76e 100644 --- a/plugins/docker/templates/docker/container_detail.html +++ b/plugins/docker/templates/docker/container_detail.html @@ -1,12 +1,10 @@ {# docker/container_detail.html — full detail page for one container #} {% extends "base.html" %} +{% from "_macros.html" import crumbs %} {% block title %}{{ name }} — Docker — Steward{% endblock %} +{% block breadcrumb %}{{ crumbs([("Docker", "/plugins/docker/"), (name, "")]) }}{% endblock %} {% block content %} -
- ← All containers -
- {% if container is none %}
Container not found
diff --git a/plugins/docker/templates/docker/disk.html b/plugins/docker/templates/docker/disk.html index 8d50149..22a0e16 100644 --- a/plugins/docker/templates/docker/disk.html +++ b/plugins/docker/templates/docker/disk.html @@ -1,11 +1,10 @@ {# docker/disk.html — image/disk usage: reclaimable space, per-image sizes #} {% extends "base.html" %} +{% from "_macros.html" import crumbs %} {% block title %}Disk — Docker — Steward{% endblock %} +{% block breadcrumb %}{{ crumbs([("Docker", "/plugins/docker/"), ("Image & disk usage", "")]) }}{% endblock %} {% block content %} -
- ← All containers -

Image & disk usage

Reclaimable = space held by images no container references. Cleanup actions diff --git a/plugins/docker/templates/docker/swarm.html b/plugins/docker/templates/docker/swarm.html index b8314d1..35f3caf 100644 --- a/plugins/docker/templates/docker/swarm.html +++ b/plugins/docker/templates/docker/swarm.html @@ -1,11 +1,10 @@ {# docker/swarm.html — Swarm topology: services, replica health, nodes, placement #} {% extends "base.html" %} +{% from "_macros.html" import crumbs %} {% block title %}Swarm — Docker — Steward{% endblock %} +{% block breadcrumb %}{{ crumbs([("Docker", "/plugins/docker/"), ("Swarm", "")]) }}{% endblock %} {% block content %} -

- ← All containers -

Swarm

{% if host_groups %} diff --git a/plugins/host_agent/templates/host_detail.html b/plugins/host_agent/templates/host_detail.html index 42df49e..9b18f86 100644 --- a/plugins/host_agent/templates/host_detail.html +++ b/plugins/host_agent/templates/host_detail.html @@ -27,7 +27,6 @@ {% block content %}
- ← Host

{{ host.name }}

{% if stale %}stale{% else %}live{% endif %}
diff --git a/plugins/host_agent/templates/settings_list.html b/plugins/host_agent/templates/settings_list.html index 80c027f..93cf0d4 100644 --- a/plugins/host_agent/templates/settings_list.html +++ b/plugins/host_agent/templates/settings_list.html @@ -5,7 +5,6 @@ {% block content %}

Agent fleet

- ← Hosts

Bulk agent operations across your inventory. For a single host, use its diff --git a/plugins/snmp/templates/snmp/device.html b/plugins/snmp/templates/snmp/device.html index b8fe625..b0b1a18 100644 --- a/plugins/snmp/templates/snmp/device.html +++ b/plugins/snmp/templates/snmp/device.html @@ -1,9 +1,10 @@ {# plugins/snmp/templates/snmp/device.html #} {% extends "base.html" %} +{% from "_macros.html" import crumbs %} {% block title %}SNMP — {{ device_name }} — Steward{% endblock %} +{% block breadcrumb %}{{ crumbs([("SNMP", "/plugins/snmp/"), (device_name, "")]) }}{% endblock %} {% block content %}

- ← SNMP

{{ device_name }}

{{ device.host }}
diff --git a/steward/templates/alerts/maintenance.html b/steward/templates/alerts/maintenance.html index 6061a7e..1126e67 100644 --- a/steward/templates/alerts/maintenance.html +++ b/steward/templates/alerts/maintenance.html @@ -6,7 +6,6 @@

Maintenance Windows

diff --git a/steward/templates/ansible/browse.html b/steward/templates/ansible/browse.html index ba30058..d133869 100644 --- a/steward/templates/ansible/browse.html +++ b/steward/templates/ansible/browse.html @@ -17,7 +17,6 @@ {% endif %} Inventory Schedules - ← Run History
@@ -35,7 +34,6 @@ {% endif %} - ← Back to browse
{{ view_contents }}
diff --git a/steward/templates/ansible/inventory/group_detail.html b/steward/templates/ansible/inventory/group_detail.html index 84e6975..c5373ff 100644 --- a/steward/templates/ansible/inventory/group_detail.html +++ b/steward/templates/ansible/inventory/group_detail.html @@ -5,7 +5,6 @@ {% block content %}

Group: {{ group.name }}

- ← Groups
diff --git a/steward/templates/ansible/inventory/groups.html b/steward/templates/ansible/inventory/groups.html index da2b1e1..5a1126b 100644 --- a/steward/templates/ansible/inventory/groups.html +++ b/steward/templates/ansible/inventory/groups.html @@ -7,7 +7,6 @@

Inventory Groups

Targets - ← Ansible
diff --git a/steward/templates/ansible/inventory/target_detail.html b/steward/templates/ansible/inventory/target_detail.html index 4837f72..a2d4df6 100644 --- a/steward/templates/ansible/inventory/target_detail.html +++ b/steward/templates/ansible/inventory/target_detail.html @@ -5,7 +5,6 @@ {% block content %}

Target: {{ target.name }}

- ← Targets
diff --git a/steward/templates/ansible/inventory/targets.html b/steward/templates/ansible/inventory/targets.html index f92d3d4..750e6ab 100644 --- a/steward/templates/ansible/inventory/targets.html +++ b/steward/templates/ansible/inventory/targets.html @@ -7,7 +7,6 @@

Inventory Targets

Groups - ← Ansible
diff --git a/steward/templates/ansible/playbook_editor.html b/steward/templates/ansible/playbook_editor.html index 4d5d51e..8628a2a 100644 --- a/steward/templates/ansible/playbook_editor.html +++ b/steward/templates/ansible/playbook_editor.html @@ -5,7 +5,6 @@ {% block content %}

{{ "Edit playbook" if editing else "New playbook" }}

- ← Browse
{% if error %}
{{ error }}
{% endif %} diff --git a/steward/templates/ansible/run_detail.html b/steward/templates/ansible/run_detail.html index 0545ac8..ec0b06f 100644 --- a/steward/templates/ansible/run_detail.html +++ b/steward/templates/ansible/run_detail.html @@ -4,7 +4,6 @@ {% block breadcrumb %}{{ crumbs([("Ansible", "/ansible/"), ("Run " ~ run.id[:8], "")]) }}{% endblock %} {% block content %}
- ← Runs

Run Detail

{% if run.status.value in ("running", "queued") and session.user_role in ("operator", "admin") %} diff --git a/steward/templates/ansible/schedules.html b/steward/templates/ansible/schedules.html index f9c9d9e..d54fd86 100644 --- a/steward/templates/ansible/schedules.html +++ b/steward/templates/ansible/schedules.html @@ -14,7 +14,6 @@
diff --git a/steward/templates/hosts/uptime.html b/steward/templates/hosts/uptime.html index 7a7230e..ff0d0ac 100644 --- a/steward/templates/hosts/uptime.html +++ b/steward/templates/hosts/uptime.html @@ -1,9 +1,10 @@ {% extends "base.html" %} +{% from "_macros.html" import crumbs %} {% block title %}Uptime / SLA — Steward{% endblock %} +{% block breadcrumb %}{{ crumbs([("Hosts", "/hosts/"), ("Uptime / SLA", "")]) }}{% endblock %} {% block content %}

Uptime / SLA

- ← Hosts
{# ── Summary pills ──────────────────────────────────────────────────────────── #} diff --git a/steward/templates/monitors/edit.html b/steward/templates/monitors/edit.html index ac383b8..4df8b02 100644 --- a/steward/templates/monitors/edit.html +++ b/steward/templates/monitors/edit.html @@ -1,10 +1,11 @@ {% extends "base.html" %} +{% from "_macros.html" import crumbs %} {% from "monitors/_fields.html" import type_fields, toggle_script %} {% block title %}Edit Monitor — Steward{% endblock %} +{% block breadcrumb %}{{ crumbs([("Monitors", "/monitors/"), ("Edit monitor", "")]) }}{% endblock %} {% block content %}
- ← Monitors -

Edit Monitor

+

Edit Monitor

{% set inp = "width:100%;padding:0.4rem 0.65rem;background:var(--bg);border:1px solid var(--border-mid);border-radius:4px;color:var(--text);font-size:0.88rem;" %} diff --git a/steward/templates/settings/_tabs.html b/steward/templates/settings/_tabs.html index 97e1201..490ad20 100644 --- a/steward/templates/settings/_tabs.html +++ b/steward/templates/settings/_tabs.html @@ -1,5 +1,6 @@ -{# settings/_tabs.html — include at top of each settings section #} -

Settings

+{# settings/_tabs.html — include at top of each settings section. + No section

: the breadcrumb kicker ("Settings › …") names the section and + the tab strip is the visual header, so we don't stack a redundant title. #}
{% set tabs = [ ("general", "General", "/settings/general/"), diff --git a/steward/templates/settings/plugin_detail.html b/steward/templates/settings/plugin_detail.html index b0a1fd7..91a7d76 100644 --- a/steward/templates/settings/plugin_detail.html +++ b/steward/templates/settings/plugin_detail.html @@ -8,7 +8,6 @@ {% include "settings/_tabs.html" %}
- ← Plugins

{{ plugin.get('name', plugin._dir) }}

v{{ plugin.get('version', '?') }} {% if fail_reason %}