Commit Graph

7 Commits

  • Fix session persistence after page refresh
    Root cause: loadManuallyCreatedProjects() was restoring projects with
    stale session arrays from localStorage. When loadProjects() tried to
    merge with fresh API data, the stale sessions would override.
    
    Fix 1: In loadManuallyCreatedProjects(), reset the sessions array to
    empty for each loaded project. This ensures sessions always come from
    the API (authoritative source) rather than localStorage.
    
    Fix 2: In createSessionInFolder(), remove the redundant initialize()
    call after loadProjects(). initialize() would reload stale localStorage
    data, undoing the fresh data fetched by loadProjects().
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
  • Add detailed console logging for project isolation debugging
    - Added logging to loadProjects() to trace session assignment
    - Added logging to show manually created projects and their workingDirs
    - Added logging to virtual session matching logic
    - This will help identify where sessions are being incorrectly assigned
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
  • 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>
  • Fix project isolation: Make loadChatHistory respect active project sessions
    - Modified loadChatHistory() to check for active project before fetching all sessions
    - When active project exists, use project.sessions instead of fetching from API
    - Added detailed console logging to debug session filtering
    - This prevents ALL sessions from appearing in every project's sidebar
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
  • Fix tab persistence in Claude IDE - persist closed tabs to localStorage
    Implement localStorage persistence for closed session and project tabs.
    When users close tabs, they now remain closed after page refresh.
    
    Changes:
    - session-tabs.js: Add closedSessions tracking with localStorage
    - project-manager.js: Add closedProjects tracking with localStorage
    - Filter out closed tabs on load
    - Persist state whenever tabs are closed
    
    Fixes issue where closed tabs would reappear on page refresh.
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
  • Add close button functionality to project tabs in Claude IDE
    Fix missing 'x' close buttons on project tabs (Level 1). Session tabs
    ( Level 2) already had close buttons implemented.
    
    Changes:
    - project-manager.js: Added close button element to renderProjectTab()
    - Added closeProject() method with confirmation dialog
    - Added getSessionName() helper for session name display
    - Auto-switches to next project when active project is closed
    - project-tabs.css: Added .tab-close styling for project tabs
    - Close button shows on hover, red highlight on hover
    - Mobile responsive: always visible on small screens
    
    The close button removes project tab from view but sessions remain
    accessible via API/reload. Confirmation shows session count and list
    for non-empty projects.
    
    Resolves: https://rommark.dev/claude/ide/session/session-1769083280612-mdof554ot
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
  • Add CodeNomad-inspired two-level tab system (Phase 2)
    Phase 2 of enhancement plan:
    - Created project-manager.js for project-level organization
    - Created session-tabs.js for session-level organization
    - Created project-tabs.css with responsive design
    - Added tab structure to index.html
    - Cache bust: v1769083200000
    
    Features:
    - Project tabs organize sessions by working directory
    - Session tabs show all sessions within active project
    - Context menu for rename/duplicate/delete/close
    - Visual indicators for active/running sessions
    - Responsive design for mobile
    
    Co-Authored-By: Claude <noreply@anthropic.com>