Skip to content

A full-featured download manager.

fix: address desktop onboarding, bridge, and installer issues (#2062)

Dr_rOotd913011e6e8a
diff --git a/.claude/rules/i18n.md b/.claude/rules/i18n.md
index bd7cbbc1..421ac0cb 100644
--- a/.claude/rules/i18n.md
+++ b/.claude/rules/i18n.md
@@ -25,6 +25,10 @@ locale changes transactional, including rollback on failure.
`src/shared/constants/locales.ts` and a matching JSON resource.
- Every translation leaf is a string. Keep readable locale files as UTF-8;
avoid unnecessary `\uXXXX` escapes.
+- English user-visible prose, including matching test fixtures and assertions,
+ uses the typographic apostrophe `’` for contractions and possessives; do not
+ substitute the ASCII apostrophe `'`. Keep `'` only where technical syntax or
+ an external data contract requires that exact character.
- Preserve the exact `{{placeholder}}` set across every locale and every plural
variant.
- Plural keys use i18next category suffixes. Supply every cardinal category
diff --git a/build/installer-header.bmp b/build/installer-header.bmp
new file mode 100644
index 00000000..b92602c4
Binary files /dev/null and b/build/installer-header.bmp differ
diff --git a/build/installer-sidebar.bmp b/build/installer-sidebar.bmp
new file mode 100644
index 00000000..12ac4d8f
Binary files /dev/null and b/build/installer-sidebar.bmp differ
diff --git a/e2e/disclaimer.spec.ts b/e2e/disclaimer.spec.ts
index b7f8bca4..b9f3cc65 100644
--- a/e2e/disclaimer.spec.ts
+++ b/e2e/disclaimer.spec.ts
@@ -32,10 +32,11 @@ test.describe('disclaimer startup gate', () => {
.getByTestId('onboarding-language')
.boundingBox()
expect(languageBounds).not.toBeNull()
- // macOS places the 14px traffic lights at y=20, so their centerline is 27.
+ // Preserve the beta.29 onboarding geometry: the 32px language trigger
+ // sits with its centerline at y=34 in the 40px compact chrome region.
expect(
(languageBounds?.y ?? 0) + (languageBounds?.height ?? 0) / 2
- ).toBeCloseTo(27, 1)
+ ).toBeCloseTo(34, 1)
expect(app.windows().some((page) => page.url().includes('w=main'))).toBe(
false
diff --git a/electron-builder.json b/electron-builder.json
index 9eff1e97..5be02ec7 100644
--- a/electron-builder.json
+++ b/electron-builder.json
@@ -168,6 +168,8 @@
},
"nsis": {
"include": "build/installer.nsh",
+ "installerHeader": "build/installer-header.bmp",
+ "installerSidebar": "build/installer-sidebar.bmp",
"artifactName": "${productName}-Setup-${version}.${ext}",
"oneClick": false,
"allowToChangeInstallationDirectory": true,
diff --git a/package.json b/package.json
index 7155f2be..2d8f752a 100644
--- a/package.json
+++ b/package.json
@@ -33,6 +33,7 @@
"build:native-host": "node packages/native-host/build.mjs",
"build:finalize-fs": "node packages/finalize-fs/build.mjs",
"build:legal": "pnpm run ensure:electron-runtime && node scripts/generate-third-party-notices.mjs",
+ "build:installer-images": "node scripts/render-installer-images.mjs",
"generate:bridge-vectors": "node scripts/generate-bridge-pairing-vectors.mjs docs/bridge-pairing-protocol-vectors.json",
"package:flatpak-native-host": "node packages/native-host/package-flatpak-companion.mjs",
"build:snap:prepare": "node scripts/prepare-snap-project.mjs",
diff --git a/scripts/render-installer-images.mjs b/scripts/render-installer-images.mjs
new file mode 100644
index 00000000..049d7762
--- /dev/null
+++ b/scripts/render-installer-images.mjs
@@ -0,0 +1,222 @@
+// Converts the NSIS assisted-installer design sources (build/installer-*.png)
+// into the 24-bit BMP files electron-builder hands to NSIS through
+// nsis.installerHeader / nsis.installerSidebar.
+//
+// pnpm run build:installer-images
+//
+// When present, the PNG design sources must be 8-bit RGB or RGBA,
+// non-interlaced, and exported at the exact Modern UI 2 sizes listed below.
+// NSIS only accepts uncompressed 24-bit bitmaps, so the BMPs are derived and
+// committed. Missing optional PNG sources are skipped. The installer is not
+// DPI-aware (Windows scales the dialog), so keep native sizes rather than
+// shipping 2x variants.
+import { mkdir, readFile, writeFile } from 'node:fs/promises'
+import path from 'node:path'
+import { fileURLToPath } from 'node:url'
+import zlib from 'node:zlib'
+
+const REPOSITORY_ROOT = path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '..'
+)
+const PNG_SIGNATURE = Buffer.from([137, 80, 78, 71, 13, 10, 26, 10])
+const BMP_HEADER_SIZE = 14 + 40
+
+/**
+ * Modern UI 2 bitmap slots and the native sizes NSIS expects for them.
+ * header: right of the page title on every page after Welcome
+ * (electron-builder sets MUI_HEADERIMAGE_RIGHT when it is present).
+ * sidebar: Welcome and Finish pages; the uninstaller reuses it by default.
+ */
+export const INSTALLER_IMAGES = [
+ {
+ name: 'header',
+ png: 'build/installer-header.png',
+ output: 'build/installer-header.bmp',
+ width: 150,
+ height: 57,
+ },
+ {
+ name: 'sidebar',
+ png: 'build/installer-sidebar.png',
+ output: 'build/installer-sidebar.bmp',
+ width: 164,
+ height: 314,
+ },
+]
+
+/** Decodes an 8-bit, non-interlaced RGB or RGBA PNG into top-down RGB rows. */
+export function decodePng(buffer) {
+ if (!buffer.subarray(0, 8).equals(PNG_SIGNATURE)) {
+ throw new Error('Not a PNG file')
+ }
+ let ihdr
+ const idat = []
+ for (let offset = 8; offset < buffer.length; ) {
+ const length = buffer.readUInt32BE(offset)
+ const type = buffer.toString('latin1', offset + 4, offset + 8)
+ const data = buffer.subarray(offset + 8, offset + 8 + length)
+ if (type === 'IHDR') ihdr = data
+ else if (type === 'IDAT') idat.push(data)
+ else if (type === 'IEND') break
+ offset += 12 + length
+ }
+ if (!ihdr) throw new Error('PNG is missing its IHDR chunk')
+ const width = ihdr.readUInt32BE(0)
+ const height = ihdr.readUInt32BE(4)
+ const bitDepth = ihdr[8]
+ const colorType = ihdr[9]
+ const interlace = ihdr[12]
+ if (
+ bitDepth !== 8 ||
+ interlace !== 0 ||
+ (colorType !== 2 && colorType !== 6)
+ ) {
+ throw new Error(
+ `Unsupported PNG: depth=${bitDepth} colorType=${colorType} interlace=${interlace}`
+ )
+ }
+ const channels = colorType === 6 ? 4 : 3
+ const stride = width * channels
+ const raw = zlib.inflateSync(Buffer.concat(idat))
+ const rgb = Buffer.alloc(width * height * 3)
+ let previous = Buffer.alloc(stride)
+ let current = Buffer.alloc(stride)
+ let input = 0
+ for (let y = 0; y < height; y++) {
+ const filter = raw[input++]
+ for (let i = 0; i < stride; i++) {
+ const x = raw[input + i]
+ const a = i >= channels ? current[i - channels] : 0
+ const b = previous[i]
+ const c = i >= channels ? previous[i - channels] : 0
+ let value
+ switch (filter) {
+ case 0:
+ value = x
+ break
+ case 1:
+ value = x + a
+ break
+ case 2:
+ value = x + b
+ break
+ case 3:
+ value = x + ((a + b) >> 1)
+ break
+ case 4: {
+ const p = a + b - c
+ const pa = Math.abs(p - a)
+ const pb = Math.abs(p - b)
+ const pc = Math.abs(p - c)
+ value = x + (pa <= pb && pa <= pc ? a : pb <= pc ? b : c)
+ break
+ }
+ default:
+ throw new Error(`Unsupported PNG filter ${filter} on row ${y}`)
+ }
+ current[i] = value & 255
+ }
+ input += stride
+ for (let px = 0; px < width; px++) {
+ rgb.set(
+ current.subarray(px * channels, px * channels + 3),
+ (y * width + px) * 3
+ )
+ }
+ ;[previous, current] = [current, previous]
+ }
+ return { width, height, rgb }
+}
+
+/** Encodes top-down RGB rows as an uncompressed, bottom-up, 24-bit Windows BMP. */
+export function encodeBmp24(width, height, rgb) {
+ if (rgb.length !== width * height * 3) {
+ throw new Error(
+ `Expected ${width * height * 3} RGB bytes for ${width}x${height}, received ${rgb.length}`
+ )
+ }
+ const rowSize = Math.ceil((width * 3) / 4) * 4
+ const pixelBytes = rowSize * height
+ const bmp = Buffer.alloc(BMP_HEADER_SIZE + pixelBytes)
+ bmp.write('BM', 0, 'latin1')
+ bmp.writeUInt32LE(bmp.length, 2)
+ bmp.writeUInt32LE(BMP_HEADER_SIZE, 10)
+ bmp.writeUInt32LE(40, 14) // BITMAPINFOHEADER
+ bmp.writeInt32LE(width, 18)
+ bmp.writeInt32LE(height, 22) // positive height = bottom-up rows
+ bmp.writeUInt16LE(1, 26) // planes
+ bmp.writeUInt16LE(24, 28) // bits per pixel
+ bmp.writeUInt32LE(0, 30) // BI_RGB, no compression
+ bmp.writeUInt32LE(pixelBytes, 34)
+ bmp.writeInt32LE(2835, 38) // 72 dpi
+ bmp.writeInt32LE(2835, 42)
+ for (let y = 0; y < height; y++) {
+ const rowOffset = BMP_HEADER_SIZE + (height - 1 - y) * rowSize
+ for (let x = 0; x < width; x++) {
+ const source = (y * width + x) * 3
+ const target = rowOffset + x * 3
+ bmp[target] = rgb[source + 2]
+ bmp[target + 1] = rgb[source + 1]
+ bmp[target + 2] = rgb[source]
+ }
+ }
+ return bmp
+}
+
+/** Reads the fields of a BMP header that NSIS compatibility depends on. */
+export function readBmpHeader(buffer) {
+ if (
+ buffer.length < BMP_HEADER_SIZE ||
+ buffer.toString('latin1', 0, 2) !== 'BM'
+ ) {
+ throw new Error('Not a BMP file')
+ }
+ return {
+ fileSize: buffer.readUInt32LE(2),
+ pixelOffset: buffer.readUInt32LE(10),
+ width: buffer.readInt32LE(18),
+ height: Math.abs(buffer.readInt32LE(22)),
+ bitsPerPixel: buffer.readUInt16LE(28),
+ compression: buffer.readUInt32LE(30),
+ }
+}
+
+/** Converts available build/installer-*.png sources into NSIS bitmaps. */
+export async function convertInstallerPngs({
+ rootDir = REPOSITORY_ROOT,
+ images = INSTALLER_IMAGES,
+ log = console.log,
+} = {}) {
+ const written = []
+ for (const image of images) {
+ let png
+ try {
+ png = await readFile(path.join(rootDir, image.png))
+ } catch (error) {
+ if (error?.code !== 'ENOENT') throw error
+ log(`${image.png} not found; skipping`)
+ continue
+ }
+ const { width, height, rgb } = decodePng(png)
+ if (width !== image.width || height !== image.height) {
+ throw new Error(
+ `${image.name} is ${width}x${height}, expected ${image.width}x${image.height}`
+ )
+ }
+ const bmp = encodeBmp24(width, height, rgb)
+ const target = path.join(rootDir, image.output)
+ await mkdir(path.dirname(target), { recursive: true })
+ await writeFile(target, bmp)
+ log(
+ `${image.png} -> ${image.output} ${width}x${height} 24-bit BMP ${(bmp.length / 1024).toFixed(0)} KiB`
+ )
+ written.push(target)
+ }
+ return written
+}
+
+const invokedPath = process.argv[1] ? path.resolve(process.argv[1]) : ''
+if (invokedPath === fileURLToPath(import.meta.url)) {
+ await convertInstallerPngs()
+}
diff --git a/src/core/bridge-receiver/pipelines/direct-pipeline.test.ts b/src/core/bridge-receiver/pipelines/direct-pipeline.test.ts
index 2d293177..aa7016b0 100644
--- a/src/core/bridge-receiver/pipelines/direct-pipeline.test.ts
+++ b/src/core/bridge-receiver/pipelines/direct-pipeline.test.ts
@@ -56,10 +56,12 @@ describe('DirectPipeline.dispatch', () => {
uris: ['http://example.com/x.mp4'],
saveDir: '/tmp/save',
filename: 'x.mp4',
- connections: 1,
headers: [{ name: 'X-Custom', value: 'v' }],
})
expect(req).not.toHaveProperty('payload')
+ // Match the manual Add Task path: omitting a per-task override lets aria2
+ // inherit the application's configured split/connection values.
+ expect(req).not.toHaveProperty('connections')
const opts = (createTask.mock.calls[0]?.[2] ?? {}) as Record<
string,
unknown
diff --git a/src/core/bridge-receiver/pipelines/direct-pipeline.ts b/src/core/bridge-receiver/pipelines/direct-pipeline.ts
index bfe60a42..56936555 100644
--- a/src/core/bridge-receiver/pipelines/direct-pipeline.ts
+++ b/src/core/bridge-receiver/pipelines/direct-pipeline.ts
@@ -39,7 +39,8 @@ export class DirectPipeline {
uris: [adapted.primaryUrl],
saveDir: adapted.saveDir,
filename: adapted.finalName,
- connections: 1,
+ // Match manual tasks by leaving the per-task override unset. Aria2 then
+ // inherits the app's global split and per-server connection settings.
headers: Object.entries(adapted.sanitizedHeaders).map(
([name, value]) => ({ name, value })
),
diff --git a/src/main/window/window-manager.test.ts b/src/main/window/window-manager.test.ts
index b8816e03..695f1304 100644
--- a/src/main/window/window-manager.test.ts
+++ b/src/main/window/window-manager.test.ts
@@ -227,14 +227,21 @@ describe('WindowManager', () => {
)
vi.mocked(win.isMaximized).mockReturnValue(false)
- vi.mocked(win.isFullScreen).mockReturnValue(true)
+ // Electron can still report the pre-transition value from inside the
+ // Windows fullscreen event. The event itself must remain authoritative.
+ vi.mocked(win.isFullScreen).mockReturnValue(false)
enterFullScreen?.()
expect(win.webContents.send).toHaveBeenLastCalledWith(
Events.WindowMaximizedChanged,
{ maximized: false, fullscreen: true }
)
+ resized?.()
+ expect(win.webContents.send).toHaveBeenLastCalledWith(
+ Events.WindowMaximizedChanged,
+ { maximized: false, fullscreen: true }
+ )
- vi.mocked(win.isFullScreen).mockReturnValue(false)
+ vi.mocked(win.isFullScreen).mockReturnValue(true)
leaveFullScreen?.()
expect(win.webContents.send).toHaveBeenLastCalledWith(
Events.WindowMaximizedChanged,
@@ -244,6 +251,7 @@ describe('WindowManager', () => {
// macOS can finish a manual resize without sending unmaximize. The final
// geometry event must still reconcile the renderer caption state.
vi.mocked(win.isMaximized).mockReturnValue(false)
+ vi.mocked(win.isFullScreen).mockReturnValue(false)
resized?.()
expect(win.webContents.send).toHaveBeenLastCalledWith(
Events.WindowMaximizedChanged,
diff --git a/src/main/window/window-manager.ts b/src/main/window/window-manager.ts
index d9a0c919..3a75c781 100644
--- a/src/main/window/window-manager.ts
+++ b/src/main/window/window-manager.ts
@@ -510,24 +510,35 @@ export class WindowManager {
}
private setupWindowStateTracking(win: BrowserWindow): void {
+ let fullscreen = win.isFullScreen()
const publish = () => {
if (win.isDestroyed()) return
const payload: WindowMaximizedChangedPayload = {
maximized: win.isMaximized(),
- fullscreen: win.isFullScreen(),
+ fullscreen,
}
win.webContents.send(Events.WindowMaximizedChanged, payload)
}
// did-finish-load supplies the initial snapshot; native state events keep
// custom caption controls correct for title-bar, OS, and fullscreen actions.
+ // Fullscreen events can precede Electron updating isFullScreen() on Windows,
+ // so their event names update the authoritative transition state. Keeping
+ // that state locally also prevents a neighboring resize event from
+ // publishing the same stale native value over the transition.
// Cocoa can leave the maximized state via a manual resize without emitting
// unmaximize, so reconcile once the resize gesture finishes as well.
win.webContents.on('did-finish-load', publish)
win.on('maximize', publish)
win.on('unmaximize', publish)
- win.on('enter-full-screen', publish)
- win.on('leave-full-screen', publish)
+ win.on('enter-full-screen', () => {
+ fullscreen = true
+ publish()
+ })
+ win.on('leave-full-screen', () => {
+ fullscreen = false
+ publish()
+ })
win.on('resized', publish)
}
diff --git a/src/renderer/components/onboarding/disclaimer-step.test.tsx b/src/renderer/components/onboarding/disclaimer-step.test.tsx
index 5b920299..01e9af45 100644
--- a/src/renderer/components/onboarding/disclaimer-step.test.tsx
+++ b/src/renderer/components/onboarding/disclaimer-step.test.tsx
@@ -81,14 +81,24 @@ describe('DisclaimerStep', () => {
]
expect(highlightRoot.textContent).toBe(i18n.t('onboarding.disclaimer.body'))
expect(highlightRoot.style.getPropertyValue('--blur-highlight-color')).toBe(
- 'currentColor'
+ 'var(--onboarding-highlight-color)'
)
+ expect(
+ highlightRoot.style.getPropertyValue('--blur-highlight-text-color')
+ ).toBe('var(--onboarding-highlight-text-color)')
expect(screen.getByTestId('disclaimer-panel')).toHaveClass(
- 'bg-card',
- 'text-card-foreground',
- 'border-border'
+ 'bg-white',
+ 'border-black/14',
+ 'shadow-[0_1px_2px_rgba(0,0,0,0.02)]',
+ 'dark:bg-card',
+ 'dark:text-card-foreground',
+ 'dark:border-border'
+ )
+ expect(screen.getByTestId('disclaimer-panel')).not.toHaveClass('shadow-sm')
+ expect(highlightRoot).toHaveClass(
+ 'text-[#1d1d1f]',
+ 'dark:text-card-foreground'
)
- expect(highlightRoot).toHaveClass('text-card-foreground')
expect(highlightedBits.map((bit) => bit.textContent)).toEqual([
'provides download management only',
'legally authorized',
diff --git a/src/renderer/components/onboarding/disclaimer-step.tsx b/src/renderer/components/onboarding/disclaimer-step.tsx
index d7164acf..9d401921 100644
--- a/src/renderer/components/onboarding/disclaimer-step.tsx
+++ b/src/renderer/components/onboarding/disclaimer-step.tsx
@@ -31,11 +31,11 @@ export function DisclaimerStep() {
}
return (
- <main className="flex min-h-0 flex-1 flex-col px-5 pt-4 pb-5 text-foreground">
+ <main className="flex min-h-0 flex-1 flex-col px-5 pt-4 pb-5 text-[#1d1d1f] dark:text-foreground">
<section
data-testid="disclaimer-panel"
aria-labelledby="disclaimer-title"
- className="min-h-0 flex-1 overflow-y-auto rounded-xl border border-border bg-card px-6 py-6 text-card-foreground shadow-sm"
+ className="min-h-0 flex-1 overflow-y-auto rounded-xl border border-black/14 bg-white px-6 py-6 shadow-[0_1px_2px_rgba(0,0,0,0.02)] dark:border-border dark:bg-card dark:text-card-foreground"
>
<div className="space-y-4">
<h1
@@ -44,7 +44,7 @@ export function DisclaimerStep() {
>
{t('onboarding.disclaimer.title')}
</h1>
- <p className="text-[14px] leading-6 text-card-foreground/80">
+ <p className="text-[14px] leading-6 text-[#3f3f46] dark:text-card-foreground/80">
{t('onboarding.disclaimer.summary')}
</p>
</div>
@@ -56,11 +56,12 @@ export function DisclaimerStep() {
t('onboarding.disclaimer.highlights.authorized'),
t('onboarding.disclaimer.highlights.responsibility'),
]}
- highlightColor="currentColor"
+ highlightColor="var(--onboarding-highlight-color)"
+ highlightTextColor="var(--onboarding-highlight-text-color)"
highlightClassName="font-medium"
viewportOptions={{ once: true, amount: 0.5 }}
className={cn(
- 'mt-6 text-[14px] tracking-[-0.006em] text-card-foreground',
+ 'mt-6 text-[14px] tracking-[-0.006em] text-[#1d1d1f] dark:text-card-foreground',
useCjkSpacing ? 'leading-[2.5]' : 'leading-[1.9]'
)}
>
@@ -69,7 +70,7 @@ export function DisclaimerStep() {
<p
className={cn(
- 'text-[13px] leading-5 text-muted-foreground',
+ 'text-[13px] leading-5 text-[#6e6e73] dark:text-muted-foreground',
useCjkSpacing ? 'mt-8' : 'mt-6'
)}
>
diff --git a/src/renderer/components/onboarding/onboarding-surface.tsx b/src/renderer/components/onboarding/onboarding-surface.tsx
index a78817eb..83c3c970 100644
--- a/src/renderer/components/onboarding/onboarding-surface.tsx
+++ b/src/renderer/components/onboarding/onboarding-surface.tsx
@@ -8,7 +8,7 @@ export function OnboardingSurface({ children }: OnboardingSurfaceProps) {
return (
<div
data-slot="onboarding-surface"
- className="relative isolate flex h-screen min-h-0 flex-col overflow-hidden bg-[#f7f7f8] text-foreground dark:bg-[#161617]"
+ className="relative isolate flex h-screen min-h-0 flex-col overflow-hidden bg-[#f7f7f8] text-[#1d1d1f] dark:bg-[#161617] dark:text-foreground"
>
{children}
</div>
diff --git a/src/renderer/components/ui/blur-highlight.test.tsx b/src/renderer/components/ui/blur-highlight.test.tsx
index a1f9eee3..7a8b36f8 100644
--- a/src/renderer/components/ui/blur-highlight.test.tsx
+++ b/src/renderer/components/ui/blur-highlight.test.tsx
@@ -108,6 +108,7 @@ describe('BlurHighlight', () => {
highlightDelay={0.35}
highlightDuration={0.9}
highlightColor="#000000"
+ highlightTextColor="#f5f5f5"
highlightDirection="right"
>
test motion
@@ -132,6 +133,9 @@ describe('BlurHighlight', () => {
expect(root.style.getPropertyValue('--blur-highlight-color')).toBe(
'#000000'
)
+ expect(root.style.getPropertyValue('--blur-highlight-text-color')).toBe(
+ '#f5f5f5'
+ )
})
it('tracks the viewport and can settle after one reveal', () => {
diff --git a/src/renderer/components/ui/blur-highlight.tsx b/src/renderer/components/ui/blur-highlight.tsx
index 3f0e006a..8791a150 100644
--- a/src/renderer/components/ui/blur-highlight.tsx
+++ b/src/renderer/components/ui/blur-highlight.tsx
@@ -25,6 +25,7 @@ export interface BlurHighlightProps {
children: string
highlightedBits: Array<string | HighlightedBit>
highlightColor?: string
+ highlightTextColor?: string
highlightClassName?: string
blurAmount?: number
inactiveOpacity?: number
@@ -51,6 +52,7 @@ type BlurHighlightStyle = CSSProperties & {
'--blur-highlight-delay': string
'--blur-highlight-duration': string
'--blur-highlight-color': string
+ '--blur-highlight-text-color': string
}
function findOccurrences(source: string, needle: string): number[] {
@@ -119,6 +121,7 @@ export function BlurHighlight({
children,
highlightedBits,
highlightColor = '#171717',
+ highlightTextColor = '#ffffff',
highlightClassName,
blurAmount = 8,
inactiveOpacity = 0.3,
@@ -180,6 +183,7 @@ export function BlurHighlight({
'--blur-highlight-delay': `${highlightDelay}s`,
'--blur-highlight-duration': `${highlightDuration}s`,
'--blur-highlight-color': highlightColor,
+ '--blur-highlight-text-color': highlightTextColor,
}
const content: ReactNode = segments.map((segment) => {
diff --git a/src/renderer/components/ui/toast.test.tsx b/src/renderer/components/ui/toast.test.tsx
index 58f6bf3e..a8daaad7 100644
--- a/src/renderer/components/ui/toast.test.tsx
+++ b/src/renderer/components/ui/toast.test.tsx
@@ -328,7 +328,7 @@ describe('toast', () => {
expect(screen.queryByText('Motrix Extension')).toBeNull()
})
- it('clicking "Don\'t allow" calls onDeny — the only decision affordance left for an extension prompt', async () => {
+ it('clicking “Don’t allow” calls onDeny — the only decision affordance left for an extension prompt', async () => {
render(<Toaster />)
const onDeny = vi.fn()
add({
@@ -338,7 +338,7 @@ describe('toast', () => {
data: { pairRequest: extensionPairRequest({ onDeny }) },
})
await userEvent.click(
- screen.getByRole('button', { name: "Don't allow", hidden: true })
+ screen.getByRole('button', { name: 'Don’t allow', hidden: true })
)
expect(onDeny).toHaveBeenCalledOnce()
})
diff --git a/src/renderer/styles/globals.css b/src/renderer/styles/globals.css
index 61120828..8073927e 100644
--- a/src/renderer/styles/globals.css
+++ b/src/renderer/styles/globals.css
@@ -294,12 +294,20 @@
}
}
-/*
- * The native Liquid Glass view sits behind the onboarding renderer. Keep the
- * legal card opaque for contrast and use one quiet tint across the window.
- */
+[data-slot="onboarding-surface"] {
+ --onboarding-highlight-color: #171717;
+ --onboarding-highlight-text-color: #fff;
+}
+
+.dark [data-slot="onboarding-surface"] {
+ --onboarding-highlight-color: var(--primary);
+ --onboarding-highlight-text-color: var(--primary-foreground);
+}
+
+/* Keep the light onboarding surface opaque so Liquid Glass and the desktop
+ behind it cannot introduce a wallpaper-dependent gray cast. */
.platform-darwin.window-onboarding [data-slot="onboarding-surface"] {
- background-color: rgb(247 247 248 / 72%);
+ background-color: #f7f7f8;
}
.dark.platform-darwin.window-onboarding [data-slot="onboarding-surface"] {
@@ -307,10 +315,6 @@
}
@media (prefers-reduced-transparency: reduce) {
- .platform-darwin.window-onboarding [data-slot="onboarding-surface"] {
- background-color: #f7f7f8;
- }
-
.dark.platform-darwin.window-onboarding [data-slot="onboarding-surface"] {
background-color: #161617;
}
@@ -528,7 +532,11 @@ body.is-dashboard-resizing * {
.blur-highlight[data-highlight-direction="left"] .blur-highlight-bit {
background-image:
- linear-gradient(to right, white 0 50%, currentColor 50% 100%),
+ linear-gradient(
+ to right,
+ var(--blur-highlight-text-color) 0 50%,
+ currentColor 50% 100%
+ ),
linear-gradient(var(--blur-highlight-color), var(--blur-highlight-color));
background-position:
100% center,
@@ -550,7 +558,11 @@ body.is-dashboard-resizing * {
.blur-highlight[data-highlight-direction="right"] .blur-highlight-bit {
background-image:
- linear-gradient(to right, currentColor 0 50%, white 50% 100%),
+ linear-gradient(
+ to right,
+ currentColor 0 50%,
+ var(--blur-highlight-text-color) 50% 100%
+ ),
linear-gradient(var(--blur-highlight-color), var(--blur-highlight-color));
background-position:
0% center,
@@ -572,7 +584,11 @@ body.is-dashboard-resizing * {
.blur-highlight[data-highlight-direction="top"] .blur-highlight-bit {
background-image:
- linear-gradient(to bottom, white 0 50%, currentColor 50% 100%),
+ linear-gradient(
+ to bottom,
+ var(--blur-highlight-text-color) 0 50%,
+ currentColor 50% 100%
+ ),
linear-gradient(var(--blur-highlight-color), var(--blur-highlight-color));
background-position:
center 100%,
@@ -594,7 +610,11 @@ body.is-dashboard-resizing * {
.blur-highlight[data-highlight-direction="bottom"] .blur-highlight-bit {
background-image:
- linear-gradient(to bottom, currentColor 0 50%, white 50% 100%),
+ linear-gradient(
+ to bottom,
+ currentColor 0 50%,
+ var(--blur-highlight-text-color) 50% 100%
+ ),
linear-gradient(var(--blur-highlight-color), var(--blur-highlight-color));
background-position:
center 0%,
diff --git a/src/renderer/windows/onboarding-window.test.tsx b/src/renderer/windows/onboarding-window.test.tsx
index 519eb315..bc6c6d40 100644
--- a/src/renderer/windows/onboarding-window.test.tsx
+++ b/src/renderer/windows/onboarding-window.test.tsx
@@ -37,7 +37,8 @@ describe('OnboardingWindow', () => {
expect(surface).toHaveClass(
'bg-[#f7f7f8]',
'dark:bg-[#161617]',
- 'text-foreground'
+ 'text-[#1d1d1f]',
+ 'dark:text-foreground'
)
expect(surface.style.colorScheme).toBe('')
})