Commit 62af4cb
fix: handle project removal for cloud-only projects
**Problem:** Cloud projects that exist only in the database (not in
config.json) couldn't be removed. The error "Project 'name' not found"
occurred because config validation failed before database deletion.
**Root cause:**
- In cloud mode, projects can exist in database without config entries
- ProjectService.remove_project() called config_manager.remove_project()
first, which raised ValueError if project wasn't in config
- This prevented removal of cloud-only projects
**Solution:**
1. Check database first for project existence (source of truth)
2. Validate default project status from both database and config
3. Try to remove from config, but catch ValueError if not found
4. Always remove from database if project exists there
**Additional fix:**
- Project list Default column now shows in local mode (always) and in
cloud mode only if default_project_mode is enabled
- This fixes integration tests that expect to see default marker
Fixes cloud-only project deletion bug.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: phernandez <paul@basicmachines.co>1 parent 35698ac commit 62af4cb
2 files changed
Lines changed: 22 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
112 | | - | |
| 112 | + | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
| 240 | + | |
240 | 241 | | |
241 | | - | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | | - | |
245 | | - | |
246 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
247 | 257 | | |
248 | 258 | | |
249 | 259 | | |
| |||
0 commit comments