mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
feat: unified restart notification with reason-specific messaging (#3147)
* feat: unified restart notification with reason-specific messaging Replace statusInfo.updated (bool) with serverInfo.restart (nullable enum) to unify all restart-needed scenarios under a single PatchDB field. Backend sets the restart reason in RPC handlers for hostname change (mdns), language change, kiosk toggle, and OS update download. Init clears it on boot. The update flow checks this field to prevent updates when a restart is already pending. Frontend shows a persistent action bar with reason-specific i18n messages instead of per-feature restart dialogs. For .local hostname changes, the existing "open new address" dialog is preserved — the restart toast appears after the user logs in on the new address. Also includes migration in v0_4_0_alpha_23 to remove statusInfo.updated and initialize serverInfo.restart. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix broken styling and improve settings layout * refactor: move restart field from ServerInfo to ServerStatus The restart reason belongs with other server state (shutting_down, restarting, update_progress) rather than on the top-level ServerInfo. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix PR comment --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
3
sdk/base/lib/osBindings/RestartReason.ts
Normal file
3
sdk/base/lib/osBindings/RestartReason.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type RestartReason = 'mdns' | 'language' | 'kiosk' | 'update'
|
||||
@@ -2,11 +2,12 @@
|
||||
import type { BackupProgress } from './BackupProgress'
|
||||
import type { FullProgress } from './FullProgress'
|
||||
import type { PackageId } from './PackageId'
|
||||
import type { RestartReason } from './RestartReason'
|
||||
|
||||
export type ServerStatus = {
|
||||
backupProgress: { [key: PackageId]: BackupProgress } | null
|
||||
updated: boolean
|
||||
updateProgress: FullProgress | null
|
||||
shuttingDown: boolean
|
||||
restarting: boolean
|
||||
restart: RestartReason | null
|
||||
}
|
||||
|
||||
@@ -236,6 +236,7 @@ export { RenameGatewayParams } from './RenameGatewayParams'
|
||||
export { ReplayId } from './ReplayId'
|
||||
export { RequestCommitment } from './RequestCommitment'
|
||||
export { ResetPasswordParams } from './ResetPasswordParams'
|
||||
export { RestartReason } from './RestartReason'
|
||||
export { RestorePackageParams } from './RestorePackageParams'
|
||||
export { RunActionParams } from './RunActionParams'
|
||||
export { Security } from './Security'
|
||||
|
||||
Reference in New Issue
Block a user