mirror of
https://github.com/Kong/insomnia.git
synced 2026-11-01 18:51:44 -05:00
## Background Workspace `hasUncommittedChanges` / `hasUnpushedChanges` flags are written only by cloud sync. When a project stopped being a cloud project, those flags were never cleared, so the project overview cards kept showing "Uncommitted changes". Repro: 1. Open a cloud project whose workspaces have uncommitted changes. 2. Remove the project from the remote. 3. Open the project overview. The cards still show "Uncommitted changes" although the project is now local. A project converted from cloud to git carries the same residual flags, because the values come from its former cloud state. ## Changes - Clear both workspace sync flags when a project's `remoteId` becomes `null` in the project service. Remote deletion, conversion to local, cross-organization move, and conversion to git all update the project through this service. - Reuse the cleanup in the startup database repair to fix existing stale records. Only dirty workspace metas are written, and `modified` is preserved. - Add service and repair tests. ## Testing - `npm test -w insomnia-data` (538 tests) - `npm run type-check -w insomnia-data` - `npm run lint -w insomnia-data` ## References - INS-3899