create-ailk 0.36.0 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -2
- package/component-catalog.json +40 -1
- package/component-catalog.md +7 -5
- package/dist/add-route.d.ts +5 -0
- package/dist/add-route.js +10 -2
- package/dist/surfaces.js +60 -19
- package/dist/sync-routes.d.ts +15 -1
- package/dist/sync-routes.js +58 -6
- package/dist/template-record.d.ts +11 -0
- package/dist/template-record.js +18 -0
- package/dist/update.d.ts +33 -1
- package/dist/update.js +439 -56
- package/package.json +3 -3
- package/templates/.env.example +17 -0
- package/templates/apps/api/.env.example +38 -0
- package/templates/apps/api/CLAUDE.md +3 -0
- package/templates/apps/api/src/lib/__mocks__/prisma.ts +7 -0
- package/templates/apps/mcp/CLAUDE.md +1 -1
- package/templates/apps/web/CLAUDE.md +28 -1
- package/templates/apps/web/app/[locale]/(auth)/reset-password/__tests__/return.test.tsx +179 -0
- package/templates/apps/web/app/[locale]/(auth)/reset-password/page.tsx +22 -2
- package/templates/apps/web/app/[locale]/(auth)/reset-password/reset-password-card.tsx +9 -2
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/billing.test.tsx +240 -76
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/general.test.tsx +242 -28
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/hub-mode.test.tsx +369 -196
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/item.test.tsx +26 -1
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/layout.test.tsx +17 -6
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/new-menu.test.tsx +51 -12
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/new-popups.test.tsx +17 -2
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/notifications.test.tsx +153 -2
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/page.test.tsx +206 -23
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/popups.test.tsx +150 -188
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/privacy.test.tsx +235 -177
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/rich-translator.ts +63 -0
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/security.test.tsx +0 -3
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/thread.test.tsx +340 -0
- package/templates/apps/web/app/[locale]/(authed)/account/account-data.ts +7 -5
- package/templates/apps/web/app/[locale]/(authed)/account/account-frame.tsx +19 -3
- package/templates/apps/web/app/[locale]/(authed)/account/actions.ts +8 -4
- package/templates/apps/web/app/[locale]/(authed)/account/appointments/[slug]/page.tsx +161 -0
- package/templates/apps/web/app/[locale]/(authed)/account/appointments/__tests__/page.test.tsx +426 -0
- package/templates/apps/web/app/[locale]/(authed)/account/appointments/appointments-data.ts +76 -0
- package/templates/apps/web/app/[locale]/(authed)/account/appointments/page.tsx +139 -0
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/page.tsx +92 -24
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/versions/[version]/file/route.ts +32 -1
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/file-route.test.ts +76 -3
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/page.test.tsx +290 -41
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/artifact-data.ts +109 -11
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/page.tsx +43 -44
- package/templates/apps/web/app/[locale]/(authed)/account/billing/__tests__/offerings.test.ts +99 -0
- package/templates/apps/web/app/[locale]/(authed)/account/billing/offerings.ts +123 -0
- package/templates/apps/web/app/[locale]/(authed)/account/billing/page.tsx +309 -113
- package/templates/apps/web/app/[locale]/(authed)/account/billing-source.ts +192 -65
- package/templates/apps/web/app/[locale]/(authed)/account/components/request-quote.tsx +52 -7
- package/templates/apps/web/app/[locale]/(authed)/account/general/account-name.ts +36 -0
- package/templates/apps/web/app/[locale]/(authed)/account/general/contact-actions.ts +70 -2
- package/templates/apps/web/app/[locale]/(authed)/account/general/contact-details.tsx +42 -0
- package/templates/apps/web/app/[locale]/(authed)/account/general/page.tsx +55 -58
- package/templates/apps/web/app/[locale]/(authed)/account/general/phone-verification.tsx +2 -1
- package/templates/apps/web/app/[locale]/(authed)/account/general/photo-actions.ts +73 -0
- package/templates/apps/web/app/[locale]/(authed)/account/general/profile-form.tsx +12 -9
- package/templates/apps/web/app/[locale]/(authed)/account/general/profile-source.ts +18 -4
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/[kind]/[id]/page.tsx +20 -2
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/member-thread-composer.tsx +43 -0
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/page.tsx +125 -0
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/thread-data.ts +88 -0
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/thread-write.ts +31 -0
- package/templates/apps/web/app/[locale]/(authed)/account/layout.tsx +3 -2
- package/templates/apps/web/app/[locale]/(authed)/account/new-menu.tsx +33 -8
- package/templates/apps/web/app/[locale]/(authed)/account/new-popups.tsx +31 -52
- package/templates/apps/web/app/[locale]/(authed)/account/notifications/page.tsx +44 -4
- package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +69 -49
- package/templates/apps/web/app/[locale]/(authed)/account/privacy/__tests__/export-route.test.ts +173 -0
- package/templates/apps/web/app/[locale]/(authed)/account/privacy/actions.ts +42 -4
- package/templates/apps/web/app/[locale]/(authed)/account/privacy/export/route.ts +102 -0
- package/templates/apps/web/app/[locale]/(authed)/account/privacy/page.tsx +147 -137
- package/templates/apps/web/app/[locale]/(authed)/account/security/__tests__/hub-variant.test.tsx +258 -0
- package/templates/apps/web/app/[locale]/(authed)/account/security/page.tsx +18 -21
- package/templates/apps/web/app/[locale]/(authed)/account/security/security-panel.tsx +34 -6
- package/templates/apps/web/app/[locale]/(authed)/account/security/security-source.ts +37 -7
- package/templates/apps/web/app/[locale]/(authed)/account/settings/page.tsx +0 -2
- package/templates/apps/web/app/[locale]/(authed)/account/settings-frame.tsx +8 -5
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsClient.tsx +3 -2
- package/templates/apps/web/app/api/auth/hub/password/__tests__/return.test.ts +86 -0
- package/templates/apps/web/app/api/auth/hub/password/__tests__/route.test.ts +368 -0
- package/templates/apps/web/app/api/auth/hub/password/return.ts +86 -0
- package/templates/apps/web/app/api/auth/hub/password/route.ts +171 -0
- package/templates/apps/web/app/api/hub-session/__tests__/routes.test.ts +263 -0
- package/templates/apps/web/app/api/hub-session/password/return/route.ts +69 -0
- package/templates/apps/web/app/api/hub-session/password/route.ts +106 -0
- package/templates/apps/web/lib/__tests__/account-config.test.ts +129 -1
- package/templates/apps/web/lib/__tests__/offerings-pricing.test.ts +33 -0
- package/templates/apps/web/lib/account-config.ts +132 -8
- package/templates/apps/web/lib/auth-routes.ts +11 -6
- package/templates/apps/web/lib/offerings-pricing.ts +4 -1
- package/templates/apps/web/messages/en.json +156 -80
- package/versions.json +48 -48
- package/templates/apps/web/app/[locale]/(authed)/account/components/schedule-service.tsx +0 -276
- package/templates/apps/web/app/[locale]/(authed)/account/components/send-message.tsx +0 -128
- package/templates/apps/web/app/[locale]/(authed)/account/settings/__tests__/theme-modes.test.ts +0 -42
- package/templates/apps/web/app/[locale]/(authed)/account/settings/theme-modes.ts +0 -40
|
@@ -511,6 +511,39 @@ describe("offeringsPricing — a bundled plan links its required product (#10028
|
|
|
511
511
|
});
|
|
512
512
|
});
|
|
513
513
|
|
|
514
|
+
describe("offeringsPricing — an offer is listed by neither fragment (#11166 AC-2)", () => {
|
|
515
|
+
const withOffer = (edit: (set: WorkspaceShownSet) => void = () => {}) =>
|
|
516
|
+
shownSet((set) => {
|
|
517
|
+
const welcome = product("welcome", "offer", [price("welcome", "once", 9900, "usd")], {
|
|
518
|
+
name: "Welcome offer",
|
|
519
|
+
recommended: true,
|
|
520
|
+
});
|
|
521
|
+
set.offerings.push(welcome);
|
|
522
|
+
set.productIds.push(welcome.productId);
|
|
523
|
+
edit(set);
|
|
524
|
+
});
|
|
525
|
+
|
|
526
|
+
it("maps the plans and add-ons exactly as without it; the offer gets no card and no tile", () => {
|
|
527
|
+
const result = mapped(withOffer());
|
|
528
|
+
expect(plansOf(result).map((c) => c.key)).toEqual(plansOf(mapped()).map((c) => c.key));
|
|
529
|
+
expect(addonsOf(result).map((t) => t.key)).toEqual(addonsOf(mapped()).map((t) => t.key));
|
|
530
|
+
expect(JSON.stringify(result)).not.toContain("welcome");
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
it("an offer alone, or an offer listed in `plans`, maps to two null fragments", () => {
|
|
534
|
+
const alone = withOffer((set) => {
|
|
535
|
+
set.offerings = set.offerings.filter((o) => o.ailkGroup === "offer");
|
|
536
|
+
set.productIds = set.offerings.map((o) => o.productId);
|
|
537
|
+
set.recommended = { plan: null, addon: null };
|
|
538
|
+
});
|
|
539
|
+
expect(offeringsPricing(alone, OPTIONS)).toEqual({ plans: null, addons: null });
|
|
540
|
+
expect(offeringsPricing(withOffer(), { ...OPTIONS, plans: ["welcome"] })).toEqual({
|
|
541
|
+
plans: null,
|
|
542
|
+
addons: null,
|
|
543
|
+
});
|
|
544
|
+
});
|
|
545
|
+
});
|
|
546
|
+
|
|
514
547
|
describe("offeringsPricing — Stripe text stays text; every link is ours (AC-3)", () => {
|
|
515
548
|
const HOSTILE_DESCRIPTION = "Fast <b>bold</b> javascript:alert(1) \u202Eevil";
|
|
516
549
|
|
|
@@ -43,8 +43,9 @@
|
|
|
43
43
|
// `ctx.init` already carries the right one (`forwardedCookieInit()`), so no
|
|
44
44
|
// kind here tests the topology:
|
|
45
45
|
//
|
|
46
|
-
// - Inbox kind `purchase` (`GET /v1/member/purchases`) — the
|
|
47
|
-
//
|
|
46
|
+
// - Inbox kind `purchase` (`GET /v1/member/purchases`) — the Orders tab
|
|
47
|
+
// (#11149; the tab keeps the section id `purchases`). Only a purchase
|
|
48
|
+
// linked by the verified-email rule shows (roadmap D3).
|
|
48
49
|
// - Inbox kind `appointment` (`GET /v1/member/appointments`) — the
|
|
49
50
|
// Scheduled tab, upcoming first, each item flagged by the read's own split.
|
|
50
51
|
// - Inbox kinds `piece` (`GET /v1/member/pieces`) and `message`
|
|
@@ -54,8 +55,20 @@
|
|
|
54
55
|
// browser holds no hub credential. A message whose `action` is
|
|
55
56
|
// `onboarding` (#8515 D6) has an Open onboarding action to this site's
|
|
56
57
|
// own `/account/onboarding`.
|
|
58
|
+
// - Inbox kind `request` (`GET /v1/member/requests`, #11157) — the member's
|
|
59
|
+
// OWN sent quote requests and messages, the inbound rows the two New
|
|
60
|
+
// writes put on their Person. With `message` it makes the Messages tab
|
|
61
|
+
// (`accountChatKinds`): a request the member just posted is read again
|
|
62
|
+
// on the next render, so it appears under Messages and All without a
|
|
63
|
+
// reload (the New menu refreshes the route after a post).
|
|
57
64
|
// - For-you source `piece-needs-client` — each piece waiting on the client,
|
|
58
65
|
// with an Open action to its Inbox row. It shares the pieces read.
|
|
66
|
+
// - For-you source `onboarding-steps` (#11150) — the steps a welcomed
|
|
67
|
+
// member has left (`GET /v1/member/welcome`): name, the onboarding form,
|
|
68
|
+
// email verification and a first booking, each linking to its page and
|
|
69
|
+
// none dismissible. The read also writes the first-sign-in marker and
|
|
70
|
+
// sends the welcome email the first time, so a member's first `/account`
|
|
71
|
+
// render IS the first sign-in, on a spoke and on the hub alike.
|
|
59
72
|
//
|
|
60
73
|
// A build with no tenancy module registers no member route, so each of these
|
|
61
74
|
// 404s and loads `[]`. A site whose workspace does not resolve gets a 503
|
|
@@ -68,12 +81,18 @@
|
|
|
68
81
|
// on click:
|
|
69
82
|
//
|
|
70
83
|
// - `schedule-service` — while `GET /v1/member/meeting-types` answers
|
|
71
|
-
// (registered with `scheduling` on), `{ items: [] }` included
|
|
72
|
-
//
|
|
84
|
+
// (registered with `scheduling` on), `{ items: [] }` included. Since
|
|
85
|
+
// #11154 the row navigates to `/account/appointments` (the member's
|
|
86
|
+
// Appointments page, which lists the offered types and opens each
|
|
87
|
+
// type's booking page) rather than opening a popup; an empty offer
|
|
88
|
+
// shows that page's empty line.
|
|
73
89
|
// - `request-quote` — while `GET /v1/member/request-form` answers a form;
|
|
74
90
|
// `{ form: null }` (switched off) leaves it out like a 404.
|
|
75
91
|
// - `send-message` — while `GET /v1/member/messages` answers; the `message`
|
|
76
|
-
// kind shares that read (`memberMessages`), one call per request.
|
|
92
|
+
// kind shares that read (`memberMessages`), one call per request. Since
|
|
93
|
+
// #11152 the row navigates to `/account/inbox/thread` (the member's
|
|
94
|
+
// thread page: every message between them and the workspace, the
|
|
95
|
+
// composer at the foot) rather than opening a lightbox.
|
|
77
96
|
//
|
|
78
97
|
// A Free build registers none of the three, so it shows no New button; a
|
|
79
98
|
// failed read rejects, so the Inbox shows its error row. The popups, the
|
|
@@ -112,8 +131,10 @@ import { Text } from "@working-theory/ui/primitives";
|
|
|
112
131
|
import type {
|
|
113
132
|
MemberAppointment,
|
|
114
133
|
MemberMessage,
|
|
134
|
+
MemberOnboardingStepId,
|
|
115
135
|
MemberPiece,
|
|
116
136
|
MemberPurchase,
|
|
137
|
+
MemberRequest,
|
|
117
138
|
MemberResult,
|
|
118
139
|
} from "@working-theory/validation";
|
|
119
140
|
import { formatMoney, formatNumber } from "@working-theory/web-i18n";
|
|
@@ -372,12 +393,53 @@ const message: AccountInboxKind<MemberMessage> = {
|
|
|
372
393
|
},
|
|
373
394
|
};
|
|
374
395
|
|
|
396
|
+
/**
|
|
397
|
+
* #11157 — the member's own sent rows: the inbound `message` and `quote`
|
|
398
|
+
* Interactions the New menu's Send message and Request quote wrote on their
|
|
399
|
+
* Person, newest first. The row's title is the subject (a quote request's is
|
|
400
|
+
* the form's title); the detail is the member's own bubble, on the end side,
|
|
401
|
+
* captioned with when it was sent — a quote request, whose body is empty,
|
|
402
|
+
* reads the one sent line. The member thread page (#11152,
|
|
403
|
+
* `account/inbox/thread`) lists these beside the provider's messages, oldest
|
|
404
|
+
* first.
|
|
405
|
+
*/
|
|
406
|
+
const request: AccountInboxKind<MemberRequest> = {
|
|
407
|
+
kind: "request",
|
|
408
|
+
label: "requests.heading",
|
|
409
|
+
section: "updates",
|
|
410
|
+
async load({ init, user }) {
|
|
411
|
+
const rows = (await read(member.requests(init), user))?.items ?? [];
|
|
412
|
+
return rows.map((r) => ({
|
|
413
|
+
id: r.id,
|
|
414
|
+
title: r.subject,
|
|
415
|
+
at: r.createdAt,
|
|
416
|
+
data: r,
|
|
417
|
+
}));
|
|
418
|
+
},
|
|
419
|
+
renderDetail({ data }, { locale, t }) {
|
|
420
|
+
const caption = `${t("requests.sentAt")} · ${formatWhen(data.createdAt, locale)}`;
|
|
421
|
+
return {
|
|
422
|
+
body: createElement(MessageBubble, {
|
|
423
|
+
side: "end",
|
|
424
|
+
caption,
|
|
425
|
+
"data-testid": "account-item-request",
|
|
426
|
+
children: createElement(
|
|
427
|
+
Text,
|
|
428
|
+
{ as: "p", className: "whitespace-pre-wrap" },
|
|
429
|
+
data.body === "" ? t("requests.quoteSent") : data.body,
|
|
430
|
+
),
|
|
431
|
+
}),
|
|
432
|
+
};
|
|
433
|
+
},
|
|
434
|
+
};
|
|
435
|
+
|
|
375
436
|
/**
|
|
376
437
|
* #11007 — the kinds whose detail is a conversation, rendered through
|
|
377
438
|
* `InboxItemFrame`'s `layout="chat"`; every other kind keeps the stacked
|
|
378
|
-
* head and fields.
|
|
439
|
+
* head and fields. #11157 — the same kinds are the Inbox's Messages tab: the
|
|
440
|
+
* provider's messages and the member's own sent requests and messages.
|
|
379
441
|
*/
|
|
380
|
-
export const accountChatKinds: ReadonlySet<string> = new Set([message.kind]);
|
|
442
|
+
export const accountChatKinds: ReadonlySet<string> = new Set([message.kind, request.kind]);
|
|
381
443
|
|
|
382
444
|
/** Each appointment status's message key — a new status is a type error, never a raw key. */
|
|
383
445
|
const APPOINTMENT_STATUS_KEY = {
|
|
@@ -481,6 +543,61 @@ const pieceNeedsClient: AccountForYouSource = {
|
|
|
481
543
|
},
|
|
482
544
|
};
|
|
483
545
|
|
|
546
|
+
// ── Onboarding-steps For-you source (#11150) ─────────────────────────────────
|
|
547
|
+
|
|
548
|
+
/** Each step's page — where the member does it (AC-3). */
|
|
549
|
+
const ONBOARDING_STEP_HREF = {
|
|
550
|
+
name: "/account/general",
|
|
551
|
+
onboarding: "/account/onboarding",
|
|
552
|
+
email: "/account/general",
|
|
553
|
+
booking: "/account/appointments",
|
|
554
|
+
} satisfies Record<MemberOnboardingStepId, string>;
|
|
555
|
+
|
|
556
|
+
/** Each step's title key. The name step is the area's own "Add your name" (`account-data.ts`), which yields to it. */
|
|
557
|
+
const ONBOARDING_STEP_TITLE = {
|
|
558
|
+
name: "forYou.addName",
|
|
559
|
+
onboarding: "forYou.onboarding.onboarding",
|
|
560
|
+
email: "forYou.onboarding.email",
|
|
561
|
+
booking: "forYou.onboarding.booking",
|
|
562
|
+
} satisfies Record<MemberOnboardingStepId, string>;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* The steps a welcomed member has left (#11150 AC-3). One read,
|
|
566
|
+
* `GET /v1/member/welcome`, which the API also uses to write the
|
|
567
|
+
* first-sign-in marker (and send the welcome email) the first time this
|
|
568
|
+
* caller reads it on this workspace — so the source IS the first sign-in's
|
|
569
|
+
* trigger, on a spoke through the hub or on the hub itself alike, through
|
|
570
|
+
* `ctx.init`. Each step is read from server state, links to its page and
|
|
571
|
+
* cannot be dismissed; a done step disappears, and with every step done the
|
|
572
|
+
* source is empty, so the panel's empty-hides rule is unchanged. No marker
|
|
573
|
+
* (no Person could be made for the caller) is no steps. The area's own
|
|
574
|
+
* "Add your name" item yields to the `name` step when both would show
|
|
575
|
+
* (`account-data.ts`), so one fact has one row; the `email-unverified`
|
|
576
|
+
* source never meets the `email` step, because this read answers a verified
|
|
577
|
+
* caller only.
|
|
578
|
+
*/
|
|
579
|
+
const onboardingSteps: AccountForYouSource = {
|
|
580
|
+
id: "onboarding-steps",
|
|
581
|
+
async load({ init, locale, t, user }) {
|
|
582
|
+
const welcome = await read(member.welcome(init), user);
|
|
583
|
+
if (welcome === null || welcome.welcomedAt === null) return [];
|
|
584
|
+
const at = welcome.welcomedAt;
|
|
585
|
+
return welcome.steps
|
|
586
|
+
.filter((step) => !step.done)
|
|
587
|
+
.map((step) => ({
|
|
588
|
+
id: `onboarding:${step.id}`,
|
|
589
|
+
type: { id: "onboarding", label: t("forYou.types.onboarding"), tone: "neutral" as const },
|
|
590
|
+
title: t(ONBOARDING_STEP_TITLE[step.id]),
|
|
591
|
+
time: { kind: "at" as const, at },
|
|
592
|
+
action: {
|
|
593
|
+
kind: "open" as const,
|
|
594
|
+
href: localeHref(locale, ONBOARDING_STEP_HREF[step.id]),
|
|
595
|
+
},
|
|
596
|
+
dismissible: false,
|
|
597
|
+
}));
|
|
598
|
+
},
|
|
599
|
+
};
|
|
600
|
+
|
|
484
601
|
// ── New actions (#8233) ──────────────────────────────────────────────────────
|
|
485
602
|
|
|
486
603
|
/**
|
|
@@ -493,6 +610,8 @@ export type AccountNewRead = Omit<AccountNewAction, "renderPopup">;
|
|
|
493
610
|
const scheduleService = {
|
|
494
611
|
id: "schedule-service",
|
|
495
612
|
label: "new.actions.scheduleService",
|
|
613
|
+
// #11154 — a link row: the page localizes the path, and no popup binds to it.
|
|
614
|
+
href: "/account/appointments",
|
|
496
615
|
async available({ init, user }) {
|
|
497
616
|
return (await read(member.meetingTypes(init), user)) !== null;
|
|
498
617
|
},
|
|
@@ -510,6 +629,8 @@ const requestQuote = {
|
|
|
510
629
|
const sendMessage = {
|
|
511
630
|
id: "send-message",
|
|
512
631
|
label: "new.actions.sendMessage",
|
|
632
|
+
// #11152 — a link row: the member thread page, where the composer posts.
|
|
633
|
+
href: "/account/inbox/thread",
|
|
513
634
|
async available({ init, user }) {
|
|
514
635
|
return (await read(memberMessages(init), user)) !== null;
|
|
515
636
|
},
|
|
@@ -523,6 +644,7 @@ export const accountInboxKinds: AccountInboxKind[] = [
|
|
|
523
644
|
purchase,
|
|
524
645
|
piece,
|
|
525
646
|
message,
|
|
647
|
+
request,
|
|
526
648
|
appointment,
|
|
527
649
|
];
|
|
528
650
|
|
|
@@ -532,7 +654,8 @@ export const accountSettingsSections: AccountSettingsSection[] = [];
|
|
|
532
654
|
/**
|
|
533
655
|
* New-menu actions' server halves, in menu order (#8233 D2). A module appends
|
|
534
656
|
* its own read here and binds its popup in `account/new-popups.tsx`, keyed on
|
|
535
|
-
* the id — `AccountNewActionId` makes a read with no popup a type error.
|
|
657
|
+
* the id — `AccountNewActionId` makes a read with no popup a type error. A
|
|
658
|
+
* read carrying `href` is a link row (#11154) and binds no popup.
|
|
536
659
|
*/
|
|
537
660
|
export const accountNewActions = [
|
|
538
661
|
scheduleService,
|
|
@@ -551,4 +674,5 @@ export const accountForYouSources: AccountForYouSource[] = [
|
|
|
551
674
|
emailUnverified,
|
|
552
675
|
paymentDue,
|
|
553
676
|
pieceNeedsClient,
|
|
677
|
+
onboardingSteps,
|
|
554
678
|
];
|
|
@@ -14,9 +14,11 @@
|
|
|
14
14
|
*
|
|
15
15
|
* `isBookingPath()` (#8843 D10) is the same predicate for the scheduling
|
|
16
16
|
* module's booking pages — `/meet`, `/meet/<slug>` and `/private`, never
|
|
17
|
-
* `/meet/confirmed
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* `/meet/confirmed`, plus the member's own booking page
|
|
18
|
+
* `/account/appointments/<slug>` (#11154) — which the layout renders
|
|
19
|
+
* chrome-free only where the module is installed (`lib/modules.generated.ts`)
|
|
20
|
+
* and the middleware grants the scheduling CSP. This module imports nothing,
|
|
21
|
+
* so edge code can import it too.
|
|
20
22
|
*
|
|
21
23
|
* No Next.js import — pure functions, asserted directly by their own suite.
|
|
22
24
|
*/
|
|
@@ -73,15 +75,18 @@ export function isAccountPath(
|
|
|
73
75
|
/**
|
|
74
76
|
* Whether `pathname` addresses a booking page: `/private`, `/meet`, or
|
|
75
77
|
* `/meet/<slug>` for any slug but `confirmed` (the booker's confirmation
|
|
76
|
-
* page, which keeps the marketing chrome)
|
|
77
|
-
*
|
|
78
|
+
* page, which keeps the marketing chrome), or the member's booking page
|
|
79
|
+
* `/account/appointments/<slug>` (#11154) — never the Appointments list
|
|
80
|
+
* itself, which embeds nothing. The same prefix rule and the same fail-safe
|
|
81
|
+
* direction as `isAuthPath()`.
|
|
78
82
|
*/
|
|
79
83
|
export function isBookingPath(
|
|
80
84
|
pathname: string | undefined | null,
|
|
81
85
|
locales: readonly string[],
|
|
82
86
|
): boolean {
|
|
83
|
-
const [first, second] = segments(pathname, locales);
|
|
87
|
+
const [first, second, third] = segments(pathname, locales);
|
|
84
88
|
if (first === "private") return true;
|
|
89
|
+
if (first === "account") return second === "appointments" && third !== undefined;
|
|
85
90
|
return first === "meet" && second !== "confirmed";
|
|
86
91
|
}
|
|
87
92
|
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* 8876 D4, served by #8924) into two Pricing section fragments: one plan card
|
|
7
7
|
* per `ailkGroup: "plan"` Product and one add-on tile per `"addon"` Product,
|
|
8
8
|
* in the snapshot's order, each keyed by the Product's `{plan}` so `?plan=`
|
|
9
|
-
* (#8842) can match it. #
|
|
9
|
+
* (#8842) can match it. An `"offer"` Product (#11166) is in neither fragment:
|
|
10
|
+
* the member Billing's offer card renders it, never the pricing page. #8927
|
|
11
|
+
* places the fragments into `/pricing`.
|
|
10
12
|
*
|
|
11
13
|
* This is the one place Stripe text crosses into page markup, so contract
|
|
12
14
|
* docs/specs/8879-the-offerings-security-contract-key-spec.md binds it:
|
|
@@ -413,6 +415,7 @@ export function offeringsPricing(
|
|
|
413
415
|
shown.map((o) => o.requires).filter((plan) => plan !== undefined),
|
|
414
416
|
);
|
|
415
417
|
const offerings = narrowToPlans(shown, options.plans);
|
|
418
|
+
// #11166 — the two group reads are exact, so an `offer` falls into neither.
|
|
416
419
|
const planProducts = offerings.filter(
|
|
417
420
|
(o) => o.ailkGroup === "plan" && !requiredPlans.has(o.plan),
|
|
418
421
|
);
|