You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 fix: add downgrade compatibility for incompatible runtime configs (#827)
## Summary
Prepares for #824 by ensuring users can safely upgrade→downgrade without
losing access to their other workspaces.
When users upgrade to a version with new runtime types (like `type:
"local"` without `srcBaseDir` for project-dir mode, or new `type:
"worktree"`) and then downgrade, the old version now shows a clear error
instead of crashing.
## Changes
| File | Change |
|------|--------|
| `src/common/utils/runtimeCompatibility.ts` | New:
`isIncompatibleRuntimeConfig()` helper (in common/ to avoid circular
deps) |
| `src/common/types/workspace.ts` | Added `incompatibleRuntime` field to
`FrontendWorkspaceMetadata` |
| `src/node/config.ts` | Set `incompatibleRuntime` when loading
workspace metadata |
| `src/browser/components/AIView.tsx` | Display error view for
incompatible workspaces |
| `src/browser/App.tsx` | Pass `incompatibleRuntime` to AIView |
| `src/node/runtime/runtimeFactory.ts` | Re-export helper + throw
`IncompatibleRuntimeError` as safety net |
| `src/node/services/ipcMain.ts` | Handle `IncompatibleRuntimeError` in
sendMessage (fallback) |
| `src/common/types/errors.ts` | Added `incompatible_workspace`
SendMessageError type |
## User Experience
When clicking into an incompatible workspace, users see a centered error
view:
> ⚠️ **Incompatible Workspace**
> This workspace was created with a newer version of mux.
> Please upgrade mux to use this workspace.
>
> You can delete this workspace and create a new one, or upgrade mux to
use it.
## Testing
- Added unit tests for `isIncompatibleRuntimeConfig()`
- Added unit tests for `createRuntime()` throwing on incompatible
configs
- Added tests for error toast display (fallback path)
- Added tests for non-retryable error classification
_Generated with `mux`_
0 commit comments