Commit a158363
committed
Fix stuck loading state for deleted/invalid workspaces
When a workspace is deleted or doesn't exist:
- Previously: selectedWorkspace persisted in localStorage, causing eternal "Loading workspace..."
- Now: Validate workspace exists on mount and clear invalid selection
Added validation effect that:
- Checks if selected workspace ID exists in workspaceMetadata
- Clears selection if workspace was deleted
- Also clears URL hash to prevent re-selection on reload
Fixes edge cases:
- Workspace deleted while app was closed
- URL with invalid workspace ID (#workspace=invalid-id)
- Workspace removed from another instance1 parent 4e48861 commit a158363
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
258 | 275 | | |
259 | 276 | | |
260 | 277 | | |
| |||
0 commit comments