From 074b2bcc202915f8d49540e74e4104fe632c55f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=82CHES?= Date: Tue, 3 Feb 2026 09:20:24 -0600 Subject: [PATCH] fix(#330): update statusline.js reference during install (#392) When updating GSD, the installer renames statusline.js to gsd-statusline.js but didn't update existing settings.json references. Users with the old config would see their status line disappear. Now cleanupOrphanedHooks() also checks for and updates any statusLine config pointing to the old path. Fixes #330 Co-authored-by: Claude Opus 4.5 --- bin/install.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/bin/install.js b/bin/install.js index 9734c5f80..3b1fe7d8d 100755 --- a/bin/install.js +++ b/bin/install.js @@ -716,7 +716,7 @@ function cleanupOrphanedHooks(settings) { 'gsd-intel-prune.js', // Removed in v1.9.2 ]; - let cleaned = false; + let cleanedHooks = false; // Check all hook event types (Stop, SessionStart, etc.) if (settings.hooks) { @@ -731,7 +731,7 @@ function cleanupOrphanedHooks(settings) { h.command && orphanedHookPatterns.some(pattern => h.command.includes(pattern)) ); if (hasOrphaned) { - cleaned = true; + cleanedHooks = true; return false; // Remove this entry } } @@ -742,10 +742,22 @@ function cleanupOrphanedHooks(settings) { } } - if (cleaned) { + if (cleanedHooks) { console.log(` ${green}✓${reset} Removed orphaned hook registrations`); } + // Fix #330: Update statusLine if it points to old statusline.js path + if (settings.statusLine && settings.statusLine.command && + settings.statusLine.command.includes('statusline.js') && + !settings.statusLine.command.includes('gsd-statusline.js')) { + // Replace old path with new path + settings.statusLine.command = settings.statusLine.command.replace( + /statusline\.js/, + 'gsd-statusline.js' + ); + console.log(` ${green}✓${reset} Updated statusline path (statusline.js → gsd-statusline.js)`); + } + return settings; }