Skip to content

Conversation

@IDisposable
Copy link
Contributor

If nothing changed (e.g. no upgrade available, or they cancelled, or hit back), we do not need to force a reload when the modal closes.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces conditional page reloading after device updates by adding a shouldReload flag to the update store. Previously, the page would always reload when closing the update dialog; now it only reloads when an update has been confirmed.

Key changes:

  • Added shouldReload state and setShouldReload action to the useUpdateStore
  • Modified onClose to conditionally reload the page based on the shouldReload flag
  • Updated onConfirmUpdate to set shouldReload to true when the user confirms an update

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ui/src/hooks/stores.ts Adds shouldReload state and setter to UpdateState interface and store implementation; includes formatting changes to MacrosState type
ui/src/routes/devices.$id.settings.general.update.tsx Implements conditional page reload logic based on shouldReload flag; updates hook dependencies accordingly

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@IDisposable IDisposable force-pushed the fix/no-redirect-on-upgrade-back branch 2 times, most recently from 54d6669 to d049322 Compare November 7, 2025 22:56
If nothing changed (e.g. no upgrade available, or they cancelled, or hit back), we do not need to force a reload when the modal closes.
@IDisposable IDisposable force-pushed the fix/no-redirect-on-upgrade-back branch from d049322 to 4499c1d Compare November 7, 2025 22:59
@ym ym merged commit 7f2dcc8 into jetkvm:dev Nov 10, 2025
4 checks passed
@IDisposable IDisposable deleted the fix/no-redirect-on-upgrade-back branch November 10, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants