Needs you: label merge authority's wait_mac as the Mac decision's Wait
Projects UX labels the Mac decision's choices from work.decide.mac.*; merge authority's card offers wait_mac, so its label key drops the suffix. The page test now expects the wait_mac value.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+4
−2
internal/equipo/work_views.go+3 −1internal/thintest/projects_pages_test.go+1 −1
CI failed — run details
diff --git a/internal/equipo/work_views.go b/internal/equipo/work_views.go| index ce4ad53b..087b0f83 100644 |
| --- a/internal/equipo/work_views.go |
| +++ b/internal/equipo/work_views.go |
| @@ -496,7 +496,9 @@ func decisionOf(t wire.Task, v taskLine) *decisionView { |
| for _, o := range c.Options { |
| label := copyText("chat.card." + o) |
| if d.Mac { |
| - label = copyText("work.decide.mac." + o) |
| + // Merge authority's card offers wait_mac; its label here is |
| + // the Mac decision's Wait. |
| + label = copyText("work.decide.mac." + strings.TrimSuffix(o, "_mac")) |
| } |
| d.Choices = append(d.Choices, decisionChoice{Value: o, Label: label, Primary: o == wire.ChoiceMerge}) |
| } |
diff --git a/internal/thintest/projects_pages_test.go b/internal/thintest/projects_pages_test.go| index ece6ead4..3d3d1d05 100644 |
| --- a/internal/thintest/projects_pages_test.go |
| +++ b/internal/thintest/projects_pages_test.go |
| @@ -251,7 +251,7 @@ func TestPagesTaskDecisionsSayWhy(t *testing.T) { |
| needs := a.get(owner, "/tasks?needs=you", 200) |
| card := regexp.MustCompile(`(?s)<div equipo-decision[^>]*data-decision="` + g.unchecked + `">.*?</div>\n</div>`).FindString(needs) |
| for _, want := range []string{"Review approved. Checks need a Mac, and no Mac is set up to run them.", "Merge without checks?", |
| - `data-merge-choice="merge">Merge now</button>`, `data-merge-choice="wait">Wait for a Mac</button>`, |
| + `data-merge-choice="merge">Merge now</button>`, `data-merge-choice="wait_mac">Wait for a Mac</button>`, |
| "Merge now merges it without checks. Wait for a Mac leaves it as it is. Once a Mac is set up, checks run on its next change, and if they pass, Equipo merges it by itself.", |
| `<a equipo-link href="/runners/enrol" data-set-up-mac>Set up a Mac</a>`, `href="/conversation?about=` + g.unchecked + `" data-ask-about>Ask about this</a>`} { |
| if !strings.Contains(card, want) { |