chrome: the connect card's actions sit in one row
The Connect your Oficina account card's buttons share a row with the sign-in page's gap, primary first, and the confirm and success states have their own copy. Landed on local make test (go1.26.5): hub CI is blocked by the runner's damaged module cache, on Paul's ruling to merge on local checks. Reviewed by GPT-6-Astra via Codex (#25). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from fix/connect-item-when-linked into main.
3 files changed,
+22
−4
homeconnect/README.md+2 −1homeconnect/templates/home_link.html+5 −3homeconnect/view_test.go+15 −0
CI failed — run details
diff --git a/homeconnect/README.md b/homeconnect/README.md| index 291a859..4ff49dc 100644 |
| --- a/homeconnect/README.md |
| +++ b/homeconnect/README.md |
| @@ -10,5 +10,6 @@ hosts to trust. The shared Home connection package owns those checks. |
| Both screens work with JavaScript disabled. They compose Rastrillo's existing |
| attribute-based page, box and button primitives with the suite's theme; |
| -there are no new colors or CSS selectors. The Back action uses the button target |
| +there are no new colors or CSS selectors: the actions share rastrillo's form-foot |
| +row, the door's, primary first. The Back action uses the button target |
| size, and addresses isolate bidirectional text and wrap at narrow widths. |
diff --git a/homeconnect/templates/home_link.html b/homeconnect/templates/home_link.html| index a4ea289..da76a18 100644 |
| --- a/homeconnect/templates/home_link.html |
| +++ b/homeconnect/templates/home_link.html |
| @@ -2,8 +2,10 @@ |
| <header rst-page-header><div rst-page-header-titles><h1>{{.Title}}</h1></div></header> |
| <div rst-box> |
| <p>{{.Body}}</p>{{if .Address}}<p style="overflow-wrap: anywhere"><strong><bdi>{{.Address}}</bdi></strong></p>{{end}} |
| - {{if .PostAction}}<form method="post" action="{{.Action}}"><button rst-btn="primary" type="submit">{{.ActionLabel}}</button></form> |
| - {{else}}<a rst-btn="primary" href="{{.Action}}">{{.ActionLabel}}</a>{{end}} |
| - {{if .CancelLabel}}<a rst-btn="ghost" href="/">{{.CancelLabel}}</a>{{end}} |
| + {{- /* One row with the door's gap, primary first: rastrillo's form-foot. */}} |
| + <div rst-form-foot> |
| + {{- if .PostAction}}<form method="post" action="{{.Action}}"><button rst-btn="primary" type="submit">{{.ActionLabel}}</button></form> |
| + {{- else}}<a rst-btn="primary" href="{{.Action}}">{{.ActionLabel}}</a>{{end}} |
| + {{- if .CancelLabel}}<a rst-btn="ghost" href="/">{{.CancelLabel}}</a>{{end}}</div> |
| </div> |
| {{end}} |
diff --git a/homeconnect/view_test.go b/homeconnect/view_test.go| index d358223..aa02d70 100644 |
| --- a/homeconnect/view_test.go |
| +++ b/homeconnect/view_test.go |
| @@ -54,3 +54,18 @@ func TestOAuthHeadAndBodyRetainValidatedDestination(t *testing.T) { |
| t.Fatal("scriptless OAuth continuation missing", head, body) |
| } |
| } |
| + |
| +// The action and Back sit in one row with the door's gap, primary first |
| +// (Paul, 2026-10-24: stacked flush they read as a broken column). The |
| +// row is rastrillo's form-foot, the same one the door's submit sits in. |
| +func TestActionsShareOneRowPrimaryFirst(t *testing.T) { |
| + for _, post := range []bool{true, false} { |
| + html := render(t, "home-connect", PageData{Title: "T", Body: "B", Action: "/account/home", ActionLabel: "Connect", CancelLabel: "Back", PostAction: post}) |
| + row := strings.Index(html, "<div rst-form-foot>") |
| + primary, ghost := strings.Index(html, `rst-btn="primary"`), strings.Index(html, `rst-btn="ghost"`) |
| + end := strings.Index(html[max(row, 0):], "</div>") |
| + if row < 0 || primary < row || ghost < primary || end < 0 || row+end < ghost { |
| + t.Fatalf("post=%v: actions are not one row with primary first:\n%s", post, html) |
| + } |
| + } |
| +} |