Check companion dashboards and omit headless UI waiting messages
Demo images / Build & push demo images (push) Failing after 37s
Demo images / Build & push demo images (push) Failing after 37s
This commit is contained in:
@@ -167,7 +167,7 @@ describe('appsConfig service filtering', () => {
|
||||
pkg.health = null
|
||||
expect(isAppReadyForLaunch(pkg)).toBe(false)
|
||||
expect(canLaunch(pkg)).toBe(false)
|
||||
expect(launchBlockedReason(pkg.manifest.id, pkg)).toBe('Waiting for GitWorkshop…')
|
||||
expect(launchBlockedReason(pkg.manifest.id, pkg)).toBe('Waiting for GitWorkshop’s web interface…')
|
||||
pkg.health = 'healthy'
|
||||
expect(canLaunch(pkg)).toBe(true)
|
||||
})
|
||||
@@ -194,6 +194,18 @@ describe('appsConfig service filtering', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('headless service readiness messages', () => {
|
||||
it('does not treat an API-only service as waiting for its own nonexistent UI', () => {
|
||||
for (const id of ['phoenixd', 'angor-indexer', 'angor-relay', 'custom-api']) {
|
||||
const pkg = makePkg(id, id, 'other')
|
||||
pkg['ui-ready'] = false
|
||||
pkg.health = 'healthy'
|
||||
expect(canLaunch(pkg)).toBe(false)
|
||||
expect(launchBlockedReason(id, pkg)).toBe('')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
describe('HTTP readiness independent of container health', () => {
|
||||
it('blocks fixed launch URLs while the HTTP upstream is unavailable', () => {
|
||||
for (const id of ['gitea', 'filebrowser', 'fedimint', 'lnd']) {
|
||||
@@ -202,7 +214,7 @@ describe('HTTP readiness independent of container health', () => {
|
||||
pkg.health = 'healthy'
|
||||
expect(canLaunch(pkg)).toBe(false)
|
||||
expect(isAppReadyForLaunch(pkg)).toBe(false)
|
||||
expect(launchBlockedReason(id, pkg)).toBe(`Waiting for ${resolveAppTitle(id, pkg)}…`)
|
||||
expect(launchBlockedReason(id, pkg)).toBe(`Waiting for ${resolveAppTitle(id, pkg)}’s web interface…`)
|
||||
pkg['ui-ready'] = true
|
||||
expect(isAppReadyForLaunch(pkg)).toBe(true)
|
||||
}
|
||||
|
||||
@@ -303,9 +303,12 @@ export function isAppReadyForLaunch(pkg: PackageDataEntry): boolean {
|
||||
export function launchBlockedReason(id: string, pkg?: PackageDataEntry | null): string {
|
||||
const appId = pkg?.manifest?.id || id
|
||||
const title = pkg ? resolveAppTitle(appId, pkg) : id
|
||||
// API-only services have no web interface to wait for. Their health badge
|
||||
// describes service availability; a failed HTML probe is not a dependency.
|
||||
if (pkg && isWebsitePackage(appId, pkg)) return ''
|
||||
if (pkg?.['ui-ready'] === false && !isServicePackage(appId, pkg)) {
|
||||
if (pkg.state === PackageState.Stopped || pkg.state === PackageState.Exited) return 'App is stopped. Start it to open it.'
|
||||
return `Waiting for ${title}…`
|
||||
return `Waiting for ${title}’s web interface…`
|
||||
}
|
||||
if (
|
||||
(appId === 'fedimint' || appId === 'fedimintd') &&
|
||||
@@ -314,7 +317,7 @@ export function launchBlockedReason(id: string, pkg?: PackageDataEntry | null):
|
||||
return 'Guardian opens a wait page until Bitcoin finishes initial sync.'
|
||||
}
|
||||
if (pkg && pkg.state === PackageState.Running && !isAppReadyForLaunch(pkg)) {
|
||||
return `Waiting for ${title}…`
|
||||
return `Waiting for ${title}’s web interface…`
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user