
Samuel VolinandMatt Vollmer
f44a3b59d7
feat: Premium Page CTA updates and form handling (#28226)
* Premium page has form for signing up for a trial
* Input validation and normalization for trial form fields
* api endpoint definition to make this processes seamless
* license page updates to access `?success=true` queryparam and confetti
<img width="1512" height="833" alt="Screenshot 2026-08-17 at 10 08
41 PM"
src="https://github.com/user-attachments/assets/1766e724-c63a-4da9-b2bd-a98e6b66cc9b"
/>
<img width="1510" height="874" alt="Aug-17-2026 22-12-38"
src="https://github.com/user-attachments/assets/3a2a0f35-1176-4290-aa0d-b3f7d66c15d6"
/>
```mermaid
sequenceDiagram
autonumber
actor Owner
participant UI as UI<br/>TrialRequestForm + PremiumPage
participant API as API<br/>api.ts + coderd middleware
participant Coderd as Coderd<br/>postTrialLicense + trialer
participant Licensor as Licensor<br/>v2-licensor + Postgres + pubsub + cache
Note over UI: mutation.status = "idle"
Owner->>UI: fills 10 fields, checks acknowledgement
UI->>UI: Yup validate, strip "acknowledged", submit
UI->>API: POST /api/v2/licenses/trial<br/>cookie + X-CSRF-TOKEN
Note over UI: mutation.status = "pending"
API->>API: verify CSRF, apiRateLimiter,<br/>apiKeyMiddleware sets actor
API->>Coderd: dispatch
Coderd->>Coderd: audit.InitRequest, authorize license:create,<br/>httpapi.Read validates, HasLicense is false
Coderd->>Licensor: POST trial request<br/>deployment_id unspoofable, 10s deadline
Licensor-->>Coderd: 200, raw signed JWT
Coderd->>Coderd: ParseClaimsIgnoreNbf, uuid.Parse
Coderd->>Licensor: InsertLicense, updateEntitlements,<br/>publish PubsubEventLicense, commit audit log
Licensor-->>Coderd: database.License
Coderd-->>API: 201 codersdk.License
API-->>UI: 201 codersdk.License
Note over UI: mutation.status = "success"
UI->>Licensor: invalidate entitlements + licenses keys
UI->>Owner: navigate /deployment/premium?success=true
Note over Owner: confetti fires on the success param
```
---------
Co-authored-by: Matt Vollmer <matthewjvollmer@outlook.com>
2026-08-21 09:54:54 -04:00
..
2026-08-19 14:46:10 -05:00
2026-04-07 13:46:26 -05:00
2023-11-20 19:16:18 +00:00
2026-01-08 15:24:11 +04:00
2026-02-03 17:52:07 +00:00
2025-06-20 13:16:55 -06:00
2022-08-22 15:02:50 -07:00
2026-05-28 10:00:37 -05:00
2026-08-19 08:50:17 -07:00
2025-06-16 16:15:59 -06:00
2026-07-20 10:30:02 +01:00
2026-01-08 15:24:11 +04:00
2026-06-23 17:32:47 -05:00
2026-05-28 10:00:37 -05:00
2025-07-09 08:45:24 -06:00
2026-08-17 16:23:45 +07:00
2026-08-18 16:55:43 +02:00
2026-06-22 13:56:29 +02:00
2026-08-03 11:34:27 +02:00
2026-06-16 09:01:43 +00:00
2026-08-20 15:43:58 -07:00
2026-06-26 14:33:26 +01:00
2026-08-03 11:34:27 +02:00
2026-08-03 11:34:27 +02:00
2026-06-23 12:15:10 +01:00
2026-06-23 12:15:10 +01:00
2026-07-08 11:12:53 +02:00
2026-07-28 09:22:58 +01:00
2026-06-26 18:45:37 +02:00
2026-07-02 13:45:05 +00:00
2026-08-20 11:46:38 +01:00
2026-08-20 11:56:58 +01:00
2026-08-20 11:56:58 +01:00
2025-10-22 15:35:16 +02:00
2026-05-05 02:54:03 +05:00
2026-08-19 19:46:23 +00:00
2025-06-20 13:16:55 -06:00
2026-08-18 20:03:06 +02:00
2026-08-18 12:07:22 +07:00
2026-08-21 09:54:54 -04:00
2026-08-18 18:21:50 -05:00
2026-07-28 15:30:12 -05:00
2025-07-09 08:45:24 -06:00
2026-07-01 15:59:55 +03:00
2025-12-15 11:26:41 -06:00
2026-08-20 14:51:27 +01:00
2026-08-20 14:51:27 +01:00
2025-01-31 12:14:24 -07:00
2025-08-20 23:38:09 +10:00
2026-05-05 02:54:03 +05:00
2025-06-20 13:16:55 -06:00
2026-08-21 09:54:54 -04:00
2026-08-21 09:54:54 -04:00
2026-08-19 19:25:18 +00:00
2025-10-23 14:24:54 +02:00
2026-05-05 02:54:03 +05:00
2026-08-20 15:43:58 -07:00
2026-08-03 15:56:56 -05:00
2026-08-03 15:56:56 -05:00
2026-05-20 22:40:50 +00:00
2026-05-05 02:54:03 +05:00
2026-08-11 11:04:51 -05:00
2026-08-11 11:04:51 -05:00
2025-06-20 13:16:55 -06:00
2026-08-11 11:04:51 -05:00
2025-10-23 14:24:54 +02:00
2026-05-05 02:54:03 +05:00
2026-06-05 10:30:31 -05:00
2026-05-05 02:54:03 +05:00
2026-05-28 10:00:37 -05:00
2026-05-28 10:00:37 -05:00
2026-06-05 16:30:15 +01:00
2026-06-17 16:33:46 -06:00
2026-05-20 22:40:50 +00:00
2026-06-04 14:37:19 -04:00
2024-09-16 19:03:25 -05:00
2026-08-11 13:16:25 +00:00
2026-05-05 02:54:03 +05:00
2026-08-20 15:43:58 -07:00
2026-08-20 15:43:58 -07:00
2026-03-04 15:22:43 +02:00
2026-05-05 02:54:03 +05:00
2026-06-24 12:57:27 +01:00
2025-06-16 16:15:59 -06:00
2025-06-20 13:16:55 -06:00
2026-07-21 11:19:23 +02:00
2026-07-16 09:42:23 +02:00
2026-05-05 02:54:03 +05:00
2026-06-25 15:41:09 -06:00
2026-05-05 02:54:03 +05:00
2026-08-04 08:26:10 -07:00
2026-04-07 12:25:32 -06:00
2026-05-05 02:54:03 +05:00