Remove Restore Workspaces feature

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Developer Tools

      The "Restore Workspaces" feature was partially implemented behind the enableRestoreWorkspaces feature flag (stage: development) and never released. The feature was intended to persist open workspace tabs to disk/Atlas backend and restore them on application startup — prompting the user with a "Reopen closed tabs?" confirmation dialog. Since this feature will not be completed, all related code should be removed to reduce maintenance burden and dead code.

      AC

      • Remove the enableRestoreWorkspaces feature flag from the feature flag definitions and all related preference types.
      • Remove the RestoreWorkspaces Redux action — the action type constant, the RestoreWorkspacesAction type, and the corresponding reducer case that appends restored tabs to the current state.
      • Remove the loadSavedWorkspaces thunk action and its invocation during workspace plugin activation. This includes the confirmation dialog ("Reopen closed tabs?") and the logic that reads saved state, filters by available connections, and auto-connects.
      • Remove the workspaces state change middleware (workspacesStateChangeMiddleware) that debounce-persists tab state to storage on every Redux state change. Remove the middleware from the store's applyMiddleware configuration.
      • Remove the WorkspacesStateSchema and WorkspacesStateData type from the workspace-info package. These are the Zod schema and TypeScript type used exclusively for serializing/deserializing the saved workspaces state. (The WorkspaceTabSchema and WorkspaceTab type used elsewhere for regular tab management should be preserved.)
      • Remove the userData service dependency from the workspaces plugin — it is used exclusively by the save/restore feature. Remove it from the WorkspacesServices type, from the configureStore function, from the plugin activation function signature, and from the service locator wiring (workspacesStorageServiceLocator).
      • Remove the workspaces storage service layer entirely — the context, the noop implementation (used in tests), the service locator, and the platform-specific storage providers (WorkspacesStorageServiceProviderDesktop, WorkspacesStorageServiceProviderWeb). Remove their exports from the compass-workspaces package.
      • Remove the storage providers from the application composition roots — the WorkspacesStorageServiceProviderDesktop wrapper in the Electron entrypoint and the WorkspacesStorageServiceProviderWeb wrapper (and its props: orgId, projectId, getResourceUrl, authenticatedFetch) in the Compass Web entrypoint.
      • Remove 'WorkspacesState' from the validUserDataTypes list in the compass-user-data package, since no other consumer uses this data type.
      • Remove the Atlas Cloud feature flag name (DATA_EXPLORER_COMPASS_WEB_ENABLE_RESTORE_WORKSPACES) — coordinate with the Atlas Cloud team if needed to confirm no backend references remain.
      • Update or remove any tests that exercise the save/restore workspaces behavior, the middleware, or mock the userData service specifically for this feature.
      • Verify the build compiles and existing tests pass after all removals.

            Assignee:
            Unassigned
            Reporter:
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: