From 8c6a10517fc6bf8a846ae30535bc38e7b3259dd0 Mon Sep 17 00:00:00 2001 From: gnanam1990 Date: Thu, 2 Apr 2026 09:05:00 +0530 Subject: [PATCH] fix: show correct version in startup screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit StartupScreen.ts was reading the version via globalThis['MACRO_DISPLAY_VERSION'] which is never populated — the Bun bundler inlines it as MACRO.DISPLAY_VERSION (dot notation), not as a globalThis key. Result: startup screen always showed the hardcoded fallback 'v0.1.4' regardless of the installed version. Fix: use MACRO.DISPLAY_VERSION ?? MACRO.VERSION directly, consistent with cli.tsx, main.tsx, and logoV2Utils.ts. Fixes #95 Co-Authored-By: Claude Sonnet 4.6 --- src/components/StartupScreen.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/StartupScreen.ts b/src/components/StartupScreen.ts index 602b3d08..6fd347a4 100644 --- a/src/components/StartupScreen.ts +++ b/src/components/StartupScreen.ts @@ -5,6 +5,8 @@ * Addresses: https://github.com/Gitlawb/openclaude/issues/55 */ +declare const MACRO: { VERSION: string; DISPLAY_VERSION?: string } + const ESC = '\x1b[' const RESET = `${ESC}0m` const DIM = `${ESC}2m` @@ -172,7 +174,7 @@ export function printStartupScreen(): void { out.push(boxRow(sRow, W, sLen)) out.push(`${rgb(...BORDER)}\u255a${'\u2550'.repeat(W - 2)}\u255d${RESET}`) - out.push(` ${DIM}${rgb(...DIMCOL)}openclaude v${(globalThis as Record)['MACRO_DISPLAY_VERSION'] ?? '0.1.4'}${RESET}`) + out.push(` ${DIM}${rgb(...DIMCOL)}openclaude v${MACRO.DISPLAY_VERSION ?? MACRO.VERSION}${RESET}`) out.push('') process.stdout.write(out.join('\n') + '\n')