From 69aaf641657d3c25b5119cd59b18eff12e0c8c34 Mon Sep 17 00:00:00 2001
From: lrnselfreliance <33263708+lrnselfreliance@users.noreply.github.com>
Date: Tue, 11 Aug 2026 19:12:02 -0600
Subject: [PATCH] ui: the Open button rejoins the service's other actions
(#657)
On the Control tab, each service's actions -- start/stop, restart, logs -- sit in a
`.wrolpi-button-row`, a wrapping flex row. Open sat outside it, after the logs modal,
so it was a block-level sibling of the row rather than a member of it: it landed on its
own line under the others, on both the mobile and the desktop row.
Move it inside the row, after logs. Nothing else changes -- same icon, same link, same
order left to right -- and the row already wraps, so a narrow Actions column breaks it
where it needs to instead of hard-coding a break at Open.
The two row components are now exported so the test can mount them: `Media` renders
neither branch under jsdom, where no media query matches, so `ServicesSection` yields no
rows there at all and the buttons were untestable through the page. The test asserts
that Open shares a `.wrolpi-button-row` with stop, restart and logs, and it fails on the
old layout.
68 suites / 1202 tests pass; `npm run build` is clean.
---
app/src/components/admin/ControllerPage.js | 50 ++++++++++---------
.../components/admin/ControllerPage.test.js | 44 +++++++++++++++-
2 files changed, 69 insertions(+), 25 deletions(-)
diff --git a/app/src/components/admin/ControllerPage.js b/app/src/components/admin/ControllerPage.js
index 5c39d240..05d1284c 100644
--- a/app/src/components/admin/ControllerPage.js
+++ b/app/src/components/admin/ControllerPage.js
@@ -270,7 +270,9 @@ function ServiceLogsModal({
}
// Mobile service row - simplified layout
-function MobileServiceRow({service, onAction}) {
+// Exported so tests can mount a row directly: `Media` renders neither branch in jsdom,
+// where no media query matches, so `ServicesSection` produces no rows at all there.
+export function MobileServiceRow({service, onAction}) {
const {
loading, logsOpen, setLogsOpen, logs, logsLoading, linesCount, countdown, logsRef,
handleAction, fetchLogs, handleViewLogs, handleLinesChange, handleDownloadLogs,
@@ -320,6 +322,17 @@ function MobileServiceRow({service, onAction}) {
role='primary'
onClick={handleViewLogs}
/>
+ {viewUrl && (
+