console: a done no-app purchase card links to the domain's page
The ready card's link opens /a/{sqid}/domains/{domain}, which shows where
the domain points now and offers Point while it points nowhere. Label is
DRAFT copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+21
−5
internal/console/accountdomainbuy_test.go+5 −2internal/console/accountdomains_copy.go+11 −0internal/console/appdomainbuy.go+4 −2internal/console/templates/domain_buy.html+1 −1
diff --git a/internal/console/accountdomainbuy_test.go b/internal/console/accountdomainbuy_test.go| index 3900d8802..d361663a0 100644 |
| --- a/internal/console/accountdomainbuy_test.go |
| +++ b/internal/console/accountdomainbuy_test.go |
| @@ -240,9 +240,12 @@ func TestNotYetCheckoutReturnsToAccountPath(t *testing.T) { |
| purchaseText(purchaseElement(t, body, "purchase-lede")) != accountBuyCopy.ReadyLede { |
| t.Fatalf("done card: %d %s", status, body) |
| } |
| + // The done card links to the domain's own page, which shows where the |
| + // domain points now and offers Point while it points nowhere. |
| point := purchaseElement(t, body, "purchase-point") |
| - if purchaseHidden(point) || purchaseAttr(point, "href") != "/a/"+f.acct.Sqid+"/domains/shop.com#point" { |
| - t.Fatal("done card has no Point at an app") |
| + if purchaseHidden(point) || purchaseAttr(point, "href") != "/a/"+f.acct.Sqid+"/domains/shop.com" || |
| + purchaseText(point) != domainsFill(purchaseReadyCopy.OpenDomain, "{domain}", "shop.com") { |
| + t.Fatalf("done card's link: %q %q, want the domain's page", purchaseAttr(point, "href"), purchaseText(point)) |
| } |
| if purchaseAttr(purchaseElement(t, body, "purchase-back"), "href") != "/a/"+f.acct.Sqid+"/domains" { |
| t.Fatal("the card does not go back to the account's domains") |
diff --git a/internal/console/accountdomains_copy.go b/internal/console/accountdomains_copy.go| index 54a968511..0894adaeb 100644 |
| --- a/internal/console/accountdomains_copy.go |
| +++ b/internal/console/accountdomains_copy.go |
| @@ -199,3 +199,14 @@ var domainPointRetryCopy = struct { |
| Title: "Finish pointing", |
| Note: "{domain} is not fully pointed at {app} yet. Point it again to finish.", |
| } |
| + |
| +// purchaseReadyCopy is the done no-app purchase card's link to the domain's |
| +// own page, which shows where the domain points now and offers Point while |
| +// it points nowhere. |
| +// DRAFT (final fix wave, 2026-11-19): not yet through copy review. |
| +// {domain} is filled by the page. |
| +var purchaseReadyCopy = struct { |
| + OpenDomain string |
| +}{ |
| + OpenDomain: "Open {domain}", |
| +} |
diff --git a/internal/console/appdomainbuy.go b/internal/console/appdomainbuy.go| index ce1feb334..2cddc3c88 100644 |
| --- a/internal/console/appdomainbuy.go |
| +++ b/internal/console/appdomainbuy.go |
| @@ -31,7 +31,8 @@ type domainBuyView struct { |
| PollURL string |
| CheckoutURL string |
| Back string // the account's domains |
| - Point string // the domain's page, to point it at an app |
| + Point string // the domain's page: where it points now, or Point while it points nowhere |
| + PointLabel string |
| Purchase *DomainPurchase |
| DomainState string |
| Card domainPurchaseCard |
| @@ -185,7 +186,8 @@ func (s *Server) renderPurchaseCard(w http.ResponseWriter, r *http.Request, addr |
| p.Title = domainBuyCopy["title"] |
| p.ActiveNav = "domains" |
| v.Back = domainsBase(acct) + "/domains" |
| - v.Point = domainPageURL(acct, v.Purchase.Domain) + "#point" |
| + v.Point = domainPageURL(acct, v.Purchase.Domain) |
| + v.PointLabel = domainsFill(purchaseReadyCopy.OpenDomain, "{domain}", v.Purchase.Domain) |
| v.Card = purchaseCard(v.Purchase, v.DomainState) |
| v.Stages, v.StagesNoApp = domainPurchaseStages, domainPurchaseStagesNoApp |
| v.NoApp = purchaseNoApp(v.Purchase) |
diff --git a/internal/console/templates/domain_buy.html b/internal/console/templates/domain_buy.html| index 1b8becda6..456c2f993 100644 |
| --- a/internal/console/templates/domain_buy.html |
| +++ b/internal/console/templates/domain_buy.html |
| @@ -40,7 +40,7 @@ |
| <div class="done-actions"> |
| {{if .CheckoutURL}}<a id="purchase-continue" class="btn" href="{{.CheckoutURL}}" {{if ne .Card.Stage.Kind "awaiting"}}hidden{{end}}>{{$.DomainBuyCopy.continuePayment}}</a>{{end}} |
| <a id="purchase-visit" class="btn" href="https://{{.Purchase.Domain}}" target="_blank" rel="noopener" {{if ne .Card.Stage.Kind "live"}}hidden{{end}}>{{.Card.Visit}}</a> |
| - <a id="purchase-point" class="btn" href="{{.Point}}" {{if ne .Card.Stage.Kind "ready"}}hidden{{end}}>{{$.DomainsCopy.PointAtApp}}</a> |
| + <a id="purchase-point" class="btn" href="{{.Point}}" {{if ne .Card.Stage.Kind "ready"}}hidden{{end}}>{{.PointLabel}}</a> |
| <a id="purchase-back" class="btn btn-secondary" href="{{.Back}}">{{$.DomainBuyCopy.back}}</a> |
| </div> |
| <p class="purchase-ownership">{{$.DomainBuyCopy.cardOwnership}}</p> |