Files
SuperCharged-Claude-Code-Up…/PROMPT.md
uroma ec790a2de6 Fix virtual workingDir handling in addSessionToProject
- Modified addSessionToProject to correctly extract projectKey from virtual workingDirs
- Virtual workingDir format: /virtual/projects/{projectKey}
- Previously was converting slashes to dashes, causing mismatch
- Added console logging to track session-to-project assignment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 14:44:08 +00:00

1.6 KiB

Task: CRITICAL BUG: Project isolation completely broken.

Current Behavior

User creates new project (e.g., 'roman') and clicks 'Start new session' → ALL sessions from other projects appear in this project's left sidebar.

Previous Failed Attempts

  1. Virtual workingDir approach - didn't work
  2. Skipping virtual sessions in loadProjects() - didn't work
  3. Smart merging logic - still doesn't work

Requirements

  1. Each manually created project should have ONLY its own sessions
  2. Auto-generated projects (from real workingDirs) should still work
  3. Projects must persist across page refreshes
  4. Switching between projects should show only that project's sessions

Files to Analyze

  • /home/uroma/obsidian-web-interface/public/claude-ide/project-manager.js (main logic)
  • /home/uroma/obsidian-web-interface/public/claude-ide/chat-enhanced.js (left sidebar)
  • /home/uroma/obsidian-web-interface/routes/sessions-routes.js (backend API)

Progress

Iteration 1 - Fixed loadChatHistory to respect active project

Modified loadChatHistory() in chat-enhanced.js to check for active project before fetching all sessions from API. When active project exists, it uses activeProject.sessions instead. Added detailed console logging for debugging.

Commit: 55aafba

Next Steps

  • Test in browser to verify isolation works
  • May need additional fixes for initialization timing issues

Success Criteria

The task is complete when:

  • All requirements are implemented
  • Tests pass
  • Code is documented
marker to this file -->