From 4ef57eec4ef1d035726d75c16b55565e55877d59 Mon Sep 17 00:00:00 2001 From: Ed Zynda Date: Tue, 5 May 2026 14:54:20 +0300 Subject: [PATCH] docs(session): correct DefaultSessionDir convention comment - Stale comment showed ~/.kit/sessions/----/ which does not match the actual encoding (no leading/trailing dashes) - Update to reflect the real format and point to encodeCwdForDir for full rules --- internal/session/tree_manager.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/session/tree_manager.go b/internal/session/tree_manager.go index 2b1733bd..b3959846 100644 --- a/internal/session/tree_manager.go +++ b/internal/session/tree_manager.go @@ -1350,7 +1350,10 @@ func (tm *TreeManager) buildTreeNodeDepth(id string, depth int, visited map[stri // --- Path conventions --- // DefaultSessionDir returns the default session storage directory for a cwd. -// Convention: ~/.kit/sessions/----/ +// Convention: ~/.kit/sessions/, where path separators are +// encoded as "--" with no leading or trailing dashes — e.g. +// /home/user/proj becomes home--user--proj. See encodeCwdForDir for the +// full encoding rules (including Windows path handling). func DefaultSessionDir(cwd string) string { home, err := os.UserHomeDir() if err != nil {