Skip to content

Commit 3a32768

Browse files
Artmannclaude
andauthored
feat: Enable snapshots by default for all users (#313)
Change the default value of `deepnote.snapshots.enabled` from `false` to `true` so that all users get the benefits of snapshot mode by default: - Outputs saved to separate snapshot files - Main .deepnote file stays cleaner with just source code - Document stays clean until actual content changes https://claude.ai/code/session_012kUL7YuMgYq3CR1xqnrLb5 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 07855da commit 3a32768

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,7 @@
16521652
},
16531653
"deepnote.snapshots.enabled": {
16541654
"type": "boolean",
1655-
"default": false,
1655+
"default": true,
16561656
"description": "When enabled, outputs are saved to separate snapshot files in a 'snapshots' folder instead of the main .deepnote file.",
16571657
"scope": "resource"
16581658
},

src/notebooks/deepnote/deepnoteActivationService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class DeepnoteActivationService implements IExtensionSyncActivationServic
7777

7878
const config = workspace.getConfiguration('deepnote');
7979

80-
return config.get<boolean>('snapshots.enabled', false);
80+
return config.get<boolean>('snapshots.enabled', true);
8181
}
8282

8383
private promptReloadForSnapshots(): void {

src/notebooks/deepnote/snapshots/snapshotService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ export class SnapshotService implements ISnapshotMetadataService, IExtensionSync
328328
isSnapshotsEnabled(): boolean {
329329
const config = workspace.getConfiguration('deepnote');
330330

331-
return config.get<boolean>('snapshots.enabled', false);
331+
return config.get<boolean>('snapshots.enabled', true);
332332
}
333333

334334
mergeOutputsIntoBlocks(blocks: DeepnoteBlock[], outputs: Map<string, DeepnoteOutput[]>): DeepnoteBlock[] {

src/notebooks/deepnote/snapshots/snapshotService.unit.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ suite('SnapshotService', () => {
438438
suite('isSnapshotsEnabled', () => {
439439
test('should return true when snapshots.enabled is true', () => {
440440
const mockConfig = mock<WorkspaceConfiguration>();
441-
when(mockConfig.get<boolean>('snapshots.enabled', false)).thenReturn(true);
441+
when(mockConfig.get<boolean>('snapshots.enabled', true)).thenReturn(true);
442442
when(mockedVSCodeNamespaces.workspace.getConfiguration('deepnote')).thenReturn(instance(mockConfig));
443443

444444
const result = service.isSnapshotsEnabled();
@@ -448,7 +448,7 @@ suite('SnapshotService', () => {
448448

449449
test('should return false when snapshots.enabled is false', () => {
450450
const mockConfig = mock<WorkspaceConfiguration>();
451-
when(mockConfig.get<boolean>('snapshots.enabled', false)).thenReturn(false);
451+
when(mockConfig.get<boolean>('snapshots.enabled', true)).thenReturn(false);
452452
when(mockedVSCodeNamespaces.workspace.getConfiguration('deepnote')).thenReturn(instance(mockConfig));
453453

454454
const result = service.isSnapshotsEnabled();
@@ -1007,7 +1007,7 @@ project:
10071007
test('should detect Run All when all code cells are executed', async () => {
10081008
// Set up mocks
10091009
const mockConfig = mock<WorkspaceConfiguration>();
1010-
when(mockConfig.get<boolean>('snapshots.enabled', false)).thenReturn(true);
1010+
when(mockConfig.get<boolean>('snapshots.enabled', true)).thenReturn(true);
10111011
when(mockedVSCodeNamespaces.workspace.getConfiguration('deepnote')).thenReturn(instance(mockConfig));
10121012

10131013
const projectId = 'test-project-id';

0 commit comments

Comments
 (0)