Skip to content

Commit fbb3e19

Browse files
committed
fix(ci): unblock packaged update checks
1 parent bae7e60 commit fbb3e19

5 files changed

Lines changed: 26 additions & 6 deletions

File tree

‎src/main/index.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ const bootstrapHealthRequest = {
3434
}
3535

3636
if (bootstrapHealthRequest.resultPath) {
37+
app.on('window-all-closed', () => {
38+
// The probe destroys its hidden renderer before checking the Runtime.
39+
// Keep this short-lived process alive until the explicit app.exit below.
40+
})
3741
const healthStartedAt = new Date().toISOString()
3842
const healthDeadlineAt = Date.now() + UPDATE_HEALTH_INTERNAL_TIMEOUT_MS
3943
const reportProgress = (

‎src/main/main-bundle-path.test.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1+
import { join, resolve } from 'node:path'
12
import { pathToFileURL } from 'node:url'
23
import { describe, expect, it } from 'vitest'
34
import { mainBundleDirectory } from './main-bundle-path'
45

56
describe('main bundle path', () => {
7+
const bundleRoot = resolve('/app/out/main')
8+
69
it('keeps the entry bundle rooted at out/main', () => {
7-
expect(mainBundleDirectory(pathToFileURL('/app/out/main/index.js').href))
8-
.toBe('/app/out/main')
10+
expect(mainBundleDirectory(pathToFileURL(join(bundleRoot, 'index.js')).href))
11+
.toBe(bundleRoot)
912
})
1013

1114
it('normalizes a split chunk back to out/main', () => {
12-
expect(mainBundleDirectory(pathToFileURL('/app/out/main/chunks/desktop.js').href))
13-
.toBe('/app/out/main')
15+
expect(mainBundleDirectory(pathToFileURL(join(bundleRoot, 'chunks', 'desktop.js')).href))
16+
.toBe(bundleRoot)
1417
})
1518
})

‎src/main/main-entry-routing.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ describe('main entry routing', () => {
77

88
expect(source).toContain("import('./main-desktop-entry')")
99
expect(source).toContain("import('./update-health-check')")
10+
expect(source).toContain("app.on('window-all-closed'")
1011
expect(source).not.toContain("from './main-app-context'")
12+
expect(source.indexOf("app.on('window-all-closed'")).toBeGreaterThan(
13+
source.indexOf('if (bootstrapHealthRequest.resultPath)')
14+
)
15+
expect(source.indexOf("app.on('window-all-closed'")).toBeLessThan(
16+
source.indexOf("import('./update-health-check')")
17+
)
1118
expect(source.indexOf('bootstrapHealthRequest.resultPath')).toBeLessThan(
1219
source.indexOf("import('./main-desktop-entry')")
1320
)

‎src/renderer/src/components/chat/FloatingComposerQueuedMessages.dock.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ describe('FloatingComposerQueuedMessages DSH queue dock interactions', () => {
118118
expect(header?.getAttribute('aria-expanded')).toBe('false')
119119
const listId = header?.getAttribute('aria-controls')
120120
expect(listId).toBeTruthy()
121-
expect(document.getElementById(listId!)).not.toBeNull()
121+
expect(document.getElementById(listId!)?.getAttribute('aria-label'))
122+
.toBe('queuedMessagesTitle:2')
122123
expect(container.querySelector('[data-queued-message-id="q-1"]')).toBeNull()
123124

124125
await act(async () => header?.click())

‎src/renderer/src/components/chat/FloatingComposerQueuedMessages.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,12 @@ export function FloatingComposerQueuedMessages({
194194
</button>
195195
) : null}
196196

197-
<ul id={listId} className={css.list} hidden={!expanded}>
197+
<ul
198+
id={listId}
199+
className={css.list}
200+
aria-label={t('queuedMessagesTitle', { count: queue.length })}
201+
hidden={!expanded}
202+
>
198203
{expanded ? queue.map((message) => {
199204
const isEditing = editing?.id === message.id
200205
const isBusy = busy?.id === message.id

0 commit comments

Comments
 (0)