Opus finding
ProjectManager.list_projects iterates dotfiles/non-directories and crashes on stray files
lowbugmedium
- backend/app/models/project.py:263-283
list_projects feeds every entry under PROJECTS_DIR — including stray files (e.g. .DS_Store on macOS, lockfiles, or accidental sibling files) — into get_project(). get_project then calls open() on `<entry>/project.json`; for a non-directory entry the os.path.exists check on meta_path returns False so get_project returns None and the entry is silently skipped, so this happens to be non-fatal. However, the sort by created_at='' on entries with malformed project.json (empty meta) would yield silent ordering bugs. Minor maintainability issue more than a crash.
Recommendation
Filter os.listdir to entries where os.path.isdir(_get_project_dir(entry)) before calling get_project.