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.
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'sonDidDisposehandler inextension.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.showWarningMessagewith three actions:PersistenceManager.saveSession, then stoponWillClose-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.