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
16 changes: 14 additions & 2 deletions apps/deepviewer-adapter/client/DeepViewerMascot.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
import css from './welcome.module.css'

/** Keep the original DeepViewer mark in the native conversation hero slot. */
/** Original v0.3.3 / Build 75 idle mark; the cursor owns the only animation. */
export function DeepViewerMascot() {
return <span className={css.brandLogo} aria-hidden="true" data-deepviewer-brand-mark="" />
return (
<svg
className={css.brandLogo}
viewBox="0 0 150.374 160"
fill="none"
aria-hidden="true"
focusable="false"
data-deepviewer-brand-mark=""
>
<path d="M91.9327 158.96C92.9579 158.309 94.8281 157.026 96.0709 156.095C109.722 142.78 115.46 134.199 120.215 127.204C124.97 120.21 125.6 118.573 128.006 111.021C130.412 103.468 131.363 91.9502 130.554 80.573C129.863 71.4737 128.344 65.0488 124.287 54.3583C121.483 46.9954 122.099 44.2463 127.542 39.7068C132.178 35.8496 137.433 34.165 145.49 33.9906C147.807 33.9239 149.925 33.6957 150.173 33.5097C150.472 33.2865 150.447 32.5293 150.031 31.4056C149.25 29.121 146.865 27.4933 141.214 25.4412C137.295 23.9923 135.699 23.6747 120.873 21.548C98.2865 18.308 80.0252 4.20556 57.7065 1.00401C49.5266 -0.125034 41.7438 -0.310407 34.3518 0.491333C27.8171 1.19436 24.7918 1.86879 15.8895 4.84799C11.0119 6.45611 -1.80472 11.277 0.21378 18.4473C0.948687 21.0579 2.25449 24.3056 6.71544 29.3595C10.9494 34.1563 17.2946 37.7597 20.9865 42.3458C22.4888 44.246 23.9082 45.4569 23.2965 51.8865C22.6848 58.3161 22.8576 60.8237 24.2967 65.0203C25.3511 68.1864 25.6802 68.3666 29.0222 67.9593C34.6252 67.2556 40.0197 60.8914 41.0417 53.7669C41.2847 52.0727 41.304 50.7011 41.0866 50.6699C40.2605 50.5514 22.9485 38.8463 17.7886 34.9139C9.22611 28.4097 5.8868 24.0177 5.58999 21.1376C5.30549 18.481 6.23151 16.4972 14.281 17.6076C20.241 18.4047 30.0655 22.4652 35.7443 24.8096C37.2534 25.4251 39.489 26.5439 40.6688 27.2895C42.5379 28.4886 42.8359 28.886 42.9035 30.2702C42.9093 31.1577 42.5981 32.7091 42.1814 33.7578C41.0248 36.5623 40.9745 37.8408 41.8545 42.2233C43.4285 50.1191 46.475 57.3395 50.9381 63.6546C56.4253 71.4911 61.4295 76.1992 64.6468 76.6607C66.653 76.9041 67.5104 76.4951 68.9337 74.6155C70.4689 72.5746 71.6471 63.4331 71.3647 56.1216C71.3014 54.4344 70.4079 47.9259 73.7954 48.4118C77.183 48.8978 78.9698 51.0499 82.7634 54.6089C84.7626 56.4474 88.7673 60.081 91.673 62.7146C97.2175 67.6775 101.476 72.9436 102.177 75.7929C102.753 77.9594 102.089 78.2631 97.834 77.6084C94.8838 77.1409 93.4492 76.6248 89.183 74.5054C66.6448 63.0525 86.2669 79.5174 93.5439 86.7912C103.397 96.6726 106.637 100.684 108.225 105.08C109.175 107.743 109.243 108.506 108.862 111.156C108.509 113.377 106.997 120.268 104.522 120.997C102.048 121.726 88.7727 115.01 84.2092 114.747C80.9048 114.583 80.4513 114.651 80.2087 115.414C79.6891 117.049 88.6756 130.717 89.3181 131.407C89.9605 132.098 90.056 132.448 92.2534 132.597C94.4508 132.747 95.1626 132.642 92.9629 134.147C90.7632 135.652 87.4478 159.735 89.2551 159.995C89.6899 160.057 90.8703 159.561 91.9327 158.96Z" fill="currentColor" />
<path className={css.brandCursor} data-deepviewer-brand-cursor="" d="M35.539 151.04C35.539 151.953 34.7989 152.693 33.886 152.693H4.13251C3.2196 152.693 2.47954 151.953 2.47954 151.04V146.908C2.47954 145.995 3.2196 145.255 4.13251 145.255H33.886C34.7989 145.255 35.539 145.995 35.539 146.908V151.04Z" fill="currentColor" />
</svg>
)
}
2 changes: 1 addition & 1 deletion apps/deepviewer-adapter/client/build-info.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// The staging pipeline stamps its copy from the product manifest for each build.
export const buildInfo = { version: '0.5.0', build: 'development', kernel: '0.2.0-rc.2' }
export const buildInfo = { version: '0.5.1', build: 'development', kernel: '0.2.0-rc.2' }
59 changes: 52 additions & 7 deletions apps/deepviewer-adapter/client/welcome.module.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,63 @@
.brandLogo {
display: block;
width: 106px;
height: 112px;
width: auto;
height: 48px;
flex: none;
overflow: visible;
color: var(--dsw-alias-label-primary);
background-color: currentColor;
mask: url('/assets/deepviewer/deepviewer-loading-logo.svg') center / contain no-repeat;
opacity: 0.5;
user-select: none;
}
:global([data-deepviewer-hero]) { padding: 0 20px 30px; }
:global([data-deepviewer-headline]) { flex-direction: column; align-items: center; gap: 20px; }

