From 32989419fd5a97195538b587aaa38a4f72f7fc47 Mon Sep 17 00:00:00 2001 From: manager Date: Wed, 11 Nov 2026 10:30:01 +0000 Subject: [PATCH 1/3] fix(uxcat): certificate name follows the certificate, not the viewer The full-name override was keyed on the signed-in viewer, so that account read its own name on every certificate and no other viewer saw it on the right one. It is now keyed on the certificate's address. Co-Authored-By: Claude Fable 5.2 --- src/pages/user/[userId]/certificate.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/user/[userId]/certificate.tsx b/src/pages/user/[userId]/certificate.tsx index 277756bd..ede7b73e 100644 --- a/src/pages/user/[userId]/certificate.tsx +++ b/src/pages/user/[userId]/certificate.tsx @@ -1,21 +1,22 @@ import { getCertificate } from '@uxcore/api/uxcat/certificate'; -import { GlobalContext } from '@uxcore/components/Context/GlobalContext'; import Spinner from '@uxcore/components/Spinner'; import pageNotFoundData from '@uxcore/data/404'; import CertificateLayout from '@uxcore/layouts/CertificateLayout'; import type { TRouter } from '@uxcore/local-types/global'; import { useRouter } from 'next/router'; -import React, { useContext } from 'react'; +import React from 'react'; import NotFoundPage from '../../404'; const Certificate = ({ userId, certificate }) => { const router = useRouter(); const { locale } = router as TRouter; - const { uxcatUserInfo } = useContext(GlobalContext); + // One holder asked for the full legal name on the certificate. It is tied to + // the certificate's own address, so every viewer reads the same name and no + // other certificate carries it. const name = - uxcatUserInfo?.user?.id === 1034 + String(userId).toLowerCase() === 'tufuka48' ? 'Кузнецов Тимофей Юрьевич' : `${certificate?.name} ${certificate?.surname}`; const date = new Date(certificate?.certificatedAt); From b7a251ffa48dac3bbc853409c28168840e2dd9c7 Mon Sep 17 00:00:00 2001 From: manager Date: Wed, 11 Nov 2026 15:07:36 +0000 Subject: [PATCH 2/3] fix(cache): pages without a refresh interval no longer ship a one-year shared cache header The UX Core API page and the legacy redirect route answered with s-maxage=31536000, so a CDN kept their HTML across releases. Co-Authored-By: Claude Fable 5.2 --- src/pages/[page].tsx | 5 +++-- src/pages/uxcore-api/index.tsx | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/[page].tsx b/src/pages/[page].tsx index 31aa72a3..58c0e9be 100644 --- a/src/pages/[page].tsx +++ b/src/pages/[page].tsx @@ -15,7 +15,7 @@ export const getStaticProps: GetStaticProps = async ({ params, locale }) => { const map = await getArticleRedirects(locale ?? 'en'); if (page.startsWith('articles/')) { - return { notFound: true }; + return { notFound: true, revalidate: 60 }; } const resolvedNewUrl = map[page]; @@ -26,10 +26,11 @@ export const getStaticProps: GetStaticProps = async ({ params, locale }) => { destination: `/${resolvedNewUrl}`, permanent: true, }, + revalidate: 60, }; } - return { notFound: true }; + return { notFound: true, revalidate: 60 }; }; export default function LegacyRedirectPage() { diff --git a/src/pages/uxcore-api/index.tsx b/src/pages/uxcore-api/index.tsx index 269e5e3f..9237a624 100644 --- a/src/pages/uxcore-api/index.tsx +++ b/src/pages/uxcore-api/index.tsx @@ -38,7 +38,9 @@ const API: FC = ({ mainSeo }) => { }; export const getStaticProps: GetStaticProps = async () => { const mainSeo = await getUXCoreApiSeo(); - return { props: { mainSeo } }; + // Without an interval the HTML ships a one-year shared cache header and a + // CDN keeps serving it across releases, pointing at assets that are gone. + return { props: { mainSeo }, revalidate: 60 }; }; export default API; From af3e50ed75df8368c8b18e9d999b2c3653dae5f2 Mon Sep 17 00:00:00 2001 From: manager Date: Wed, 11 Nov 2026 15:18:14 +0000 Subject: [PATCH 3/3] fix(cache): legacy route answers with the home page interval A request for /index lands on the legacy route. Its answer had no interval, and the framework stores that under the home page route key. Co-Authored-By: Claude Fable 5.2 --- src/pages/[page].tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/[page].tsx b/src/pages/[page].tsx index 58c0e9be..7e99356a 100644 --- a/src/pages/[page].tsx +++ b/src/pages/[page].tsx @@ -9,13 +9,17 @@ export const getStaticPaths = async () => { }; }; +// Every return carries the home page interval on purpose. The framework keys +// refresh timings by route with a trailing /index stripped, so a request for +// /index answered here without an interval overwrote the home page timing and +// the home page then shipped a one-year shared cache header until a restart. export const getStaticProps: GetStaticProps = async ({ params, locale }) => { const { page } = params as { page: string }; const map = await getArticleRedirects(locale ?? 'en'); if (page.startsWith('articles/')) { - return { notFound: true, revalidate: 60 }; + return { notFound: true, revalidate: 10 }; } const resolvedNewUrl = map[page]; @@ -26,11 +30,11 @@ export const getStaticProps: GetStaticProps = async ({ params, locale }) => { destination: `/${resolvedNewUrl}`, permanent: true, }, - revalidate: 60, + revalidate: 10, }; } - return { notFound: true, revalidate: 60 }; + return { notFound: true, revalidate: 10 }; }; export default function LegacyRedirectPage() {