Skip to content

Commit ad0f422

Browse files
MrFlounderclaude
andcommitted
fix(draw): remove project-alias scoping from global draw storage
Draw sessions are not project-specific — store them flat at ~/.crabcode/draw/ without project alias subdivision. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ddfd891 commit ad0f422

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

plugins/draw/src/storage/sessions.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import type { DrawSession, ExcalidrawElement } from '../types.js';
55

66
function drawDir(_projectRoot: string): string {
77
const configDir = process.env.CRAB_CONFIG_DIR || path.join(os.homedir(), '.crabcode');
8-
const projectAlias = process.env.CRAB_PROJECT_ALIAS;
9-
const base = path.join(configDir, 'draw');
10-
return projectAlias ? path.join(base, projectAlias) : base;
8+
return path.join(configDir, 'draw');
119
}
1210

1311
function sessionDir(projectRoot: string, id: string): string {

src/crabcode

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7599,7 +7599,7 @@ handle_draw_command() {
75997599
draw_help
76007600
else
76017601
# No args = start new session
7602-
CRAB_PROJECT_ROOT="${REPO_PATH:-$(pwd)}" CRAB_CONFIG_DIR="$CONFIG_DIR" CRAB_PROJECT_ALIAS="$PROJECT_ALIAS" node "$PLUGIN_DIR/dist/cli.js" "$@"
7602+
CRAB_PROJECT_ROOT="${REPO_PATH:-$(pwd)}" CRAB_CONFIG_DIR="$CONFIG_DIR" node "$PLUGIN_DIR/dist/cli.js" "$@"
76037603
fi
76047604
;;
76057605
*)
@@ -7614,7 +7614,7 @@ handle_draw_command() {
76147614
return 1
76157615
fi
76167616
# Pass all args to the Node.js CLI
7617-
CRAB_PROJECT_ROOT="${REPO_PATH:-$(pwd)}" CRAB_CONFIG_DIR="$CONFIG_DIR" CRAB_PROJECT_ALIAS="$PROJECT_ALIAS" node "$PLUGIN_DIR/dist/cli.js" "$@"
7617+
CRAB_PROJECT_ROOT="${REPO_PATH:-$(pwd)}" CRAB_CONFIG_DIR="$CONFIG_DIR" node "$PLUGIN_DIR/dist/cli.js" "$@"
76187618
;;
76197619
esac
76207620
}

0 commit comments

Comments
 (0)