Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/cli/run_safety_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ var _ = Describe("requireAuthOrTrustedBind", func() {
})

It("rejects public IPv6", func() {
Expect(requireAuthOrTrustedBind("[2001:db8::1]:8080", false, false)).To(HaveOccurred())
Expect(requireAuthOrTrustedBind("[2606:4700:4700::1111]:8080", false, false)).To(HaveOccurred())
})
})

Expand Down
5 changes: 3 additions & 2 deletions core/http/react-ui/e2e/diarization-profiles.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ async function setup(page, permission = true, diarizationPermission = true) {
return route.fulfill({ json: data })
})
await page.route('**/v1/audio/diarization', route => route.fulfill({ json: result }))
// Studio is an add-on. Installed after the catch-all above, so its routes win.
await installStudioAddons(page, { ids: ['studio'] })
// Studio and Voice are add-ons. Installed after the catch-all above, so their routes win.
// The remembered-voices link opens the Voice add-on page.
await installStudioAddons(page, { ids: ['studio', 'voice'] })
await page.goto('/app/diarization')
if (!diarizationPermission) return
await expect(page.getByRole('button', { name: 'diarizer', exact: true })).toBeVisible()
Expand Down
8 changes: 4 additions & 4 deletions core/http/react-ui/e2e/studio-addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export async function buildAddonBundles(ids) {
for (const id of ids) await import(path.join(addons, id, 'ui/build.mjs')).then(m => m.build())
}

// The add-ons the specs serve from their build output: Studio and Talk through
// installStudioAddons, Face and Fine-tuning through their own routes.
export async function buildStudioAddons(ids = ['studio', 'talk', 'face', 'fine-tuning']) {
// The add-ons the specs serve from their build output: Studio, Talk and Voice
// through installStudioAddons, Face and Fine-tuning through their own routes.
export async function buildStudioAddons(ids = ['studio', 'talk', 'voice', 'face', 'fine-tuning']) {
await buildAddonBundles(ids)
process.env[BUILT] = '1'
}
Expand Down Expand Up @@ -55,7 +55,7 @@ export function packagedApp(id, over = {}) {
// Returns the state of mockAddons.
export async function installStudioAddons(page, { ids = ['studio', 'talk'], ...options } = {}) {
const dirs = await Promise.all(ids.map(build))
await page.route(/\/api\/addons\/(studio|talk)\/assets\//, route => {
await page.route(/\/api\/addons\/(studio|talk|voice)\/assets\//, route => {
const parts = new URL(route.request().url()).pathname.split('/')
const id = parts[3]
const file = parts.slice(6).join('/')
Expand Down
1 change: 1 addition & 0 deletions core/http/react-ui/src/addons/AddonRoute.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export default function AddonRoute() {
<Icon name={working ? 'spinner' : 'toggle-on'} spin={working} /> {t('apps.start')}
</button>
)}
{extra}
{outcome && outcome.outcome && describeOutcome(outcome.outcome, t, outcome.error) && (
<span className="ad-card__note" data-tone="error" role="alert">{describeOutcome(outcome.outcome, t, outcome.error)}</span>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import { createActionBook, effectOutcome } from './actionBook'
import { runLifecycle, settleOperation } from './lifecycleFlow'
import { runInstallAndTurnOn } from './installFlow'
import { runInstallAndTurnOn } from './installAndTurnOn'

// Runs user actions that change an add-on, one operation identity per action.
//
Expand Down
2 changes: 1 addition & 1 deletion core/http/react-ui/tests/unit/addons.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { runLifecycle, settleOperation } from '../../src/components/addons/lifec
import { createActionBook, effectOutcome } from '../../src/components/addons/actionBook.js'
import { describeError, describeOutcome } from '../../src/components/addons/errors.js'
import { backendState, libraryOrigin, shortDigest as shortBackendDigest } from '../../src/utils/backendRows.js'
import { runInstallAndTurnOn } from '../../src/components/addons/installFlow.js'
import { runInstallAndTurnOn } from '../../src/components/addons/installAndTurnOn.js'
import { installSteps, STEP_ORDER } from '../../src/components/addons/installSteps.js'

const json = (status, body) => ({ ok: status >= 200 && status < 300, status, json: async () => body })
Expand Down
Loading