sdk db backups, wifi ux, release notes, minor copy

This commit is contained in:
Matt Hill
2026-03-24 16:39:31 -06:00
parent 53dff95365
commit 186925065d
10 changed files with 222 additions and 144 deletions

View File

@@ -202,7 +202,7 @@ export class ActionInputModal {
const message = `${this.i18n.transform('As a result of this change, the following services will no longer work properly and may crash')}:<ul>`
const content =
`${message}${breakages.map(id => `<li><b>${getManifest(packages[id]!).title}</b></li>`)}</ul>` as i18nKey
`${message}${breakages.map(id => `<li><b>${getManifest(packages[id]!).title}</b></li>`).join('')}</ul>` as i18nKey
return firstValueFrom(
this.dialog

View File

@@ -26,6 +26,7 @@ import { PatchDB } from 'patch-db-client'
import {
catchError,
defer,
exhaustMap,
finalize,
first,
map,
@@ -34,7 +35,10 @@ import {
of,
Subject,
switchMap,
takeUntil,
takeWhile,
tap,
timer,
} from 'rxjs'
import {
FormComponent,
@@ -184,7 +188,7 @@ export default class SystemWifiComponent {
),
this.refresh$.pipe(
tap(() => this.refreshing.set(true)),
switchMap(() =>
exhaustMap(() =>
this.getWifi$().pipe(finalize(() => this.refreshing.set(false))),
),
),
@@ -205,6 +209,10 @@ export default class SystemWifiComponent {
try {
await this.api.enableWifi({ enabled: enable })
if (enable) {
this.update$.next({ known: [], available: [] })
this.pollForNetworks()
}
} catch (e: any) {
this.errorService.handleError(e)
} finally {
@@ -259,6 +267,15 @@ export default class SystemWifiComponent {
}
}
private pollForNetworks(): void {
timer(0, 500)
.pipe(
takeWhile(() => !this.wifi()?.available?.length),
takeUntil(timer(5000)),
)
.subscribe(() => this.refresh$.next())
}
private async confirmWifi(ssid: string): Promise<void> {
const maxAttempts = 5
let attempts = 0

View File

@@ -71,13 +71,16 @@ export function getInstalledPrimaryStatus({
tasks,
statusInfo,
}: T.PackageDataEntry): PrimaryStatus {
const base = getInstalledBaseStatus(statusInfo)
if (
!INACTIVE_STATUSES.includes(base) &&
Object.values(tasks).some(t => t.active && t.task.severity === 'critical')
) {
return 'task-required'
}
return getInstalledBaseStatus(statusInfo)
return base
}
function getHealthStatus(statusInfo: T.StatusInfo): T.HealthStatus | null {