Skip to content

feat: add Save All support for tabs and close confirmation#97

Merged
ZFordDev merged 1 commit into
ZFordDev:mainfrom
TechSwimmer:feat/save-all-tabs
May 27, 2026
Merged

feat: add Save All support for tabs and close confirmation#97
ZFordDev merged 1 commit into
ZFordDev:mainfrom
TechSwimmer:feat/save-all-tabs

Conversation

@TechSwimmer
Copy link
Copy Markdown
Contributor

Save All (UX Improvement)

Closes #82

SnapDock now supports Save All for multi-tab workflows.

What was added

Toolbar action

  • Added a Save All button next to Save
  • Saves all open tabs with unsaved changes
  • Skips clean tabs automatically
  • Updates tab save-state indicators after save

Close dialog action

The unsaved-changes prompt now includes:

  • Cancel
  • Save All
  • Discard Changes

Save All behavior

  • Saves all dirty tabs before closing SnapDock
  • No per-tab discard prompts in this flow
  • App closes only after successful saves

Core implementation

  • Added save_all_tabs() in src/modules/file/tabs.js
  • Wired toolbar action in src/modules/ui/editorSync.js
  • Added close-flow IPC bridge:

src/preload.js

  • workspaceAPI.onSaveAllForCloseRequest(...)
  • workspaceAPI.sendSaveAllForCloseResult(...)

src/scripts.js

  • Handles close-time save-all request
  • Executes save_all_tabs()
  • Returns result to main process

main.js

  • Updated close orchestration to support Save All decision flow

Notes / Current Limitations

  • Untitled dirty tabs may open Save As dialogs (expected behavior)
  • Batch save is best-effort (no transactional rollback)
  • Manual feature only (no autosave yet)

Manual Testing

  • Tested toolbar Save All with multiple dirty tabs
  • Verified clean tabs are skipped
  • Verified save-state indicators update correctly
  • Tested close dialog Save All flow
  • Verified app closes after successful save
  • Tested in single-file and folder workspace modes

@ZFordDev ZFordDev merged commit 3bc8ffd into ZFordDev:main May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add “Save All” Support (Toolbar + Unsaved Prompt)

2 participants