diff --git a/packages/client/ui-settings-models/src/client/OnboardingModal.tsx b/packages/client/ui-settings-models/src/client/OnboardingModal.tsx
index 5320813dde..3e2b25559c 100644
--- a/packages/client/ui-settings-models/src/client/OnboardingModal.tsx
+++ b/packages/client/ui-settings-models/src/client/OnboardingModal.tsx
@@ -41,7 +41,7 @@ export function OnboardingModal({
title={title}
onClose={ignoreImplicitDismiss}
headless
- className={css['dialog'] ?? ''}
+ className={css.dialog as string}
>
{title}
diff --git a/packages/client/ui-settings-models/tests/apply.client.spec.ts b/packages/client/ui-settings-models/tests/apply.client.spec.ts
index d8fc11496b..39ba3e4b65 100644
--- a/packages/client/ui-settings-models/tests/apply.client.spec.ts
+++ b/packages/client/ui-settings-models/tests/apply.client.spec.ts
@@ -14,7 +14,7 @@ import { WelcomeNotice } from '../src/client/WelcomeNotice.tsx'
// the shipped Chinese copy, so they state the browser they assume.
usePinnedBrowserLanguages('zh-CN')
-async function bench() {
+async function bench(isLoopback = true) {
const ctx = new Context()
await ctx.plugin(SlotRegistry).await()
const locale = new LocaleRuntime(ctx)
@@ -24,7 +24,7 @@ async function bench() {
new TestRemote(ctx)
// The apply path only captures the wire face; no call leaves this fake
// until a section actually loads.
- ctx.provide('connection', { api: {}, isLoopback: true } as never)
+ ctx.provide('connection', { api: {}, isLoopback } as never)
return { ctx, slots: ctx.get('slots') as SlotRegistry, locale }
}
@@ -142,6 +142,22 @@ describe('ui-settings-models apply', () => {
expect(() => b.locale.register('settings.models', 'zh', {})).not.toThrow()
expect(() => b.locale.register('settings.models', 'en', {})).not.toThrow()
})
+
+ it('keeps remote-browser acknowledgement in process memory', async () => {
+ const b = await bench(false)
+ declare(b.slots)
+ await b.ctx.plugin({ inject: [...inject], apply }).await()
+ const entry = b.slots.entries('settings.onboarding')
+ .find(candidate => candidate.options.id === 'welcome-notice')!
+ const injected = (
+ entry.inject as unknown as () => import('../src/client/WelcomeNotice.tsx').WelcomeNoticeInjected
+ )()
+
+ await injected.controller.load()
+ expect(injected.controller.store.getSnapshot()).toEqual({
+ status: 'ready', acknowledged: false, error: null,
+ })
+ })
})
describe('pushed invalidations', () => {
diff --git a/packages/client/ui-settings-models/tests/onboarding-dialog.client.spec.tsx b/packages/client/ui-settings-models/tests/onboarding-dialog.client.spec.tsx
index 3c3074f3e7..ee49a225d8 100644
--- a/packages/client/ui-settings-models/tests/onboarding-dialog.client.spec.tsx
+++ b/packages/client/ui-settings-models/tests/onboarding-dialog.client.spec.tsx
@@ -146,6 +146,13 @@ function harness(options: {
}
describe('DeepSeekOnboardingDialog', () => {
+ it('renders when the shell root is absent', async () => {
+ const h = harness()
+ document.getElementById('root')!.remove()
+ render()
+ expect(await screen.findByRole('dialog', { name: en.onboardingTitle })).toBeTruthy()
+ })
+
it('loads a credential-only modal, inerts the product, and focuses the key', async () => {
const h = harness()
render()