.brandCursor {
animation: deepviewer-hero-cursor-blink 1s steps(1, jump-end) infinite;
}

/* v0.3.3 welcome geometry: the mark/title fill the space above the resident
bottom composer. Its 40px prelude is the workspace row plus its card gap. */
:global([data-deepviewer-hero]) {
position: relative;
inset: auto;
flex: 1 1 auto;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
height: auto;
min-width: 0;
min-height: 0;
padding: 40px 24px 0;
pointer-events: none;
}
:global([data-deepviewer-hero] > div) { gap: 0; }
:global([data-deepviewer-headline]) { flex-direction: column; align-items: center; gap: 40px; }
:global([data-deepviewer-headline] > span:first-child) { width: auto; height: auto; }
:global([data-deepviewer-hero-title]) { font-family: var(--deepviewer-font-smiley); font-weight: 400; font-size: clamp(24px, 3vw, 30px); font-synthesis: none; }
:global([data-deepviewer-hero-title]) {
color: var(--dsw-alias-label-primary);
font-family: var(--dsw-font-family);
font-size: 24px;
font-weight: 400;
line-height: 32px;
opacity: 0.5;
text-align: center;
}
:global([data-deepviewer-hero-title] > span:nth-child(2)) { display: none; }
:global(body [data-conversation-content][data-content-phase='hero'] > [data-conversation-scroll]) {
position: relative;
justify-content: flex-start;
}
:global([data-conversation-content][data-content-phase='hero'] > [data-conversation-scroll] > [data-deepviewer-composer-seat]) {
margin-top: auto;
}

