Skip to content

Bug: Project 'Files' button shows all files instead of project-specific files #5

@jms830

Description

@jms830

Description

When clicking the "Files" button on a project card in the Projects tab, the dashboard switches to the Files tab but displays ALL files across ALL projects instead of filtering to show only files from the selected project.

Steps to Reproduce

  1. Open the Eidolon dashboard
  2. Go to the Projects tab
  3. Click the "Files" button on any project card
  4. Observe that the Files tab shows all files from all projects

Expected Behavior

When clicking "Files" on a specific project:

  1. Switch to the Files tab
  2. Display ONLY files belonging to that project
  3. Show project name/filter indicator at top
  4. Provide "Clear filter" or "Show all" button to return to full view

Actual Behavior

  • Switches to Files tab correctly
  • Shows complete unfiltered list of all files from all projects
  • No indication that a filter should be applied
  • No way to tell which project was selected

Technical Details

  • File: entrypoints/dashboard/main.ts
  • The button click likely just calls showTab('files') without passing project context
  • The renderFiles() function doesn't accept filter parameters
  • Need to add project filtering logic to file rendering

Suggested Implementation

1. Update State

interface AppState {
  // ... existing properties
  fileFilter: {
    projectId: string | null;
    projectName: string | null;
  };
}

2. Update Event Handler

// In project card rendering
filesBtn.addEventListener('click', () => {
  state.fileFilter = { 
    projectId: project.uuid, 
    projectName: project.name 
  };
  showTab('files');
  renderFiles();
});

3. Update renderFiles()

function renderFiles() {
  const filesContainer = document.getElementById('files-list')!;
  let filteredFiles = state.files;
  
  // Apply project filter if active
  if (state.fileFilter.projectId) {
    filteredFiles = state.files.filter(
      f => f.project_uuid === state.fileFilter.projectId
    );
  }
  
  // Show filter indicator if active
  if (state.fileFilter.projectId) {
    showFilterBanner(state.fileFilter.projectName);
  }
  
  // Render filtered files...
}

4. Add Filter UI

Add filter banner to Files tab showing:

  • "Showing files from: [Project Name]"
  • "Clear filter" button

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions