docs(quick-261016-nqk): plan and summary for UAT gaps G-18.1-7 and G-18.1-4; D-21 amended, COVERAGE cancel_at row

This commit is contained in:
Jakub Zych
2026-10-16 17:24:12 +02:00
parent 17398fe87c
commit 6e14522a84
4 changed files with 60 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
---
quick_id: 261016-nqk
slug: close-uat-gaps-g-18-1-7-and-g-18-1-4
date: 2026-10-16
gap_closure: true
gap_ids: [G-18.1-7, G-18.1-4]
repos: [summercms.go, sm-paymentgatewaysubscriptions-plugin, sm-pgstripe-plugin]
source: .planning/phases/18.1-payment-gateway-subscriptions/18.1-UAT.md (## Gaps)
---
# Quick 261016-nqk: close UAT gaps G-18.1-7 and G-18.1-4
No push, tag or release. Framework first (pgsub needs its new hooks), then the plugins; planning docs last.
## Tasks
1. **G-18.1-7 (pgstripe).** The decoded subscription maps `cancel_at_period_end` true for Stripe's flag or a `cancel_at` date while active or trialing; a cleared `cancel_at` maps back. One choke point (`subscriptionObject.args`) serves the snapshot, the fresh retrieval and `SyncSubscription`. Tests: both payload shapes, un-cancel, `cancel_at` in past_due/canceled; Postgres smoke of portal cancel then un-cancel (reactivated once). README, COVERAGE row, D-21 amendment.
2. **G-18.1-4 (preview labels, pgsub).** The label element renders its `value` property (the SPA's plugin-element contract), not only the attribute. Node-run test.
3. **G-18.1-4 (framework).** `pact.ListExtendRecords` (once per list page, before columns are read; unstored `gorm:"-"` columns compile unsortable and refuse sortable/searchable) and `pact.FormRecordTitle` (`meta.title` on show/create/update; the SPA heads form and preview with it). Roster fixture tests, SPA tests, docs, OpenAPI, admin dist.
4. **G-18.1-4 (pgsub).** Subscriber column (e-mail, else name; `<alias> #<id>` fallback) through `ListExtendRecords` and the optional `contracts.SubscriberBatchResolver` (user resolver implements `ResolveMany`); subscriber type and id become invisible searchable columns; preview title "Subscription #<id> (<plan>)" (en/pl). Tests, README.
5. Rebuild the UAT demo app and check the admin API.

View File

@@ -0,0 +1,37 @@
---
quick_id: 261016-nqk
slug: close-uat-gaps-g-18-1-7-and-g-18-1-4
status: complete
date: 2026-10-16
gap_closure: true
gap_ids: [G-18.1-7, G-18.1-4]
repos:
sm-pgstripe-plugin: [a5b3314]
sm-paymentgatewaysubscriptions-plugin: [6a3f2c4, d5579cd]
summercms.go: [bc5685e, 013890c, 17398fe]
---
# Quick 261016-nqk: UAT gaps G-18.1-7 and G-18.1-4
Nothing pushed, tagged or released.
| Gap | Fix | Commit |
|-----|-----|--------|
| G-18.1-7 | `cancel_at_period_end` = Stripe's flag, or a `cancel_at` date on an active or trialing subscription; un-cancel maps back and fires reactivated. D-21 amended; COVERAGE row now INTEGRATE | pgstripe a5b3314 |
| G-18.1-4 (empty Gateway/Status on preview) | the label element renders its `value` property (the SPA sets the property, the element read only the attribute) | pgsub 6a3f2c4 |
| G-18.1-4 (framework) | `pact.ListExtendRecords`, `pact.FormRecordTitle` (`meta.title`), unstored list columns unsortable/unsearchable; SPA uses `meta.title`; docs, OpenAPI, dist | summercms.go bc5685e, 013890c, 17398fe |
| G-18.1-4 (subscriber, title) | list column `subscriber` (e-mail, else name, `<alias> #<id>` fallback) via the new optional `contracts.SubscriberBatchResolver`; type/id invisible but searchable; preview title "Subscription #<id> (<plan>)" / "Subskrypcja #<id> (<plan>)" | pgsub d5579cd |
The screenshot's "Cancel at Period End: No / Canceled At: —" was stale: the preview API for subscription 1 returns `cancel_at_period_end: true` and `canceled_at` (checked on the demo, before and after the rebuild).
## Verification
- summercms.go: `go vet ./...`, `go test ./...` (Docker), `summer docs:build --check`, `TestDocsTree`, admin vitest 1431/1431 and typecheck, `check-admin-openapi.sh`, `check-admin-dist.sh`.
- pgsub and pgstripe: `go vet ./...`, `go test ./...` (Docker) green; the new subtests ran (not skipped).
- Demo app rebuilt without overlays and restarted: list row `subscriber: customer@example.test`, preview `meta.title: "Subscription #1 (Pro)"`, `gateway: Stripe`, `stripe_status: Active`; the new admin bundle is served.
## Release notes
- pgsub now needs the framework's `pact.ListExtendRecords` and `pact.FormRecordTitle`: tag the framework (v0.2.2) first, bump pgsub's `require`, tag pgsub, then pgstripe (already needs unreleased pgsub from 261016-myi).
- Search by subscriber e-mail is not offered: cabana searches stored columns and relations only, and the subscriber is polymorphic. Type and id stay searchable.
- UAT 7 and the site-side cancel still need a live re-run in the demo.