From f2dfa9bface4ca5171864c98d3c2f05af2c946f3 Mon Sep 17 00:00:00 2001 From: clawbot <35+clawbot@noreply.example.org> Date: Fri, 2 Oct 2026 20:01:04 +0000 Subject: [PATCH] Scope the entrypoint edit check's buttons; fit the type row at 360px The browser test's entrypoint edit check clicked any Cancel and Save on the page, which now also match the add target form's hidden buttons, so the clicks timed out. It finds them inside the edit form. The type choice takes p-2 and flex-1 in place of w-32, so it, Next and Cancel share one row on a 360px-wide phone with "Database" shown in full. Model: opus-5-5 --- internal/server/alpine_browser_test.go | 8 ++++++-- templates/source_detail.html | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/internal/server/alpine_browser_test.go b/internal/server/alpine_browser_test.go index 7e08787..a884e20 100644 --- a/internal/server/alpine_browser_test.go +++ b/internal/server/alpine_browser_test.go @@ -484,9 +484,13 @@ func checkEntrypointEdit( ) { t.Helper() + // Cancel and Save are found inside the edit form, since the add + // target form has buttons of the same names. const ( editForm = `form[action$="/edit"]` input = editForm + ` input[name="description"]` + cancelEdit = `//form[contains(@action, "/edit")]/button[text()="Cancel"]` + saveEdit = `//form[contains(@action, "/edit")]/button[text()="Save"]` description = `//span[text()="Entrypoint"]` edit = `//button[text()="Edit"]` ) @@ -507,7 +511,7 @@ func checkEntrypointEdit( require.NoError(t, chromedp.Run( ctx, chromedp.SendKeys(input, "draft", chromedp.ByQuery), )) - click(ctx, t, `//button[text()="Cancel"]`) + click(ctx, t, cancelEdit) assert.True(t, hidden(ctx, editForm), "clicking Cancel does not hide the edit form") assert.True(t, shown(ctx, description), @@ -549,7 +553,7 @@ func checkEntrypointEdit( require.NoError(t, chromedp.Run( ctx, chromedp.SendKeys(input, "Billing sender", chromedp.ByQuery), )) - click(ctx, t, `//button[text()="Save"]`) + click(ctx, t, saveEdit) assert.True(t, shown(ctx, `//span[text()="Billing sender"]`), "saving the edit form does not change the description") diff --git a/templates/source_detail.html b/templates/source_detail.html index 321357f..44c9171 100644 --- a/templates/source_detail.html +++ b/templates/source_detail.html @@ -133,11 +133,13 @@ and the hidden type field submitted with them, exist only while that type is chosen. A refused submission comes back open on its type, with the values entered; - Cancel empties the form. --> + Cancel empties the form. The type choice's p-2, narrower + than an input's own padding, keeps it, Next and Cancel on + one row on a 360px-wide phone. -->