Skip to content

Prompt on Skein panel close: save, discard, or keep open #4

Description

@hlship

Closing the Skein webview panel's tab currently just discards the running session without asking (see the temporary stopActiveSession({ save: false }) behavior added for the panel's onDidDispose handler in extension.ts) - previously it silently saved instead, which was surprising in the other direction (e.g. a demo/scratch skein getting overwritten with in-progress state just because a tab got closed).

Should instead ask the user, e.g. via vscode.window.showWarningMessage with three actions:

  • Close without saving - stop the session, discard changes (today's behavior)
  • Save then close - persist via PersistenceManager.saveSession, then stop
  • Keep open - cancel the close (not clear this is achievable for a webview panel dispose event - may need onWillClose-style interception, or reopening the panel immediately if the underlying VS Code API doesn't support vetoing a dispose)

Only relevant once there's real risk of losing in-progress edits (undo/redo, bless, command input) - low urgency while the UI is still read-only.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions