Files
start-os/sdk/base/lib/osBindings/ServerInfo.ts
Matt Hill 591e3bec1a 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>
2026-03-28 22:35:34 -06:00

38 lines
1.1 KiB
TypeScript

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Governor } from './Governor'
import type { KeyboardOptions } from './KeyboardOptions'
import type { LshwDevice } from './LshwDevice'
import type { NetworkInfo } from './NetworkInfo'
import type { RestartReason } from './RestartReason'
import type { ServerStatus } from './ServerStatus'
import type { SmtpValue } from './SmtpValue'
export type ServerInfo = {
arch: string
platform: string
id: string
name: string
hostname: string
version: string
packageVersionCompat: string
postInitMigrationTodos: Record<string, unknown>
lastBackup: string | null
network: NetworkInfo
statusInfo: ServerStatus
unreadNotificationCount: number
passwordHash: string
pubkey: string
caFingerprint: string
ntpSynced: boolean
zram: boolean
governor: Governor | null
smtp: SmtpValue | null
echoipUrls: string[]
ram: number
devices: Array<LshwDevice>
kiosk: boolean | null
language: string | null
keyboard: KeyboardOptions | null
restart: RestartReason | null
}