Skip to content

Commit 32ee414

Browse files
committed
chore(desktop): build signed staging QA artifact without publishing
1 parent 1e830f0 commit 32ee414

6 files changed

Lines changed: 36 additions & 11 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: desktop-consent-signed-qa
2+
on:
3+
push:
4+
branches: [codex/desktop-consent-signed-qa]
5+
permissions:
6+
contents: write
7+
jobs:
8+
package:
9+
uses: ./.github/workflows/desktop-release.yml
10+
with:
11+
version: v0.9.17-staging.qa8835.2
12+
publish: false
13+
sign: true
14+
secrets: inherit

‎apps/desktop/e2e/browser-page-dialogs.spec.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,12 @@ createRoot(document.getElementById('root')).render(createElement(Fixture));`,
433433
await userInput('#draft')
434434
await panelAction({ action: 'reload' })
435435
await expect(shell.getByRole('button', { name: 'Stay', exact: true })).toBeFocused()
436+
await shell.getByRole('dialog').screenshot({
437+
path: test.info().outputPath('leave-page-modal.png'),
438+
animations: 'allow',
439+
caret: 'initial',
440+
})
441+
await expect(shell.getByRole('button', { name: 'Stay', exact: true })).toBeFocused()
436442
await shell.keyboard.press('Escape')
437443
await expect.poll(pageDialog).toBeNull()
438444
await expect

‎apps/desktop/e2e/local-files.spec.ts‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,12 @@ createRoot(document.getElementById('settings')).render(
316316
})
317317
const shown = app.waitForEvent('window')
318318
await permission.prompt
319-
.getByRole('button', { name: 'Allow all files…', exact: true })
319+
.getByRole('button', { name: 'Full file access', exact: true })
320320
.click({ noWaitAfter: true })
321321
const confirmation = await shown
322322
calls.expiringFullAccess = undefined
323323
await confirmation
324-
.getByRole('button', { name: 'Allow all files', exact: true })
324+
.getByRole('button', { name: 'Enable', exact: true })
325325
.click({ noWaitAfter: true })
326326
expect(await permission.result).toMatchObject({ ok: false })
327327
expect(
@@ -347,7 +347,7 @@ createRoot(document.getElementById('settings')).render(
347347
const permission = await requestPermission({ operation: 'read', toolCallId: 'fullAccess' })
348348
const confirmationShown = app.waitForEvent('window')
349349
await permission.prompt
350-
.getByRole('button', { name: 'Allow all files…', exact: true })
350+
.getByRole('button', { name: 'Full file access', exact: true })
351351
.click({ noWaitAfter: true })
352352
const confirmation = await confirmationShown
353353
await expect(confirmation.getByRole('button', { name: 'Cancel', exact: true })).toBeFocused()
@@ -365,14 +365,14 @@ createRoot(document.getElementById('settings')).render(
365365
).toMatchObject({ fullFileAccess: false })
366366
const acceptedConfirmation = app.waitForEvent('window')
367367
await folderPrompt
368-
.getByRole('button', { name: 'Allow all files…', exact: true })
368+
.getByRole('button', { name: 'Full file access', exact: true })
369369
.click({ noWaitAfter: true })
370370
const allowAll = await acceptedConfirmation
371371
await allowAll.screenshot({
372372
path: test.info().outputPath('full-file-access-confirmation.png'),
373373
})
374374
await allowAll
375-
.getByRole('button', { name: 'Allow all files', exact: true })
375+
.getByRole('button', { name: 'Enable', exact: true })
376376
.click({ noWaitAfter: true })
377377
expect(await permission.result).toMatchObject({
378378
ok: true,
@@ -939,7 +939,10 @@ createRoot(document.getElementById('settings')).render(
939939
try {
940940
await toggle.click()
941941
await expect(
942-
window.getByText('Could not update file access', { exact: true })
942+
window.getByText(
943+
'Could not save file access settings. Your previous setting may return after restarting Sim.',
944+
{ exact: true }
945+
)
943946
).toBeVisible()
944947
await expect(toggle).not.toBeChecked()
945948
expect(

‎apps/desktop/src/main/desktop-settings.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ export function createDesktopSettingsService(
187187
if (!deps.config.flush()) {
188188
deps.config.set('fullFileAccess', false)
189189
deps.onFullFileAccessChanged?.(read())
190-
throw new Error('Could not save file access settings')
190+
throw new Error(
191+
'Could not save file access settings. Your previous setting may return after restarting Sim.'
192+
)
191193
}
192194
const preferences = read()
193195
deps.onFullFileAccessChanged?.(preferences)

‎apps/desktop/src/main/local-file-permissions.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export class LocalFilePermissions {
197197
buttons: [
198198
'Allow folder',
199199
"Don't allow",
200-
...(this.enableFullFileAccess ? ['Allow all files…'] : []),
200+
...(this.enableFullFileAccess ? ['Full file access'] : []),
201201
],
202202
defaultId: 1,
203203
cancelId: 1,
@@ -209,10 +209,10 @@ export class LocalFilePermissions {
209209
if (result.response === 2 && this.enableFullFileAccess) {
210210
const confirmation = {
211211
signal,
212-
title: 'Allow full file access?',
212+
title: 'Enable full file access?',
213213
message: `Sim can read and import files from any folder on this computer across chats on ${context.origin}.`,
214214
detail: 'Turn this off in Settings → Desktop → Full file access.',
215-
buttons: ['Allow all files', 'Cancel'],
215+
buttons: ['Enable', 'Cancel'],
216216
defaultId: 1,
217217
cancelId: 1,
218218
}

‎apps/sim/app/workspace/[workspaceId]/settings/components/desktop/desktop.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export function Desktop() {
7777
const { pending: fullFileAccessPending, mutate: setFullFileAccess } =
7878
useDesktopPreferenceMutation(
7979
async (bridge, enabled: boolean) => bridge.settings.setFullFileAccess?.(enabled),
80-
'Could not update file access',
80+
'Could not save file access settings. Your previous setting may return after restarting Sim.',
8181
setPreferences
8282
)
8383

0 commit comments

Comments
 (0)