@keyframes deepviewer-hero-cursor-blink {
0%, 49% { opacity: 1; }
50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
.brandCursor { animation: none; }
}
.brandName { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.brandMark { display: block; width: 24px; height: 24px; border-radius: 6px; }
.about { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
Expand Down
6 changes: 3 additions & 3 deletions apps/deepviewer-adapter/compatibility/branding-contracts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ export const brandingContracts = [
"id": "desktop-icon",
"file": "apps/desktop/src/main.ts",
"before": "const applicationIconPath = development ? join(app.getAppPath(), 'resources', 'icon-windows.png')",
"previousAfter": "const applicationIconPath = development ? join(app.getAppPath(), '.desktop', 'native-icon', 'icon-light.png')",
"after": "const applicationIconPath = development ? join(app.getAppPath(), '.desktop', 'native-icon', 'DeepViewerDockThemes', 'light.png')",
"reason": "Use the product icon for the native About panel."
"previousAfter": "const applicationIconPath = development ? join(app.getAppPath(), '.desktop', 'native-icon', 'DeepViewerDockThemes', 'light.png')",
"after": "const applicationIconPath = development ? join(app.getAppPath(), '.desktop', 'native-icon', 'icon.png')",
"reason": "Use Apple's compiled legacy rendition for the native About panel without overriding the Dock catalog."
},
{
"id": "isolated-command-management",
Expand Down
14 changes: 13 additions & 1 deletion apps/deepviewer-adapter/compatibility/contracts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,19 @@ export const contracts = [
{
id: 'hero-title-style-anchor', file: 'packages/client/ui-conversation/src/client/skeleton/EmptyHero.tsx',
before: '<span className={css.titleGroup}>', after: '<span className={css.titleGroup} data-deepviewer-hero-title="">',
reason: 'Apply the installed welcome font and suppress the upstream product badge.',
reason: 'Restore released welcome typography and suppress the upstream product badge.',
},
{
id: 'hero-independent-of-composer', file: 'packages/client/ui-conversation/src/client/skeleton/ConversationContent.tsx',
before: ' {hero && <HeroShell t={t} renderSlot={renderSlot} />}\n {hero && heroWorkspaceRow}',
after: ' {hero && heroWorkspaceRow}',
reason: 'Restore the released idle area above the bottom composer without remounting its native input or replacing its slots.',
},
{
id: 'hero-scroll-body-seat', file: 'packages/client/ui-conversation/src/client/skeleton/ConversationContent.tsx',
before: ' <div className={css.scrollBody} data-conversation-scroll="">\n {sessionId === undefined ? null : <Views />}',
after: ' <div className={css.scrollBody} data-conversation-scroll="">\n {hero && <HeroShell t={t} renderSlot={renderSlot} />}\n {sessionId === undefined ? null : <Views />}',
reason: 'Let the idle mark and headline flex-center separately while the resident composer occupies the viewport floor.',
},
{
id: 'stats-header-slot', file: 'packages/client/ui-chat/src/client/apply.ts',
Expand Down
10 changes: 3 additions & 7 deletions apps/deepviewer-adapter/desktop/bootstrap.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { configureRuntimeNetwork } from './network/runtime-network.ts'
import { app, nativeImage, nativeTheme, session, dialog } from 'electron'
import { app, session, dialog } from 'electron'
import { join } from 'node:path'
import { readFileSync } from 'node:fs'
import { configureDevelopmentProfile, resolveInstalledUserDataPath, developmentUserDataOverride } from './profile/development-profile.js'
import { migrateDeepViewerProfile, migrateDeepViewerFileNames } from './profile/profile-migration.js'
import { prepareUserData } from './profile/user-data-migration.js'
import { followDockTheme } from './profile/dock-theme.js'
import { prepareDesktopProfile } from '../migrations/desktop-profile.ts'
import { prepareWebState } from '../migrations/web-state.ts'
import { prepareKernelSnapshot } from '../migrations/kernel-snapshot.ts'
Expand Down Expand Up @@ -62,10 +61,7 @@ export function initializeDeepViewer(): boolean {
return Object.fromEntries(Object.entries(spec.env).filter(([key]) => key.startsWith('DEEPVIEWER_') || ['HTTP_PROXY', 'HTTPS_PROXY', 'http_proxy', 'https_proxy'].includes(key)))
})
;(globalThis as typeof globalThis & { __DEEPVIEWER_HOST_ENVIRONMENT__?: Promise<NodeJS.ProcessEnv> }).__DEEPVIEWER_HOST_ENVIRONMENT__ = hostEnvironment
void app.whenReady().then(() => {
if (!app.dock) return
const dispose = followDockTheme({ theme: nativeTheme, resourcesPath: app.isPackaged ? process.resourcesPath : join(appRoot, '.desktop', 'native-icon'), loadImage: nativeImage.createFromPath, setIcon: image => app.dock?.setIcon(image), log: message => console.info('[DeepViewer icon]', message), onError: message => console.error('[DeepViewer icon]', message) })
app.once('will-quit', dispose)
})
// macOS selects the compiled bundle icon and its system appearance. A
// runtime PNG override would replace that catalog with full-bleed artwork.
return true
}
41 changes: 0 additions & 41 deletions apps/deepviewer-adapter/desktop/profile/dock-theme.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/deepviewer-adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deepviewer/adapter",
"version": "0.5.0",
"version": "0.5.1",
"private": true,
"type": "module",
"license": "MIT",
Expand Down
11 changes: 8 additions & 3 deletions apps/deepviewer-adapter/presentation/smoke-renderer.js.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@
const hero = heroMark.closest('[data-deepviewer-hero]');
if (!hero || !/让我们做点什么|What shall we build\?/.test(hero.textContent) || hero.querySelector('canvas')) throw new Error('DeepViewer welcome branding is missing');
const markStyle = getComputedStyle(heroMark);
if (!markStyle.maskImage.includes('/assets/deepviewer/deepviewer-loading-logo.svg') || heroMark.getBoundingClientRect().height < 100) throw new Error('Original DeepViewer mark is not rendered');
const markResponse = await fetch('/assets/deepviewer/deepviewer-loading-logo.svg');
if (!markResponse.ok || !(await markResponse.text()).includes('viewBox="0 0 150.374 160"')) throw new Error('Original DeepViewer mark asset is missing');
if (heroMark.localName !== 'svg' || heroMark.getAttribute('viewBox') !== '0 0 150.374 160' || heroMark.querySelectorAll('path').length !== 2 || Math.abs(heroMark.getBoundingClientRect().height - 48) > 0.1 || markStyle.opacity !== '0.5') throw new Error('Released DeepViewer idle mark geometry is not rendered');
const cursor = heroMark.querySelector('[data-deepviewer-brand-cursor]');
const cursorStyle = getComputedStyle(cursor);
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches ? cursorStyle.animationName !== 'none' : (!cursorStyle.animationName.includes('deepviewer-hero-cursor-blink') || cursorStyle.animationDuration !== '1s' || !(cursorStyle.animationTimingFunction === 'step-end' || cursorStyle.animationTimingFunction.startsWith('steps(1')))) throw new Error('Released DeepViewer idle cursor animation is missing');
const titleStyle = getComputedStyle(hero.querySelector('[data-deepviewer-hero-title]'));
if (titleStyle.fontSize !== '24px' || titleStyle.lineHeight !== '32px' || titleStyle.opacity !== '0.5' || getComputedStyle(hero.querySelector('[data-deepviewer-headline]')).gap !== '40px') throw new Error('Released DeepViewer idle text spacing is missing');
const scrollBody = hero.parentElement, composerSeat = scrollBody.querySelector(':scope > [data-deepviewer-composer-seat]');
if (!composerSeat || composerSeat.contains(hero) || scrollBody.getBoundingClientRect().bottom - composerSeat.getBoundingClientRect().bottom > 1) throw new Error('Idle hero is not separate from the bottom resident composer');
// Synthetic status checks live content-size variables without running a model.
const probe = document.createElement('div'); probe.setAttribute('data-chat-running', '');
const normal = document.createElement('span'); normal.style.color = 'var(--dsw-alias-label-secondary)';
Expand Down
32 changes: 32 additions & 0 deletions apps/deepviewer-adapter/tests/idle-presentation.spec.tsx.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Appended to the native skeleton suite so its genuine owner/store/input
// fixtures exercise the presentation seam, without launching the desktop app.
describe('DeepViewer released idle posture', () => {
it.each(['sessionless', 'blank'])('keeps the %s idle hero outside the resident composer', mode => {
const b = mount(sessionSnapshotOf({ blank: true }), undefined, undefined, {
sessionId: mode === 'sessionless' ? undefined : SID,
})
const host = b.view.container.querySelector('[data-conversation-scroll]')
const hero = b.view.container.querySelector('[data-deepviewer-hero]')
const seat = b.view.container.querySelector('[data-composer-seat]')
const input = b.view.getByRole('textbox')
expect(host).not.toBeNull()
expect(hero).not.toBeNull()
expect(seat).not.toBeNull()
expect(hero?.parentElement).toBe(host)
expect(seat?.parentElement).toBe(host)
expect(seat?.contains(hero)).toBe(false)
expect(seat?.contains(input)).toBe(true)
expect(host?.querySelectorAll('[data-deepviewer-hero]')).toHaveLength(1)
if (!hero || !seat) throw new Error('Released idle posture is missing')
expect(hero.compareDocumentPosition(seat) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy()
if (mode === 'blank') {
act(() => { b.wiring.setDraft('keep the resident draft') })
b.session.set(sessionSnapshotOf({ blank: false }))
b.rerender()
expect(b.view.container.querySelector('[data-deepviewer-hero]')).toBeNull()
expect(b.view.container.querySelector('[data-composer-seat]')).toBe(seat)
expect(b.view.getByRole('textbox')).toBe(input)
expect(b.wiring.snapshot.draft).toBe('keep the resident draft')
}
})
})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions apps/deepviewer-desktop/assets/DeepViewer.icon/icon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"fill-specializations": [
{ "value": { "solid": "extended-gray:1.00000,1.00000" } }
],
"groups": [
{
"layers": [
{
"image-name": "Whale.svg",
"name": "DeepViewer Whale",
"fill-specializations": [
{ "value": { "solid": "extended-gray:0.14000,1.00000" } }
],
"position": {
"scale": 4.375,
"translation-in-points": [47, 2]
}
}
],
"shadow": { "kind": "neutral", "opacity": 0.5 },
"translucency": { "enabled": false, "value": 0 }
}
],
"supported-platforms": { "squares": "shared" }
}
Loading
Loading