Skip to content

feat(gui): show restart message during auto-upgrade#10511

Closed
majiayu000 wants to merge 1 commit intosyncthing:mainfrom
majiayu000:fix-1248-better-restart-message-1230-1850
Closed

feat(gui): show restart message during auto-upgrade#10511
majiayu000 wants to merge 1 commit intosyncthing:mainfrom
majiayu000:fix-1248-better-restart-message-1230-1850

Conversation

@majiayu000
Copy link
Copy Markdown

Summary

This PR fixes #1248 by showing "Syncthing is restarting" instead of "Connection Error" when an automatic upgrade triggers a restart.

Changes

  • Add new UpgradeStarted event type in lib/events/events.go
  • Emit UpgradeStarted event in cmd/syncthing/main.go when auto-upgrade completes and restart is imminent
  • Add event handler in gui/default/syncthing/core/eventService.js to register the new event
  • Add listener in gui/default/syncthing/core/syncthingController.js to show the restarting dialog when the event is received
  • Document the new event in man/syncthing-event-api.7

Test plan

  • Code compiles successfully
  • Existing events tests pass
  • Manual test: trigger auto-upgrade and verify "Syncthing is restarting" dialog appears

🤖 Generated with Claude Code

…1248)

Add a new UpgradeStarted event that is emitted when an automatic upgrade
has been performed and Syncthing is about to restart. The GUI listens
for this event and shows the "Syncthing is restarting" dialog instead of
the misleading "Connection Error" message.

This improves the user experience during automatic upgrades by providing
a clear indication that the system is restarting as expected.

Signed-off-by: majiayu000 <1835304752@qq.com>
@github-actions github-actions bot added the enhancement New features or improvements of some kind, as opposed to a problem (bug) label Dec 30, 2025
@calmh
Copy link
Copy Markdown
Member

calmh commented Dec 30, 2025

This will show a restarting dialog a full minute before the restart happens.

@acolomb
Copy link
Copy Markdown
Member

acolomb commented Dec 30, 2025

Please also note that any changes to the man pages are futile. They are generated from our separate documentation repository. You have to update the source there.

@majiayu000
Copy link
Copy Markdown
Author

Closing this PR as I need more time to properly understand the upgrade timing and test the implementation in a real environment. Thank you for the feedback.

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

Labels

enhancement New features or improvements of some kind, as opposed to a problem (bug)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better restart message during auto-upgrade

3 participants