Commit 8095b67
committed
Migrate legacy workspace metadata on load
Codex P0: Fix missing name/projectPath fields in old metadata
Old installations have metadata.json with only id/projectName/workspacePath.
When getAllWorkspaceMetadata() loads these files, enrichMetadataWithPaths()
fails because getWorkspacePaths() requires metadata.name and metadata.projectPath.
Solution: Detect missing fields when loading metadata and migrate in-place:
- Add name field (from workspace basename)
- Add projectPath field (from config)
- Save migrated metadata to disk
This prevents the empty workspace list bug where legacy workspaces disappear
from the UI after upgrading to stable IDs.1 parent f725600 commit 8095b67
1 file changed
+28
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
325 | 338 | | |
326 | 339 | | |
327 | 340 | | |
| |||
330 | 343 | | |
331 | 344 | | |
332 | 345 | | |
333 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
334 | 360 | | |
335 | 361 | | |
336 | 362 | | |
| |||
0 commit comments