Skip to content

Conversation

@ellisonbg
Copy link
Collaborator

This commit disables JupyterLab's manual save commands since documents are now autosaved. The implementation:

  • Overrides four save-related commands: save, save-as, save-all, and toggle-autosave
  • Removes keyboard shortcuts: Cmd/Ctrl+S and Cmd/Ctrl+Shift+S no longer trigger save operations
  • Provides user feedback: Menu items show "(Autosaving)" labels and tooltips explaining save operations are disabled
  • Maintains UX consistency: Commands remain visible but execute as no-ops instead of being completely hidden

The plugin activates after app restoration to ensure proper command registry manipulation using JupyterLab's private API.

@ellisonbg ellisonbg added the bug Something isn't working label Jun 25, 2025
Copy link
Collaborator

@dlqqq dlqqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Since this overrides commands that are unused anyways, this looks safe. I will test this more thoroughly tomorrow, before we do a release ideally.

One optional suggestion: the benefit of this approach is that we can define what happens when a command is attempted. Do you think it's worth showing a small notification that displays "documents are autosaved" when a user attempts to save manually?

EDIT: Tested and verified that this works locally. 👍

@dlqqq
Copy link
Collaborator

dlqqq commented Jun 25, 2025

@ellisonbg PR that adds some minor enhancements to this branch: https://github.com/ellisonbg/jupyter-server-documents/pull/1

@dlqqq
Copy link
Collaborator

dlqqq commented Jun 25, 2025

Also opened a follow-up issue: #128

@dlqqq
Copy link
Collaborator

dlqqq commented Jun 25, 2025

Any chance we could show the notification again after a certain interval of time instead of a certain number of attempts? Worried users could miss the first notification and believe the app to be broken.

A third approach would be to just create a notification every time a save is attempted. That also encourages the user to stop manually saving to avoid a flood of notifications.

Copy link
Collaborator

@dlqqq dlqqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock. Opened a follow-up issue: #129.

@dlqqq dlqqq merged commit a88717f into jupyter-ai-contrib:main Jun 25, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants