Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ ipcMain.handle('add-project', (_event, projectPath) => {
}

// Create the corresponding folder in ~/.claude/projects/ so it persists
const folder = projectPath.replace(/[/_]/g, '-').replace(/^-/, '-');
const folder = projectPath.replace(/[\\/:_]/g, '-').replace(/^-/, '-');
const folderPath = path.join(PROJECTS_DIR, folder);
if (!fs.existsSync(folderPath)) {
fs.mkdirSync(folderPath, { recursive: true });
Expand Down Expand Up @@ -329,7 +329,7 @@ ipcMain.handle('remove-project', (_event, projectPath) => {
setSetting('global', global);

// Clean up DB cache and search index for this folder
const folder = projectPath.replace(/[/_]/g, '-').replace(/^-/, '-');
const folder = projectPath.replace(/[\\/:_]/g, '-').replace(/^-/, '-');
deleteCachedFolder(folder);
deleteSearchFolder(folder);
deleteSetting('project:' + projectPath);
Expand Down Expand Up @@ -981,7 +981,7 @@ ipcMain.handle('open-terminal', async (_event, sessionId, projectPath, isNew, se

if (!isPlainTerminal) {
// Snapshot existing .jsonl files before spawning (for new session + fork/plan detection)
projectFolder = projectPath.replace(/[/_]/g, '-').replace(/^-/, '-');
projectFolder = projectPath.replace(/[\\/:_]/g, '-').replace(/^-/, '-');
const claudeProjectDir = path.join(PROJECTS_DIR, projectFolder);
if (fs.existsSync(claudeProjectDir)) {
try {
Expand Down
4 changes: 2 additions & 2 deletions public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ async function loadProjects({ resort = false } = {}) {
const activeTerminals = await window.api.getActiveTerminals();
for (const { sessionId, projectPath } of activeTerminals) {
if (pendingSessions.has(sessionId)) continue; // already tracked
const folder = projectPath.replace(/[/_]/g, '-').replace(/^-/, '-');
const folder = projectPath.replace(/[\\/:_]/g, '-').replace(/^-/, '-');
// Find the session object already injected by the backend
let session;
for (const proj of cachedAllProjects) {
Expand Down Expand Up @@ -709,7 +709,7 @@ async function launchNewSession(project, sessionOptions) {
};

// Track as pending (no .jsonl yet)
const folder = projectPath.replace(/[/_]/g, '-').replace(/^-/, '-');
const folder = projectPath.replace(/[\\/:_]/g, '-').replace(/^-/, '-');
pendingSessions.set(sessionId, { session, projectPath, folder });

// Inject into cached project data so it appears in sidebar immediately
Expand Down
4 changes: 2 additions & 2 deletions public/dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function launchScheduleCreator(project) {
};

// Inject into sidebar
const folder = project.projectPath.replace(/[/_]/g, '-').replace(/^-/, '-');
const folder = project.projectPath.replace(/[\\/:_]/g, '-').replace(/^-/, '-');
pendingSessions.set(result.sessionId, { session, projectPath: project.projectPath, folder });
sessionMap.set(result.sessionId, session);
for (const projList of [cachedProjects, cachedAllProjects]) {
Expand Down Expand Up @@ -141,7 +141,7 @@ async function launchTerminalSession(project) {
};

// Track as pending
const folder = projectPath.replace(/[/_]/g, '-').replace(/^-/, '-');
const folder = projectPath.replace(/[\\/:_]/g, '-').replace(/^-/, '-');
pendingSessions.set(sessionId, { session, projectPath, folder });

// Inject into cached project data
Expand Down
2 changes: 1 addition & 1 deletion public/terminal-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function createTerminalEntry(session) {
fontSize: 12,
fontFamily: "'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, monospace",
theme: TERMINAL_THEME,
cursorBlink: true,
cursorBlink: false,
scrollback: 10000,
convertEol: true,
allowProposedApi: true,
Expand Down
4 changes: 2 additions & 2 deletions schedule-ipc.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function init(log, runCommand) {
const sessionId = crypto.randomUUID();
const msgId = crypto.randomUUID();
const timestamp = new Date().toISOString();
const folder = projectPath.replace(/[/_]/g, '-').replace(/^-/, '-');
const folder = projectPath.replace(/[\\/:_]/g, '-').replace(/^-/, '-');
const claudeProjectDir = path.join(PROJECTS_DIR, folder);

fs.mkdirSync(claudeProjectDir, { recursive: true });
Expand Down Expand Up @@ -191,7 +191,7 @@ function init(log, runCommand) {
const dotClaudeDir = path.dirname(commandsDir);
const projectPath = path.dirname(dotClaudeDir);

const folder = projectPath.replace(/[/_]/g, '-').replace(/^-/, '-');
const folder = projectPath.replace(/[\\/:_]/g, '-').replace(/^-/, '-');
const schedule = {
file: path.basename(filePath),
filePath, projectPath, folder,
Expand Down
2 changes: 1 addition & 1 deletion session-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function buildProjectsFromCache(showArchived) {
// Inject active plain terminal sessions so they participate in sorting
for (const [sessionId, session] of activeSessions) {
if (session.exited || !session.isPlainTerminal) continue;
const folder = session.projectPath.replace(/[/_]/g, '-').replace(/^-/, '-');
const folder = session.projectPath.replace(/[\\/:_]/g, '-').replace(/^-/, '-');
if (hiddenProjects.has(session.projectPath)) continue;
if (!projectMap.has(folder)) {
projectMap.set(folder, { folder, projectPath: session.projectPath, sessions: [] });
Expand Down
Loading