From 49207c524e1ce39489d38bedd18d01bcc1bb46a6 Mon Sep 17 00:00:00 2001 From: Tobi Lutke Date: Sat, 13 Dec 2025 11:13:12 -0500 Subject: [PATCH] Fix root context display showing // instead of / MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Handle both empty string and '/' as root context in path display logic. YAML stores root contexts as '/' but old code expected empty string. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/qmd.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qmd.ts b/src/qmd.ts index c824d4e..21f987c 100755 --- a/src/qmd.ts +++ b/src/qmd.ts @@ -490,7 +490,8 @@ function showStatus(): void { if (contexts.length > 0) { console.log(` ${c.dim}Contexts:${c.reset} ${contexts.length}`); for (const ctx of contexts) { - const pathDisplay = ctx.path_prefix === '' ? '/' : `/${ctx.path_prefix}`; + // Handle both empty string and '/' as root context + const pathDisplay = (ctx.path_prefix === '' || ctx.path_prefix === '/') ? '/' : `/${ctx.path_prefix}`; const contextPreview = ctx.context.length > 60 ? ctx.context.substring(0, 57) + '...' : ctx.context;