From 764ed1b35a6b7edfd9fae014661a330150da71c9 Mon Sep 17 00:00:00 2001 From: Chris Chudzicki Date: Wed, 8 Oct 2025 09:46:49 -0400 Subject: [PATCH 1/2] expose version --- frontends/main/src/app/healthcheck/route.ts | 10 +++++++++- frontends/main/src/app/layout.tsx | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/frontends/main/src/app/healthcheck/route.ts b/frontends/main/src/app/healthcheck/route.ts index 42a44a4249..2eb9277042 100644 --- a/frontends/main/src/app/healthcheck/route.ts +++ b/frontends/main/src/app/healthcheck/route.ts @@ -1,3 +1,11 @@ +const VERSION = process.env.NEXT_PUBLIC_VERSION || "unknown" export async function GET() { - return Response.json({ status: "ok" }, { status: 200 }) + return Response.json( + { + status: "ok", + version: VERSION, + timestamp: new Date().toISOString(), // easily tell if response is cached + }, + { status: 200 }, + ) } diff --git a/frontends/main/src/app/layout.tsx b/frontends/main/src/app/layout.tsx index 9b4c7d2ef6..435709331b 100644 --- a/frontends/main/src/app/layout.tsx +++ b/frontends/main/src/app/layout.tsx @@ -35,6 +35,10 @@ export default function RootLayout({ rel="stylesheet" href="https://use.typekit.net/lbk1xay.css" > + From 799922188b8812b8ed2e7fa2a91e846a0d1e64cc Mon Sep 17 00:00:00 2001 From: Chris Chudzicki Date: Wed, 8 Oct 2025 09:54:57 -0400 Subject: [PATCH 2/2] add default version --- env/frontend.env | 1 + 1 file changed, 1 insertion(+) diff --git a/env/frontend.env b/env/frontend.env index 0225b9a761..0033b47629 100644 --- a/env/frontend.env +++ b/env/frontend.env @@ -25,3 +25,4 @@ NEXT_PUBLIC_LEARN_AI_RECOMMENDATION_ENDPOINT=https://api-learn-ai-qa.ol.mit.edu/ NEXT_PUBLIC_LEARN_AI_SYLLABUS_ENDPOINT=https://api-learn-ai-qa.ol.mit.edu/http/syllabus_agent/ NEXT_PUBLIC_MITX_ONLINE_BASE_URL=${MITX_ONLINE_BASE_URL} +NEXT_PUBLIC_VERSION="local-dev"