From 9b521e1a49492fa8e32fe11c9a71ca35151cb00d Mon Sep 17 00:00:00 2001
From: Taylan Aydinli
Date: Wed, 11 Mar 2026 12:14:20 +0100
Subject: [PATCH] fix(site): derive "Updated" date from registry data instead
of render time
The /packs page was showing the ISR render timestamp via new Date(),
which was misleading. Now computes max(dateUpdated) across all packs
and passes it as a prop to the client component.
---
site/src/app/packs/PacksClient.tsx | 20 +++++++++++---------
site/src/app/packs/page.tsx | 7 ++++++-
2 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/site/src/app/packs/PacksClient.tsx b/site/src/app/packs/PacksClient.tsx
index bbb22ad..9c05877 100644
--- a/site/src/app/packs/PacksClient.tsx
+++ b/site/src/app/packs/PacksClient.tsx
@@ -70,7 +70,7 @@ function sortPacks(packs: PackMeta[], key: SortKey) {
// ── Component ────────────────────────────────────────────────────────────────
-export function PacksClient({ packs: allPacks }: { packs: PackMeta[] }) {
+export function PacksClient({ packs: allPacks, lastUpdated }: { packs: PackMeta[]; lastUpdated: string }) {
const router = useRouter();
const searchParams = useSearchParams();
@@ -481,14 +481,16 @@ export function PacksClient({ packs: allPacks }: { packs: PackMeta[] }) {
{Math.min(safePage * PACKS_PER_PAGE, filtered.length)} of{" "}
{filtered.length} packs
-
- Updated{" "}
- {new Date().toLocaleDateString("en-US", {
- month: "short",
- day: "numeric",
- year: "numeric",
- })}
-
+ {lastUpdated && (
+
+ Updated{" "}
+ {new Date(lastUpdated).toLocaleDateString("en-US", {
+ month: "short",
+ day: "numeric",
+ year: "numeric",
+ })}
+
+ )}
diff --git a/site/src/app/packs/page.tsx b/site/src/app/packs/page.tsx
index caecc9d..9712ef2 100644
--- a/site/src/app/packs/page.tsx
+++ b/site/src/app/packs/page.tsx
@@ -12,9 +12,14 @@ export const metadata: Metadata = {
export default async function PacksPage() {
const packs = await fetchAllPacks();
+ const lastUpdated = packs.reduce((latest, p) => {
+ const d = p.dateUpdated || p.dateAdded;
+ return d && d > latest ? d : latest;
+ }, "");
+
return (
-
+
);
}