From f8f5cfe8560731ce8293611b99657f6c09a72fe8 Mon Sep 17 00:00:00 2001 From: Wintermute Date: Sun, 3 May 2026 16:36:05 +0000 Subject: [PATCH] fix(admin): styled error page for expired magic links Matches the login page aesthetic instead of plain text. Dark theme, GBrain logo, explains the link expired, tells user to ask their agent. --- src/commands/serve-http.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/commands/serve-http.ts b/src/commands/serve-http.ts index 394309f28..29754d09a 100644 --- a/src/commands/serve-http.ts +++ b/src/commands/serve-http.ts @@ -225,7 +225,22 @@ export async function runServeHttp(engine: BrainEngine, options: ServeHttpOption const token = req.params.token; const tokenHash = createHash('sha256').update(token).digest('hex'); if (tokenHash !== bootstrapHash) { - res.status(401).send('Invalid admin link. Ask your agent for a fresh one.'); + res.status(401).send(` + +GBrain +
+ +
⚠️ This admin link has expired or the server has restarted.
+
Get a fresh link from your AI agent: +
“Give me the GBrain admin login link”
+
`); return; }