A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.
Let the whale jump onto the Main Bot as the team window takes over
AdamPlatin123aa175679378a
diff --git a/app/src/main.mjs b/app/src/main.mjsindex eb35827b..b0e3196a 100644--- a/app/src/main.mjs+++ b/app/src/main.mjs@@ -530,7 +530,7 @@ function handleIpc() {// A throwaway run (DS_BOT_HOME) keeps its folders where it was told.const fixed = Boolean(process.env.DS_BOT_HOME)// The team view has mounted (ds-bot calls dsBotApp.ready()): the start window hands over.- ipcMain.on(IPC.ready, (event) => { if (fromWindow(event)) startWindow.ready() })+ ipcMain.on(IPC.ready, (event, report) => { if (fromWindow(event)) startWindow.ready(report) })// The start window takes the app's theme and the Bot animation tier at the next start, before// the team view has loaded; Mica and the caption buttons follow the theme at once.ipcMain.on(IPC.nativeTheme, (event, source) => {diff --git a/app/src/preload.cjs b/app/src/preload.cjsindex 28a7e7ec..5495994d 100644--- a/app/src/preload.cjs+++ b/app/src/preload.cjs@@ -14,11 +14,12 @@ if (startPage !== undefined) {} else if (host !== undefined && location.origin === host) {let ready = falsecontextBridge.exposeInMainWorld('dsBotApp', {- // The team view has mounted: the start window hands over to this one.- ready: () => {+ // The team view has mounted: the start window hands over to this one. With it, where the+ // Main Bot's avatar is drawn, for the start window's whale to land on (start-window §8).+ ready: (place) => {if (ready) returnready = true- ipcRenderer.send('ds-bot:ready')+ ipcRenderer.send('ds-bot:ready', placeOf(place))},// DS Bot's settings show and move the app's data location through this.dataLocation: () => ipcRenderer.invoke('ds-bot:data-location'),@@ -30,6 +31,17 @@ if (startPage !== undefined) {// The app's own updater, for the About row's state and buttons.updates: updatesBridge(),})+ // Only plain numbers cross; the main process checks that they make a box inside the page.+ const placeOf = (value) => {+ if (value === null || typeof value !== 'object') return undefined+ const place = {}+ for (const key of ['x', 'y', 'width', 'height', 'viewportWidth', 'viewportHeight']) {+ const number = Number(value[key])+ if (!Number.isFinite(number)) return undefined+ place[key] = number+ }+ return place+ }// A preload runs before the document root exists.const loaded = (run) => {if (document.readyState === 'loading') window.addEventListener('DOMContentLoaded', run, { once: true })diff --git a/app/src/start-window.mjs b/app/src/start-window.mjsindex dde83390..8527e7e9 100644--- a/app/src/start-window.mjs+++ b/app/src/start-window.mjs@@ -127,6 +127,26 @@ export function rectAt(from, to, progress) {return { x: at('x'), y: at('y'), width: at('width'), height: at('height') }}+/**+ * Where the start page's whale lands at the hand-off (start-window §8): the Main Bot's avatar as+ * the team view reported it, in CSS px of that page, turned into DIP and then into the start+ * page's own coordinates once the start window has grown onto the team window's rect. The team+ * page may be zoomed, so its viewport's width gives the scale. Undefined unless the report is a+ * plausible box inside the team view.+ * @param {unknown} report { x, y, width, height, viewportWidth, viewportHeight }+ * @param {{ team: { x: number, y: number, width: number }, start: { x: number, y: number } }} content+ * the team window's content rect, and the start window's content origin once it has grown+ */+export function landingOf(report, { team, start }) {+ if (report === null || typeof report !== 'object') return undefined+ const [x, y, width, height, viewportWidth, viewportHeight] = ['x', 'y', 'width', 'height', 'viewportWidth', 'viewportHeight'].map(key => Number(report[key]))+ if (![x, y, width, height, viewportWidth, viewportHeight].every(Number.isFinite) || viewportWidth <= 0 || viewportHeight <= 0) return undefined+ if (width < 16 || height < 16 || x < 0 || y < 0 || x + width > viewportWidth || y + height > viewportHeight) return undefined+ const scale = team.width / viewportWidth+ const round = value => Math.round(value * 2) / 2+ return { x: round(team.x + x * scale - start.x), y: round(team.y + y * scale - start.y), size: round(((width + height) / 2) * scale) }+}+/** The rects of the growth, one per step; the last one is the target at the full duration. */export function growthSteps(from, to, { duration, step } = GROWTH) {const steps = []@@ -215,6 +235,7 @@ export function startSnapshot(state, now) {if (state.place !== undefined) snapshot.place = { ...state.place }if (state.card !== undefined) snapshot.card = { ...state.card }if (state.failure !== undefined) snapshot.failure = { reason: state.failure.reason, log: [...state.failure.log] }+ if (state.landing !== undefined) snapshot.landing = { ...state.landing }return snapshot}@@ -246,6 +267,8 @@ export class StartWindow {// What a dialog of the window (the folder picker) or a card keeps waiting: the hand-off, which// would take the window and the dialog's owner away, and the 20 s check's verdict.#readyHeld = false+ // The Main Bot avatar's place that came with ready(), kept while the hand-off is held.+ #readyReport#heldAt = 0#viewLate = false#teamShown@@ -435,7 +458,7 @@ export class StartWindow {if (this.#readyHeld) {this.#readyHeld = falsenote(`the hand-off waited ${String(Date.now() - this.#heldAt)} ms for the answer`)- this.ready()+ this.ready(this.#readyReport)} else if (this.#viewLate) {this.#viewLate = falsethis.#teamViewLate()@@ -445,6 +468,7 @@ export class StartWindow {#holdsOff() {if (this.#readyHeld) note(`the held hand-off is dropped after ${String(Date.now() - this.#heldAt)} ms: the start goes on elsewhere`)this.#readyHeld = false+ this.#readyReport = undefinedthis.#viewLate = false}@@ -479,9 +503,10 @@ export class StartWindow {* a card is up (the folder picker, 「会放在…」), it waits: the hand-off would take the window,* and with it the dialog's owner, away while the user is still choosing where the data goes.*/- ready() {+ ready(report) {if (!this.#open() || !['boot', 'card', 'viewFailed'].includes(this.#state.view) || !this.#engineUp) returnthis.#clear('teamView')+ this.#readyReport = reportif (this.#asks > 0 || this.#state.view === 'card') {if (!this.#readyHeld) {note('the team view is ready; the hand-off waits for the answer')@@ -496,7 +521,7 @@ export class StartWindow {this.#readyAt = now// A team view that loads after its 20 s goes in without a celebration (§7).const celebrate = this.#state.celebrate && this.#state.view !== 'viewFailed'- this.#update({ view: 'handoff', done: [...PHASES], celebrate, failure: undefined })+ this.#update({ view: 'handoff', done: [...PHASES], celebrate, failure: undefined, landing: this.#landing(report) })this.#later('fallback', fallbackMs(this.#state), () => {note('the page did not send handoffShow')this.#handoffShow({ grow: false })@@ -534,6 +559,31 @@ export class StartWindow {return mainRect(start, screen.getDisplayMatching(start).workArea)}+ // The whale's landing for this hand-off: the team window goes on its rect now (handoffShow+ // places it again, in case the start window is dragged meanwhile), and the start window's frame+ // offset carries over to the rect it grows to. The team page measured itself at the size the+ // window had before that. The landing is optional: anything odd, and the whale dives. A+ // minimized start window does not grow, and its bounds would not say where it is.+ #landing(report) {+ const main = this.#o.mainWindow()+ if (main === undefined || main.isDestroyed() || this.#window.isMinimized()) return undefined+ if (report === undefined) { note('no place to land: the whale dives'); return undefined }+ try {+ const measured = main.getContentBounds()+ const rect = this.placeMain(main)+ const team = main.getContentBounds()+ const outer = this.#window.getBounds()+ const inner = this.#window.getContentBounds()+ const landing = landingOf(report, { team: { x: team.x, y: team.y, width: measured.width }, start: { x: rect.x + inner.x - outer.x, y: rect.y + inner.y - outer.y } })+ const inside = landing !== undefined && landing.x >= 0 && landing.y >= 0 && landing.x + landing.size <= rect.width && landing.y + landing.size <= rect.height+ note(inside ? `the whale lands at ${String(landing.x)}, ${String(landing.y)} (${String(landing.size)} px)` : 'no place to land: the whale dives')+ return inside ? landing : undefined+ } catch (error) {+ note(`no place to land (${error instanceof Error ? error.message : String(error)}): the whale dives`)+ return undefined+ }+ }+/*** Puts the hidden team window on its rect, also when made with it: the size it was made with* can be off by a few pixels (see open()), the one set afterwards is exact.diff --git a/app/src/start/start.css b/app/src/start/start.cssindex 36f73c46..b1441b2f 100644--- a/app/src/start/start.css+++ b/app/src/start/start.css@@ -23,7 +23,7 @@[hidden]{display:none!important}html,body{margin:0;height:100%;background:transparent}-/* The stage hangs 80 px below the window until a card needs the sheet; body clips it rather+/* The stage hangs 45 px below the window until a card needs the sheet; body clips it ratherthan scrolls, so no focus, scroll anchoring or restored scroll position can shift the page. */html{overflow:hidden}html[data-frame=system]{background:var(--bt-main)}@@ -38,9 +38,9 @@ html[data-frame=system] .band{display:none}/* stage: everything that moves when a card needs the sheet */.stage{position:absolute;left:calc(50% - 360px);top:0;width:720px;height:100%}html[data-frame=system] .stage{top:-24px}-/* Until a card needs the sheet, the whale, its ring and its line sit 80 px lower, at the- window's visual centre (an integer translation, so the text stays on whole pixels). */-html:not([data-up]) .stage{translate:0 80px}+/* Until a card needs the sheet, the whale, its ring and its line sit 45 px lower, a little above+ the window's visual centre (an integer translation, so the text stays on whole pixels). */+html:not([data-up]) .stage{translate:0 45px}/* The whale's line: one centred line under the ring, the only voice on the page, and only whenthe user is needed. Every line of text rests on whole pixels (integer translations only) andnever wraps (the copy is written to fit; the ellipsis is a last resort). When a card needs the@@ -59,6 +59,9 @@ html[data-up] .voice{translate:0 -108px}html[data-up] .pond{translate:0 -60px;scale:.62}.lane{position:absolute;left:48px;top:102px;width:624px;height:140px;overflow:clip;pointer-events:none}.whale-x{position:absolute;left:256px;top:43px;width:112px;height:112px}+/* The whale's flight to the Main Bot at the hand-off (whale.js leap): window-wide and above the+ stage, so neither the lane's clip at the waterline nor the stage holds it. */+.flight{position:fixed;inset:0;overflow:visible;pointer-events:none}.whale-gaze,.whale,.whale-move,.whale-loop{width:100%;height:100%}/* .whale-gaze scales only for the breath at rest (whale.js), around the same pivot. */.whale-gaze,.whale,.whale-move,.whale-loop{transform-origin:49.95% 79%}diff --git a/app/src/start/start.html b/app/src/start/start.htmlindex 753201f2..50f6717d 100644--- a/app/src/start/start.html+++ b/app/src/start/start.html@@ -48,6 +48,7 @@</div></section></main>+<div class="flight" aria-hidden="true"></div><footer class="footrow"><span class="note" data-t="foot.community"></span><p class="place" hidden><span class="place-text"></span><span aria-hidden="true">·</span><button class="btn" data-look="link" data-act="pick" data-detail="changePlace" data-t="btn.changePlace"></button></p></footer><p class="sr live" aria-live="polite"></p></body>diff --git a/app/src/start/start.js b/app/src/start/start.jsindex ecf3397e..d5d02c0a 100644--- a/app/src/start/start.js+++ b/app/src/start/start.js@@ -232,7 +232,7 @@ function shift(up, jump) {for (const a of [...stage.getAnimations(), ...pond.getAnimations(), ...rises(voiceEl)]) a.cancel()root.toggleAttribute('data-up', up)if (jump || reduced()) return- play(stage, [{ translate: from }, { translate: up ? '0px 0px' : '0px 80px' }], { ...spring('shape'), fill: 'none' })+ play(stage, [{ translate: from }, { translate: up ? '0px 0px' : '0px 45px' }], { ...spring('shape'), fill: 'none' })play(pond, [pondFrom, { scale: up ? '.62' : '1', translate: up ? '0px -60px' : '0px 0px' }], { ...spring('shape'), fill: 'none' })play(voiceEl, [{ translate: voiceFrom }, { translate: up ? '0px -108px' : '0px 0px' }], { ...spring('shape'), fill: 'none' })}diff --git a/app/src/start/whale.js b/app/src/start/whale.jsindex 8fdff572..b395ee2e 100644--- a/app/src/start/whale.js+++ b/app/src/start/whale.js@@ -709,17 +709,18 @@ export function createDirector({ start, resume, act, label, announce, onCheck, oif (reduced()) return stillHandoff(at)release(pose, { duration: 200, easing: 'ease-out' })if (want.celebrate) return spoutHandoff(at)- // A beat for the ring to close, then the dive: handoffShow at 220 ms.+ // A beat for the ring to close, then the dive or the jump: handoffShow at 220 ms.await at(100)root.dataset.exit = 'caption all'- dive(12, DEEP(), 18, spring('tap'))+ const flight = want.landing ? leap(want.landing, 220 + SHOWN_AFTER - LAND_EARLY - 100) : 0+ if (!flight) dive(12, DEEP(), 18, spring('tap'))await at(220)act('handoffShow')- await at(390)+ await at(flight ? 100 + flight : 390)act('handoffDone')}// A celebrating hand-off (a first start, or the first success after a failure) spouts as the- // ring closes and dives once the column has opened: handoffShow at 720 ms.+ // ring closes and jumps (or dives) once the column has opened: handoffShow at 720 ms.async function spoutHandoff(at) {drop(body)play(body, kf([{ scale: '1' }, { scale: '1.12 .88', offset: 240 / 460 }, { scale: '.93 1.09' }], OUT), { duration: 460 })@@ -729,12 +730,13 @@ export function createDirector({ start, resume, act, label, announce, onCheck, oroot.dataset.exit = 'caption'await at(560)root.dataset.exit = 'caption all'- dive(18, DEEP(), 24, spring('shape'))+ const flight = want.landing ? leap(want.landing, 720 + SHOWN_AFTER - LAND_EARLY - 560) : 0+ if (!flight) dive(18, DEEP(), 24, spring('shape'))await at(660)- sendRipple()+ if (!flight) sendRipple()await at(720)act('handoffShow')- await at(980)+ await at(flight ? 560 + flight : 980)act('handoffDone')}// Reduced motion: the arcs' .12 s fill and the closed ring are seen before the content fades;@@ -748,6 +750,51 @@ export function createDirector({ start, resume, act, label, announce, onCheck, oawait at(440)act('handoffDone')}+ // The jump to the Main Bot (start-window §8). The team view said where the Main Bot's avatar is+ // drawn, and the main process turned that into this page's coordinates once the window has+ // grown onto the team window's rect. The whale leaves the lane (its clip would cut it at the+ // waterline) for the window-wide .flight layer, rises out of the water and glides down onto the+ // avatar, shrinking to its size, so that it lands as the team window shows: the window grows+ // from handoffShow + 160 ms for 300 ms (GROWTH in start-window.mjs), and the team window shows+ // when it is done. Returns how long the flight takes.+ function leap(landing, ms) {+ // It arrives as the avatar sits: upright, unstretched (the celebration's squash, a failure's+ // pose before a late or held hand-off) and looking ahead.+ const settleIn = { duration: Math.round(ms * 0.4), easing: OUT }+ to(body, { scale: '1' }, settleIn)+ to(move, { transform: 'none' }, settleIn)+ setBase(0, 0)+ const box = x.getBoundingClientRect()+ const flight = $('.flight')+ for (const a of scripted(x)) a.cancel()+ flight.append(x)+ x.style.left = `${box.left}px`+ x.style.top = `${box.top}px`+ x.style.transformOrigin = '0 0'+ // The pond may still be shrunk for a card that has just gone: start at the size it shows.+ const from = box.width / x.offsetWidth+ const scale = landing.size / x.offsetWidth+ const dx = landing.x - box.left+ const dy = landing.y - box.top+ // Up first, then over: the high point is above both ends.+ const rise = `translate(${(dx * 0.22).toFixed(1)}px, ${(Math.min(0, dy) * 0.78 - 18).toFixed(1)}px) scale(${(from + (scale - from) * 0.45).toFixed(3)})`+ play(x, [+ { transform: `translate(0px, 0px) scale(${from.toFixed(3)})`, easing: 'cubic-bezier(.2,.7,.4,1)' },+ { transform: rise, offset: 0.4, easing: 'cubic-bezier(.45,0,.25,1)' },+ { transform: `translate(${dx.toFixed(1)}px, ${dy.toFixed(1)}px) scale(${scale.toFixed(3)})` },+ ], { duration: ms, fill: 'forwards' })+ if (playful()) {+ const strokes = play(tail, [{ transform: 'none' }, { transform: 'rotate(12deg)' }, { transform: 'rotate(-12deg)' }, { transform: 'none' }], { duration: 240, iterations: 2, easing: 'ease-in-out', fill: 'none' })+ strokes.done.then(() => strokes.cancel())+ }+ // It lands with the avatar's open eyes (the celebration gave it ^ ^ ones).+ if (want.celebrate && playful()) setTimeout(() => happyEyes(false), Math.round(ms * 0.7))+ return ms+ }+ // From handoffShow to the team window showing (GROWTH.delay + GROWTH.duration), and how much+ // sooner the flight ends, so a step the main process runs late never shows it mid-air.+ const SHOWN_AFTER = 460+ const LAND_EARLY = 30// 1.25 x the whale's height: fully under the waterline within about 200 ms, so the window// can grow around an empty sheet.const DEEP = () => Math.round(125 * u)@@ -894,7 +941,7 @@ export function createDirector({ start, resume, act, label, announce, onCheck, oif (done.includes('engine') && !want.done.includes('engine')) D.since[2] = nowlet station = 0if (done.includes('data')) station = done.includes('engine') ? 2 : 1- const next = { station, view: s.view, phase: s.phase, done, card: s.card?.kind ?? '', missed: Boolean(s.card?.missedRetry), celebrate: Boolean(s.celebrate), update: s.update?.state ?? '' }+ const next = { station, view: s.view, phase: s.phase, done, card: s.card?.kind ?? '', missed: Boolean(s.card?.missedRetry), celebrate: Boolean(s.celebrate), update: s.update?.state ?? '', landing: s.landing ?? null }// Stages taken back mean a start in another folder: the whale starts over even when the// next snapshot, a moment later, has the first stage done again.if (D.started && station < want.station) D.over = truediff --git a/app/test/start-page.test.mjs b/app/test/start-page.test.mjsindex 136f1710..9f2433d3 100644--- a/app/test/start-page.test.mjs+++ b/app/test/start-page.test.mjs@@ -3,7 +3,7 @@ import { spawnSync } from 'node:child_process'import { existsSync, readFileSync } from 'node:fs'import { test } from 'node:test'import { fileURLToPath } from 'node:url'-import { START_ACTS } from '../src/start-window.mjs'+import { GROWTH, START_ACTS } from '../src/start-window.mjs'import { langOf, TEXT, t } from '../src/start/text.mjs'const dir = new URL('../src/start/', import.meta.url)@@ -93,6 +93,10 @@ test('the start page draws the progress as a ring of three arcs and a closing ci// The ring, the water, the whale and its hit box move as one block when a card comes.assert.match(html, /<div class="pond">\r?\n<svg class="ring"[\s\S]*?<div class="water"[\s\S]*?<div class="lane">[\s\S]*?<span class="spout"><svg class="plume"[^>]*\shidden>[\s\S]*?<div class="whale-hit"[\s\S]*?<div class="fx" aria-hidden="true"><span class="ripple"><\/span><\/div>\r?\n<\/div>/u)assert.doesNotMatch(html, /class="(?:trace|elapsed)"/u)+ // The layer the whale flies in to the Main Bot's avatar at the hand-off (whale.js leap), and+ // the flight's end tied to when the main process shows the team window.+ assert.match(html, /<\/main>\r?\n<div class="flight" aria-hidden="true"><\/div>/u)+ assert.match(code['whale.js'], new RegExp(`const SHOWN_AFTER = ${String(GROWTH.delay + GROWTH.duration)}\\b`, 'u'))assert.doesNotMatch(read('start.css'), /\.(?:trace|elapsed)\b/u)})diff --git a/app/test/start-window.test.mjs b/app/test/start-window.test.mjsindex 08150943..926d511c 100644--- a/app/test/start-window.test.mjs+++ b/app/test/start-window.test.mjs@@ -7,7 +7,7 @@ import { test } from 'node:test'import { readStartFrame, writeStartFrame } from '../src/start-frame.mjs'import {acceptsAct, centred, clampInto, clockMs, cubicBezier, detailsText, explainOf, failureReason, fallbackMs, GROWTH, GROWTH_EASING,- growthSteps, isStartPage, MAIN_SIZE, mainRect, START_ACT, START_ACTS, START_STATE, startSize, startSnapshot, startUrl, StartWindow,+ growthSteps, isStartPage, landingOf, MAIN_SIZE, mainRect, START_ACT, START_ACTS, START_STATE, startSize, startSnapshot, startUrl, StartWindow,TEAM_VIEW_MS, WATCHDOG_MS,} from '../src/start-window.mjs'@@ -277,6 +277,7 @@ function fakeElectron() {setContentBounds(rect) { this.bounds = { ...rect } }setBounds(rect) { this.bounds = { ...rect }; this.calls.push('setBounds') }getBounds() { return { ...this.bounds } }+ getContentBounds() { return { ...this.bounds } }getNormalBounds() { return { ...this.bounds } }isDestroyed() { return this.destroyed }destroy() { if (!this.destroyed) { this.destroyed = true; this.emit('closed') } }@@ -507,6 +508,65 @@ test('closing the start window before the hand-off quits, and its timers go withassert.equal(s.start.owner(), undefined)})+test('the whale lands on the avatar the team view reported, in the start page\'s own coordinates', () => {+ const team = { x: 300, y: 90, width: 1280, height: 860 }+ const avatar = { x: 98, y: 70, width: 60, height: 60, viewportWidth: 1280, viewportHeight: 860 }+ // Both windows frameless: the grown start page shares the team page\'s origin.+ assert.deepEqual(landingOf(avatar, { team, start: { x: 300, y: 90 } }), { x: 98, y: 70, size: 60 })+ // A team page zoomed to 125 %: its CSS px are larger than DIP.+ assert.deepEqual(landingOf({ x: 80, y: 56, width: 48, height: 48, viewportWidth: 1024, viewportHeight: 688 }, { team, start: { x: 300, y: 90 } }), { x: 100, y: 70, size: 60 })+ // A system title bar on the start window only: its content starts 32 px lower.+ assert.deepEqual(landingOf(avatar, { team, start: { x: 300, y: 122 } }), { x: 98, y: 38, size: 60 })+ // Nothing to land on: no box, a tiny one, one outside the page, or not numbers.+ for (const report of [undefined, null, 'avatar', { x: 1 }, { ...avatar, width: 8, height: 8 }, { ...avatar, x: 1250 }, { ...avatar, y: -4 }, { ...avatar, x: Number.NaN }, { ...avatar, viewportWidth: 0 }]) {+ assert.equal(landingOf(report, { team, start: { x: 300, y: 90 } }), undefined, JSON.stringify(report))+ }+})++const AVATAR = { x: 98, y: 70, width: 60, height: 60, viewportWidth: MAIN_SIZE.width, viewportHeight: MAIN_SIZE.height }+test('ready() with the avatar\'s place puts the landing in the hand-off snapshot; without one there is none', (t) => {+ for (const [report, landing] of [[AVATAR, { x: 98, y: 70, size: 60 }], [undefined, undefined], [{ ...AVATAR, x: MAIN_SIZE.width - 10 }, undefined]]) {+ const s = startWindow(t)+ s.start.open('first')+ // As in the app: the team window is made on its rect, and the page measures it there.+ s.start.placeMain()+ s.start.done('data')+ s.start.done('engine')+ s.start.ready(report)+ assert.equal(s.state().view, 'handoff')+ assert.deepEqual(s.state().landing, landing)+ t.mock.timers.reset()+ }+})++test('the landing takes the start window\'s title bar into account, and waits with a held hand-off', (t) => {+ const s = startWindow(t)+ s.start.open('first')+ // macOS and Linux: a system title bar puts the start page 32 px below the window's top.+ const win = s.win()+ win.getContentBounds = () => ({ ...win.bounds, y: win.bounds.y + 32, height: win.bounds.height - 32 })+ s.start.placeMain()+ s.start.done('data')+ s.start.done('engine')+ s.start.card({ kind: 'picked', path: 'D:\\DeepSeek Bot' })+ s.start.ready(AVATAR)+ assert.equal(s.state().view, 'card')+ s.start.card(undefined)+ assert.equal(s.state().view, 'handoff')+ assert.deepEqual(s.state().landing, { x: 98, y: 38, size: 60 })+})++test('a minimized start window gets no landing', (t) => {+ const s = startWindow(t)+ s.start.open('first')+ s.start.done('data')+ s.start.done('engine')+ s.win().minimized = true+ s.start.ready(AVATAR)+ assert.equal(s.state().view, 'handoff')+ assert.equal(s.state().landing, undefined)+})+test('a failure during the hand-off draws the failure page on a fresh page', (t) => {const s = startWindow(t)s.start.open('first')diff --git a/docs/plans/2026-10-26-start-window.md b/docs/plans/2026-10-26-start-window.mdindex 2268316f..1ccc59bc 100644--- a/docs/plans/2026-10-26-start-window.md+++ b/docs/plans/2026-10-26-start-window.md@@ -3,7 +3,7 @@- 日期:2026-10-26- 相关:[Windows 上手流程](2026-10-26-windows-onboarding.md) 第 3、4、5、6、8 节,#559- 一起改:[Windows 上手流程](2026-10-26-windows-onboarding.md)(第 3 节、第 4 节、第 5 节、第 8 节、用词、「改动的已定设计」、分批上线、验收、待定、已知限制)、[启动页文案](2026-10-29-start-copy.md)(第 2、3、4 节、「改动的已定设计」)、[桌面应用](2026-10-16-desktop-app.md)(结构、窗口)、[UI 标准](../design/ui-standard.md)(1、3.1、4.4、8.3、8.4、12、14)-- 代码:新的 `app/src/start/`(`start.html`、`start.css`、`start.js`、`whale.js`、`text.mjs`)、`app/src/start-window.mjs`、`app/src/start-frame.mjs`、`app/scripts/start-assets.mjs`;`app/src/main.mjs`、`preload.cjs`、`window-frame.mjs`+- 代码:新的 `app/src/start/`(`start.html`、`start.css`、`start.js`、`whale.js`、`text.mjs`)、`app/src/start-window.mjs`、`app/src/start-frame.mjs`、`app/scripts/start-assets.mjs`;`app/src/main.mjs`、`preload.cjs`、`window-frame.mjs`;插件的 `ds-bot/src/client/sidebar.js`(交接时 Main Bot 头像的位置)## 为什么@@ -47,11 +47,11 @@| 部分 | 没有卡片时 | 有卡片时 | 内容 ||---|---|---|---|| 标题带 | y 0–40 | 同左 | 空,可以拖动 |-| 圆环 | 圆心 (360, 290),半径 106 | 圆心 (360, 150),半径约 66 | 三段弧,一段一个阶段(见下面);2 px 的线,圆头 |-| 水道 | x 48–672,y 182–322 | 跟着圆环缩小 | 112 px 的鲸鱼在圆环中间(x 304–416);水线以下的部分被裁掉 |-| 水线 | 圆环的一条弦:y 322,x 260–460 | y 约 170,宽约 124 | 1 px `--bt-line-2`,首尾各 18% 渐隐;涟漪(68 × 12)在它中间 |-| 鲸鱼的话 | y 414–434,居中 | y 226–246,居中,在圆环和卡片之间 | 15/20、600,`--bt-ink`;只有一行,不换行,实在放不下才用省略号;只在第 3 节列的几种时候有字 |-| 提示行 | y 438–466,居中 | 隐藏 | 13/18,`--bt-ink-2`;最多约 22 个字,或者只有〔打开日志文件夹〕;平时空着 |+| 圆环 | 圆心 (360, 255),半径 106 | 圆心 (360, 150),半径约 66 | 三段弧,一段一个阶段(见下面);2 px 的线,圆头 |+| 水道 | x 48–672,y 147–287 | 跟着圆环缩小 | 112 px 的鲸鱼在圆环中间(x 304–416);水线以下的部分被裁掉 |+| 水线 | 圆环的一条弦:y 287,x 260–460 | y 约 170,宽约 124 | 1 px `--bt-line-2`,首尾各 18% 渐隐;涟漪(68 × 12)在它中间 |+| 鲸鱼的话 | y 379–399,居中 | y 226–246,居中,在圆环和卡片之间 | 15/20、600,`--bt-ink`;只有一行,不换行,实在放不下才用省略号;只在第 3 节列的几种时候有字 |+| 提示行 | y 403–431,居中 | 隐藏 | 13/18,`--bt-ink-2`;最多约 22 个字,或者只有〔打开日志文件夹〕;平时空着 || 纸面 | 空,点击穿过它 | x 48–672,y 260–496 | 只放卡片 || 底注 | x 48,y 504–522 | 同左 | 「社区开源项目,不是 DeepSeek 官方产品」,13/18 || 位置行 | 右对齐 x 672,y 504–522,和底注同一行,挤不下时位置行的字省略 | 同左 | 「数据放在 C 盘(剩 412 GB)· 换个位置…」,13/18,`--bt-ink-2`;「换个位置…」是链接(第 6 节)。只在新团队和要导入的首次启动有,重装没有;导入一开始复制就收起;失败页和「团队界面没有加载出来」时隐藏,180 秒的问题开着时还能点。剩余空间按资源管理器的算法(1024 进制)。Windows 以外写文件夹(`~/.ds-bot`)代替盘;查不到剩余空间时不写括号 |@@ -62,7 +62,7 @@- 完成:`--bt-ink-deepseek` 的线顺时针把这一段画满,.56 s。- 失败:这段线变成 60% 的 `--bt-danger`(第 7 节)。- 交接:段与段之间的空隙接上,合成一整圈(.3 s),整圈鼓起一次(.5 s,最大 1.035 倍,第 8 节)。-- 圆环、水道、水线、鲸鱼的点击区和涟漪是一块,下面叫水塘。没有卡片时,水塘、鲸鱼的话和提示行整组比有卡片时低 80 px,鲸鱼落在窗口的视觉中心。要出卡片时,整组用 `SPRING_SHAPE` 上移 80 px,水塘在同一个弹簧里以圆心为准缩到 .62 倍、再上移 60 px,圆环落在卡片上面,卡片出现在下面的纸面里;卡片收回后,水塘回到原大,整组回到低处。底注和位置行不动。页面不能滚动(第 11 节)。+- 圆环、水道、水线、鲸鱼的点击区和涟漪是一块,下面叫水塘。没有卡片时,水塘、鲸鱼的话和提示行整组比有卡片时低 45 px,鲸鱼在窗口的视觉中心稍上一点。要出卡片时,整组用 `SPRING_SHAPE` 上移 45 px,水塘在同一个弹簧里以圆心为准缩到 .62 倍、再上移 60 px,圆环落在卡片上面,卡片出现在下面的纸面里;卡片收回后,水塘回到原大,整组回到低处。底注和位置行不动。页面不能滚动(第 11 节)。- 鲸鱼的话和提示行直接写在 Mica 上。没有卡片时它们在纸面的位置上:纸面空着时点击穿过它,〔打开日志文件夹〕点得到。- 卡片是不透明的 `--bt-card`:1 px `--bt-line` 边,圆角 12,内边距 16 × 20。卡片正文比纸面高时,正文在卡片里滚动,按钮行固定在卡片底部。- 以后的启动和首次启动是同一个布局:同样 112 px 的鲸鱼、圆环和水线,没有底注和位置行(第 5 节)。@@ -103,8 +103,8 @@| 应用主动问(卡片、180 秒) | 跳两下,然后停下,看着卡片(停下以后见下一张表) | 1.3 s × 2 || 用户自己引出的卡片 | 不跳,停下 | 无 || 失败 | 从当前姿势下沉 4 px、低头 4°,眼皮变重,然后完全静止 | `SPRING_SHAPE` |-| 就绪,庆祝(首次启动;重试或重新开始后第一次成功) | 圆环合上的同时压扁再拉长,「^ ^」眼,喷一次水;560 ms 时潜下去,深到身高的 1.25 倍 | 460 ms 加 `SPRING_SHAPE` |-| 就绪(以后的启动) | 圆环合上,100 ms 后直接潜下去,同样深到身高的 1.25 倍 | `SPRING_TAP` 290 ms |+| 就绪,庆祝(首次启动;重试或重新开始后第一次成功) | 圆环合上的同时压扁再拉长,「^ ^」眼,喷一次水;560 ms 时跳出水面,飞到 Main Bot 的头像会在的位置,缩到头像的大小落下(第 8 节);没有地方落时潜下去,深到身高的 1.25 倍 | 460 ms;跳 590 ms(潜下去用 `SPRING_SHAPE`) |+| 就绪(以后的启动) | 圆环合上,100 ms 后直接跳向 Main Bot 的头像;没有地方落时直接潜下去,同样深到身高的 1.25 倍 | 跳 550 ms(潜下去用 `SPRING_TAP` 290 ms) |鲸鱼还有下面这些小反应,每一个都有原因:卡片在等、用户做了什么,或者交接;第 9 条是唯一一个没有外因的,让工作时的上下晃不那么像循环。它更有反应,不是动得更多。安静档没有 1 到 7 和 9;减少动态效果时 1 到 9 都没有;失败页(启动失败、团队界面没有加载出来、复制失败)上也都没有。@@ -117,7 +117,7 @@| 5 | 眼睛跟着键盘焦点 | 键盘把焦点移到纸面或提示行里的按钮、勾选框上 | 眼睛看向那个控件的中心,限幅和跟随指针一样;指针一动就交回指针。卡片出现时焦点自动移到主按钮,那一次不跟,眼睛仍看着卡片 || 6 | 按下预备 | 在回答卡片的按钮上按下指针(展开「详细」「详细信息」、打开模型设置的「更换」、〔复制详细信息〕不算回答) | 身体微蹲:`scale` 1.03 .97,120 ms;点下去时用 `SPRING_TAP` 弹回并点头,移开或取消只弹回;键盘只点头。卡片的动作照旧在点击时才发出 || 7 | 活泼档越跳越稀 | 活泼档,应用主动问、要跳两下的卡片 | 在 0、1.3、3.9、9.1 秒开始跳,以后每 9 秒一次,中间停下来呼吸、眨眼;抚摸或回答后不再跳;导入时空间不够的卡只跳一次 |-| 8 | 潜得更深 | 交接 | 潜到鲸鱼身高的 1.25 倍(140 px),窗口开始长大时鲸鱼已经在水线下 |+| 8 | 潜得更深 | 交接时没有地方落(第 8 节) | 潜到鲸鱼身高的 1.25 倍(140 px),窗口开始长大时鲸鱼已经在水线下 || 9 | 张望 | 首次启动「启动本机引擎」那一段、鲸鱼工作时,每 5 到 9 秒一次,间隔随机 | 眼睛随机向左或向右看 600 ms:`#eye-pair` 平移 14%,150 ms 过去、停 270 ms、180 ms 回来,`ease-in-out`,叠在上下晃上。10 秒放慢后照常,45 秒换成思考后没有;眼睛跟着指针或键盘焦点时、看向用户的那 600 ms 里、抚摸和跳时都不张望,窗口看不见时也不;正张望着要看向用户时,眼睛先用 120 ms 回正。只在首次启动的这一段:以后的启动和搬数据的页面、复制中的卡也用工作的循环,但不张望 |- 动画三档用团队里设的那一档:主窗口的页面报告给应用,应用记在自己的 userData 里,下次启动时用。没有记录时(首次启动)按「正常」。@@ -130,7 +130,7 @@- 失败趴着时只冒一小股:.55 倍,不卷开,一滴,不压扁,眼睛不换。- 入场、沉下去重新开始、就绪以后和交接时,点了没有反应;抚摸时照样喷,眼睛不换。- 每种启动都有。安静档也有:水柱小一号(.85 倍),没有涟漪,压扁、尾巴甩一下和「^ ^」眼照旧;减少动态效果时只换成「^ ^」眼(第 9 节)。-- 涟漪是一个 68 × 12 的细线椭圆,在水线中间,出现在三处:首次启动浮上来时(以后的启动没有);喷出的水落回去时(喷水后 760 ms);庆祝的交接里鲸鱼潜下去时(660 ms,那次喷出的水 760 ms 再来一圈)。喷水和潜下去的那几次 160 ms 淡完(浮上来的那次 .56 s)。安静档和减少动态效果时没有涟漪。+- 涟漪是一个 68 × 12 的细线椭圆,在水线中间,出现在三处:首次启动浮上来时(以后的启动没有);喷出的水落回去时(喷水后 760 ms);庆祝的交接里鲸鱼潜下去时(660 ms;交接时喷的水不另起一圈,鲸鱼跳向头像时这一圈也没有)。喷水和潜下去的那几次 160 ms 淡完(浮上来的那次 .56 s)。安静档和减少动态效果时没有涟漪。- 鲸鱼和圆环对读屏隐藏(`aria-hidden`)。三个阶段留在一个看不见的列表里(「启动进度」,每项带状态词,当前一项 `aria-current="step"`),礼貌朗读区照旧说「{阶段}:进行中」「{阶段}:已完成」。鲸鱼的话是普通文字,不进朗读区;失败的标题例外,会读出来。卡片出现时朗读它的第一行和第一句话(180 秒的卡读鲸鱼的问题)。### 4. 首次启动,逐拍@@ -152,7 +152,7 @@5. 45 秒,引擎还没起来:鲸鱼说「有点久,可能是杀毒软件在查新文件」,提示行只有 28 px 的〔打开日志文件夹〕。鲸鱼改成思考,弧上的光放慢。6. 180 秒:见第 6 节。7. 引擎起来:主进程在隐藏的主窗口里加载引擎的页面,开始 20 秒的就绪检查。第二段弧画满,第三段「打开团队」进行中,鲸鱼改成发消息;45 秒的那句和〔打开日志文件夹〕收起。导入卡开着、还没回答时,预热好的引擎只算到第二段:不加载页面、第三段不开始、不开始 20 秒检查,三件事都等回答以后(〔复制过来〕的等第一段复制完)。-8. `dsBotApp.ready()`:剩下的弧画满,圆环合上,鲸鱼喷一次水,潜下去,见第 8 节。+8. `dsBotApp.ready()`:剩下的弧画满,圆环合上,鲸鱼喷一次水,跳出水面,落到团队窗口里 Main Bot 的头像上(没有地方落时潜下去),见第 8 节。- 10 秒、45 秒和 180 秒按启动的时钟算,页面上不显示这个时钟。卡片等用户回答时它停着,回答后接着走:用户自己想了多久,不算在引擎头上。- 位置行(第 2 节)从入场起就在:新团队和要导入时写「数据放在 C 盘(剩 412 GB)· 换个位置…」,什么都不点就按它走,不问。点「换个位置…」才开系统选择框(第 6 节),选择框开着时时钟也停。交接时随整组淡出(第 8 节)。@@ -166,13 +166,13 @@- 45 秒,引擎还没起来:鲸鱼说「比平时慢,请再等一会儿」,提示行只有〔打开日志文件夹〕,鲸鱼改成思考。- 180 秒:和首次启动一样。- 换位置(第 1 节)时,鲸鱼下面一直是「正在搬 DeepSeek Bot 的数据…」,45 秒起换成「比平时慢,请再等一会儿」和〔打开日志文件夹〕。以后的启动和搬数据时,这一行的字 1 秒后带流光。-- 就绪时没有庆祝(重试或重新开始后第一次成功时例外,第 8 节):剩下的弧画满、圆环合上,100 ms 后鲸鱼潜下去;220 ms 时发 `handoffShow`,启动窗口和首次启动一样长成主窗口的矩形,主窗口在就绪后约 0.7 秒露面(第 8 节)。+- 就绪时没有庆祝(重试或重新开始后第一次成功时例外,第 8 节):剩下的弧画满、圆环合上,100 ms 后鲸鱼跳向 Main Bot 的头像(没有地方落时潜下去);220 ms 时发 `handoffShow`,启动窗口和首次启动一样长成主窗口的矩形,鲸鱼 650 ms 时落在头像上,主窗口在就绪后约 0.7 秒露面(第 8 节)。- `DS_BOT_HOME` 的一次性运行用这一套,只是不出卡片。### 6. 卡片、180 秒和导入- 所有卡片用同一套变形:- - 出现:鲸鱼的话和提示行淡出 .16 s;整组上移 80 px,水塘在同一个弹簧里缩到 .62 倍、再上移 60 px(第 2 节,首次启动和以后的启动一样);卡片的底色和边线两层从 0 高长到内容的高度(`clip-path`,走 `SPRING_SHAPE`;底色 .22 s 淡入);内容先按最终尺寸排好,晚 70 ms 淡入;焦点移到主按钮。+ - 出现:鲸鱼的话和提示行淡出 .16 s;整组上移 45 px,水塘在同一个弹簧里缩到 .62 倍、再上移 60 px(第 2 节,首次启动和以后的启动一样);卡片的底色和边线两层从 0 高长到内容的高度(`clip-path`,走 `SPRING_SHAPE`;底色 .22 s 淡入);内容先按最终尺寸排好,晚 70 ms 淡入;焦点移到主按钮。- 回答后:内容 .16 s 退场(下沉 6 px、缩到 .975、模糊 3px),卡片收回,水塘回到原大,整组回到低处。- 卡片在时鲸鱼的话空着、提示行隐藏。卡片自己的第一行是鲸鱼说的一句(15/20、600,一行),写在已定的内容上面,内容本身不变:- 导入卡:「找到你以前的团队了」。@@ -234,7 +234,7 @@- 恢复卡上的选择:- 〔重试〕:画满的弧保持画满;红的那段回到进行中,鲸鱼抖一抖,回到工作。- 〔换个位置…〕和〔用新的空白团队开始…〕:先选文件夹(定根和首次启动同一条规则);然后鲸鱼沉到水线下 84 px,.16 s 淡出,三段弧回到没开始,鲸鱼在原处重新浮上来(12° 的倾斜回正,`SPRING_STRETCH`)。位置行的「换个位置…」(第 6 节)走同一条路;阶段被收回时,就算下一个快照里第一段马上又完成了,鲸鱼也先沉下去。- - 重试或重新开始后第一次成功时庆祝一次,首次启动和以后的启动一样:圆环合上时压扁、「^ ^」眼、喷水,然后潜下去(第 8 节)。+ - 重试或重新开始后第一次成功时庆祝一次,首次启动和以后的启动一样:圆环合上时压扁、「^ ^」眼、喷水,然后跳到 Main Bot 的头像上,没有地方落时潜下去(第 8 节)。- 团队界面 20 秒没加载出来:- 主窗口始终不显示。- 鲸鱼换成失败的姿势,第三段弧变红,它的话换成「团队界面没有加载出来」,不画叉;卡片里是〔重新载入〕〔打开日志文件夹〕〔复制详细信息〕,没有鲸鱼的第一行。@@ -251,26 +251,30 @@|---|---|---|| `t0` | 圆环合上;鲸鱼压扁再拉长(460 ms),「^ ^」眼,尾巴甩一下,喷一次水(第 3 节) | || `t0` + 160 ms | 提示行淡出 | |-| `t0` + 560 ms | 拉到最长时潜下去,深到身高的 1.25 倍;鲸鱼的话、水线、圆环、还在落的水、纸面、底注和位置行淡出 .16 s | |-| `t0` + 660 ms | 涟漪,160 ms 淡完(交接时喷的水不另起一圈) | |+| `t0` + 560 ms | 拉到最长时跳出水面,飞向 Main Bot 的头像会在的位置(590 ms,见下面「跳到 Main Bot 的头像上」);没有地方落时潜下去,深到身高的 1.25 倍;鲸鱼的话、水线、圆环、还在落的水、纸面、底注和位置行淡出 .16 s | |+| `t0` + 660 ms | 只在潜下去时:涟漪,160 ms 淡完(交接时喷的水不另起一圈) | || `t0` + 720 ms | 发 `handoffShow` | 主窗口已经隐藏着放在最后的矩形上(以启动窗口的中心居中,不超出工作区);任务栏上仍是启动窗口的按钮 |-| `handoffShow` + 160 ms | 字、水线、圆环和纸面都已淡完,鲸鱼在水线下,只剩 Mica | 把启动窗口从 720 × 540 长到主窗口的矩形,300 ms,逐步 `setBounds`,约 14 ms 一步 |-| `t0` + 980 ms | 潜完,发 `handoffDone` | |+| `handoffShow` + 160 ms | 字、水线、圆环和纸面都已淡完,只剩 Mica 和飞着的鲸鱼(潜下去时鲸鱼在水线下,只剩 Mica) | 把启动窗口从 720 × 540 长到主窗口的矩形,300 ms,逐步 `setBounds`,约 14 ms 一步 |+| `t0` + 1150 ms(潜下去时 980 ms) | 落在头像上,发 `handoffDone`(潜下去时是潜完) | || `handoffShow` + 460 ms | | 长到位;主窗口在同一个矩形上、在启动窗口上面露面,用系统自己的打开过渡;启动窗口同时离开任务栏,应用的任务栏按钮一直在 || `handoffShow` + 760 ms | | 主窗口露面 300 ms 后销毁启动窗口 |- 庆祝的交接里主窗口在就绪后约 1.2 秒露面。-- 长大由主进程做:Electron 44 在 Windows 上不理 `setBounds` 的 `animate` 参数,只能一步一步改大小。每一步页面都重新排版,但只重画其中一部分(探针里 23 步重画了 8 次),所以长大时页面上除了 Mica 什么都不能有。-- 不庆祝的交接(以后的启动):圆环合上;100 ms 时页面上的字、水线、圆环和纸面淡出 .16 s,鲸鱼 290 ms 潜下去(`SPRING_TAP`),深到身高的 1.25 倍;220 ms 时发 `handoffShow`,390 ms 时发 `handoffDone`。长大和露面和首次启动一样从 `handoffShow` 算起,主窗口在就绪后约 0.7 秒露面。+- 长大由主进程做:Electron 44 在 Windows 上不理 `setBounds` 的 `animate` 参数,只能一步一步改大小。每一步页面都重新排版,但只重画其中一部分(探针里 23 步重画了 8 次),所以长大时页面上只有飞着的鲸鱼:字、水线、圆环和纸面都在长大之前淡完。鲸鱼的动画走合成线程,但页面只在其中几步重画,这 300 ms 里鲸鱼可能一顿一顿地动,机器忙时更明显(已知限制)。+- 不庆祝的交接(以后的启动):圆环合上;100 ms 时页面上的字、水线、圆环和纸面淡出 .16 s,鲸鱼跳向 Main Bot 的头像(550 ms),650 ms 时落下、发 `handoffDone`;没有地方落时鲸鱼 290 ms 潜下去(`SPRING_TAP`),深到身高的 1.25 倍,390 ms 时发 `handoffDone`;两种都在 220 ms 时发 `handoffShow`。长大和露面和首次启动一样从 `handoffShow` 算起,主窗口在就绪后约 0.7 秒露面。- 页面没发 `handoffShow` 时,主进程自己显示主窗口:首次启动和庆祝的交接在 2.5 秒后,其余以后的启动在 0.8 秒后。页面发得早得多:庆祝的 0.72 秒,不庆祝的 0.22 秒;入场还没到位时,再晚最多一个入场(560 ms、290 ms)。-- 减少动态效果:不长大。剩下的弧画满、圆环合上都只用 .12 s,庆祝时换成「^ ^」眼(安静档不换);300 ms 时内容淡出 .12 s,420 ms 时发 `handoffShow`,440 ms 时发 `handoffDone`,主窗口直接出现在它最后的矩形上(第 9 节)。+- 减少动态效果:不长大,鲸鱼也不跳。剩下的弧画满、圆环合上都只用 .12 s,庆祝时换成「^ ^」眼(安静档不换);300 ms 时内容淡出 .12 s,420 ms 时发 `handoffShow`,440 ms 时发 `handoffDone`,主窗口直接出现在它最后的矩形上(第 9 节)。- 启动窗口有焦点时,主窗口直接显示并拿到焦点。- 启动窗口没有焦点时,主窗口不抢焦点,放在启动窗口原来的层次上,任务栏按钮闪烁。- 启动窗口最小化着时不长大,主窗口也最小化着出现,任务栏按钮闪烁。-- 鲸鱼不跨窗口:两个窗口、两个渲染进程、两个来源,画不了一条跨窗口的路。它在启动窗口里潜下去,首次启动时在团队界面侧栏 Main Bot 的磁贴上浮上来一次(待定):- - 主窗口露面时,磁贴上的鲸鱼从 `translate(0, 18%) rotate(-8deg)` 用 `SPRING_STRETCH` 560 ms 浮到原位,不透明度 .16 s 淡入;眼睛先闭着,300 ms 时睁开(160 ms);400 ms 时主 Bot 星标淡入(.22 s)。Main Bot 聊天里的第一张卡(新团队的设置卡,导入来的团队的「复制好了」卡,[上手流程](2026-10-26-windows-onboarding.md) 第 4、5 节)等它浮上来,640 ms 起才出现。- - 浮上来由插件做。在这之前磁贴上的鲸鱼和星标不画;页面从主进程经 `dsBotApp` 发的露面事件知道主窗口露面了、这是不是首次启动(主进程每次显示主窗口都发,兜底显示时也发;这个事件待定,见「待定」)。没有 `dsBotApp`(DSH Desktop、DSH Web)、不是首次启动、或者减少动态效果时不浮:鲸鱼、星标和第一张卡从第一帧起就在。安静档照样浮上来:它是状态动作,和启动窗口的入场一样。- - 「预览版说明」盖着侧栏时怎么办,见「待定」。+- 跳到 Main Bot 的头像上:鲸鱼不跨窗口(两个窗口、两个渲染进程、两个来源,画不了一条跨窗口的路),它在启动窗口里飞到 Main Bot 的头像会在的位置。启动窗口长成主窗口的矩形,主窗口在同一个矩形上露面,头像正好在鲸鱼下面,看起来就是 Main Bot 走进了自己的座位。庆祝和不庆祝的交接都这样:+ - 头像在哪里由插件说:侧栏调 `dsBotApp.ready()` 时带上 Main Bot 的头像在团队页面里画在哪里(团队列里的 `.bt-side [data-bot-id] .bt-mark`,宽的团队列的磁贴上 60 px,窄栏里 44 px):`{ x, y, width, height, viewportWidth, viewportHeight }`,团队页面的 CSS px。只在 Main Bot 是默认的样子(鲸鱼、`deepseek` 色、没有照片)、头像在团队列里看得见时才带。预载只传有限的数字。+ - 主进程(`start-window.mjs` 的 `landingOf`)按团队页面的缩放(团队内容区的宽 ÷ `viewportWidth`)换成 DIP,再换成启动窗口长到主窗口的矩形以后启动页自己的坐标(启动窗口的边框偏移照样带过去),放进交接的快照:`landing: { x, y, size }`。不像页面里的一个框(不是数字、小于 16 px、出了页面)就不放。`main.log` 记鲸鱼落在哪里,或者没有地方落、鲸鱼潜下去。交接等用户回答时(第 6 节),这个位置留着,答完照样用。+ - 启动页(`whale.js` 的 `leap`):鲸鱼离开水道(水道在水线处裁掉它),进到整个窗口大的 `.flight` 层,按页面自己的坐标先向上跃出水面(飞到 40% 时最高,高过起点和终点),再滑向头像,同时缩到头像的大小;后 300 ms 窗口在往左上长,所以在屏幕上看,它是一路往左上飞进头像。起跳时身体回正:庆祝时的拉长、迟到或挂起的交接之前失败的姿势和低头的视线都在飞行的前 40% 里收回,落下时和头像一样正着。尾巴划两下(安静档没有);庆祝的交接里「^ ^」眼在 70% 时睁开,落下时和头像一样睁着眼。卡片刚收回、水塘还缩着时,从它看得见的大小起飞。+ - 落下比主窗口露面早 30 ms(`handoffShow` + 160 ms 开始长大,长 300 ms,`handoffShow` + 460 ms 露面):庆祝的交接 `t0` + 560 ms 起跳,飞 590 ms,1150 ms 落下;不庆祝的 100 ms 起跳,飞 550 ms,650 ms 落下。主进程哪一步晚了一点,主窗口露面时鲸鱼也已经落下,不会停在半空。+ - 没有地方落时照旧潜下去:Main Bot 换了别的样子或照片、团队列完全收起(窄栏和打开的抽屉里头像看得见,照样落)、经典 Agent 模式、启动窗口最小化着。DSH Desktop 和 DSH Web 没有 `dsBotApp`,侧栏不报位置,也没有启动窗口。减少动态效果时不跳,照旧淡出(第 9 节)。+ - 团队界面里的头像不另做动画:鲸鱼落下的地方就是它。+- 首次启动时 DSH 先显示「预览版说明」,它的遮罩盖着侧栏:鲸鱼照样落在头像的位置上,主窗口露面时头像在遮罩下面。- 主窗口第一次露面时,DSH 的加载、第一次挂载侧栏(#559)都已经做完,「预览版说明」已经显示出来。- 两个窗口各用各的颜色:启动窗口是 DeepSeek 主题的浅色或深色,主窗口是用户自己的主题。@@ -282,7 +286,7 @@- 圆环不画出来,一开始就在;弧画满、合成一整圈都只用 .12 s,整圈不鼓起;进行中的弧只染淡蓝,没有跑动的光。- 鲸鱼的话、复制中的对勾、卡片、提示行和更新条只淡入 .12 s、淡出 .16 s,没有模糊、位移和缩放。卡片高度直接到位(内容先是透明的);整组上移、水塘缩小,回到低处和原大,也都直接到位;没有流光。- 沉下去重新开始时,水道淡出 .16 s,三段弧回到没开始,鲸鱼直接回来。-- 交接时不长大:剩下的弧画满、圆环合上,300 ms 时内容淡出 .12 s,420 ms 时发 `handoffShow`,主窗口直接出现在它最后的矩形上(第 8 节)。+- 交接时不长大,鲸鱼不跳:剩下的弧画满、圆环合上,300 ms 时内容淡出 .12 s,420 ms 时发 `handoffShow`,主窗口直接出现在它最后的矩形上(第 8 节)。- 信息一样不少:三段弧、鲸鱼的话、提示行、按钮、看不见的阶段列表和朗读都在。### 10. 颜色、Mica 和标题带@@ -331,7 +335,7 @@- 主进程每次都发完整的状态,页面重新载入后再发一次。预载记住最后一份,有人订阅时先补发。- 主进程只接受来自启动窗口主框架、地址完全相同的 `act`,而且名字要在白名单里。- 主进程管:阶段、180 秒和 20 秒两个计时器、交接的兜底计时器、任务栏进度、更新状态。页面按时钟算 10 秒和 45 秒。-- 交接时的长大也由主进程做:主窗口一建就在最后的矩形上,`handoffShow` 后 160 ms 用逐步的 `setBounds` 把启动窗口长过去,460 ms 显示主窗口、同时让启动窗口离开任务栏,再过 300 ms 销毁启动窗口(第 8 节)。兜底计时器按这次交接是不是首次启动、有没有庆祝选 2.5 秒或 0.8 秒。启动页只发 `handoffShow` 和 `handoffDone` 两个事件,和原来一样;主窗口露面时主进程告诉团队界面,让磁贴上的鲸鱼浮上来(第 8 节,待定)。+- 交接时的长大也由主进程做:主窗口一建就在最后的矩形上,`handoffShow` 后 160 ms 用逐步的 `setBounds` 把启动窗口长过去,460 ms 显示主窗口、同时让启动窗口离开任务栏,再过 300 ms 销毁启动窗口(第 8 节)。兜底计时器按这次交接是不是首次启动、有没有庆祝选 2.5 秒或 0.8 秒。启动页只发 `handoffShow` 和 `handoffDone` 两个事件,和原来一样;鲸鱼落在哪里由主进程在交接开始时按 `ready()` 带来的头像位置算好,放进交接的快照(`landing`,第 8 节),团队界面不另收事件。- `main.log` 记三个阶段各用了多久。- 启动窗口在交接时销毁,它的渲染进程一起退出。@@ -349,7 +353,7 @@| 同上 验收「进程启动后 2 秒内窗口可见」「没有一个 `dialog.show*` 不挂在主窗口上」 | 两条里的窗口都指启动窗口 || [桌面应用](2026-10-16-desktop-app.md)「窗口」 | 加上启动窗口:720 × 540,不能缩放,只有最小化和关闭,Mica;交接时由主进程长成主窗口的矩形(第 8 节) || [UI 标准](../design/ui-standard.md) 4.4 头像尺寸 | 加 112(启动窗口) |-| 同上 8.3 状态动作 | 加只在启动窗口里有的动作:浮上来、阶段完成时划尾巴向前一涌、点头、喷水、潜下去、尾巴摆 |+| 同上 8.3 状态动作 | 加只在启动窗口里有的动作:浮上来、阶段完成时划尾巴向前一涌、点头、喷水、交接时跳到 Main Bot 的头像上(或潜下去)、尾巴摆 || 同上 3.1 字族 | 启动窗口加 `"Microsoft YaHei UI"`,记进第 14 节 || 同上 12 可访问性 | 新出现的卡片和恢复页,焦点移到主按钮 || [Windows 上手流程](2026-10-26-windows-onboarding.md) 第 3 节「标题「正在准备你的 Bot 团队…」,下面三个真实阶段,各带进度勾」;本文首稿第 2 节的标题行和三站(16 px 标记的四种样子、阶段名、站间的细线、进行中的流光) | 没有标题行,阶段不画出来:鲸鱼停在哪一站就是进度,离开的站留下一个圈,水线上不画别的;三个阶段只留在看不见的列表「启动进度」里,朗读照旧;已用秒数移到右上角;没有卡片时整组低 80 px(第 2、3 节) |@@ -375,6 +379,9 @@| 本文 2026-10-29 第 4 节第 2 拍:鲸鱼等问候读满(页面画出来后 1.66 秒)才离开第 1 站 | 第一段弧最早在入场后 260 ms(页面画出来后 820 ms)画满(第 4 节)。没有问候要等;鲸鱼也不再离开,那 1.66 秒要防的「浮上来就游走了」不会发生,只留一拍让人看见第一段画满 || 本文 2026-10-28 第 5 节:以后的启动 64 px 的鲸鱼下面写「正在打开你的团队…」,1 秒后带流光,没有水线和圈;前 1 秒什么都不再动 | 和首次启动同一个页面,顺利时没有字;45 秒起鲸鱼说「比平时慢,请再等一会儿」,提示行只有〔打开日志文件夹〕;前 1 秒只有第一段弧画满时那一下(划尾巴、一涌、点头)(第 5 节)。圆环已经说了在打开;以后的启动只要 3 到 12 秒,一行一直在的字就是噪音。阶段完成是真实的事(第 3 节),以后的启动也让人看见圆环在走 || 同上 第 8 节:首次启动 `handoffShow` 在就绪后约 1.1 秒,主窗口约 1.6 秒露面;以后的启动 120 ms、约 0.6 秒;以后的启动庆祝的那次约 1.04 秒、约 1.5 秒;减少动态效果约 0.86 秒 | 庆祝的交接 `handoffShow` 在 0.72 秒,主窗口约 1.2 秒露面;不庆祝的 0.22 秒、约 0.7 秒;减少动态效果 0.42 秒;主进程的兜底不变(2.5 秒、0.8 秒,第 8 节)。没有「进去吧」要读,交接不再等字;不庆祝的多出 100 ms,让合上的圆环先被看见 |+| 本文第 2、6 节:没有卡片时,水塘、鲸鱼的话和提示行整组比有卡片时低 80 px,鲸鱼落在窗口的视觉中心(圆环的圆心 (360, 290),水线 y 322,鲸鱼的话 y 414–434,提示行 y 438–466);出卡片时整组上移 80 px | 低 45 px,鲸鱼在窗口的视觉中心稍上一点:圆心 (360, 255),水道 y 147–287,水线 y 287,鲸鱼的话 y 379–399,提示行 y 403–431;出卡片时整组上移 45 px,有卡片时的位置不变(第 2、6 节)。维护者 2026-10-30:「位置上调一些」 |+| 本文第 3、4、5、7、8 节:就绪时鲸鱼潜下去,深到身高的 1.25 倍;首次启动时 Main Bot 的鲸鱼在团队界面侧栏的磁贴上浮上来一次,由插件做,主进程显示主窗口时经 `dsBotApp` 发露面事件(待定),Main Bot 聊天里的第一张卡等它浮上来;「待定」里磁贴上的鲸鱼怎么知道该浮上来、「预览版说明」盖着侧栏时怎么办;「不做什么」「鲸鱼不从启动窗口飞进主窗口」 | 鲸鱼跳出水面,在长大的启动窗口里飞到 Main Bot 的头像会在的位置,缩到头像的大小落下;主窗口在同一个矩形上露面,头像正好在它下面。头像的位置由侧栏随 `dsBotApp.ready()` 带来,主进程换成启动页的坐标(`landing`);没有露面事件,团队界面里的头像不另做动画,第一张卡也不等;「预览版说明」挂着时照样落在头像的位置上。没有地方落时(别的样子或照片、团队列收起、经典 Agent 模式)照旧潜下去,减少动态效果时照旧淡出(第 3、8 节)。维护者 2026-10-30:「启动之后流畅变形为主页面,Chief跳到主页左侧的Chief位置」 |+| 本文第 8 节「长大时页面上除了 Mica 什么都不能有」 | 长大时页面上只有飞着的鲸鱼:字、水线、圆环和纸面照旧在长大之前淡完;鲸鱼的动画走合成线程,但页面只在其中几步重画,这 300 ms 里鲸鱼可能一顿一顿地动(第 8 节、「已知限制」)。鲸鱼要一直看得见,才能落到头像上:为了「Chief跳到主页左侧的Chief位置」,接受这一点 |## 变更@@ -388,6 +395,7 @@- 2026-10-29 先打招呼再出发:第 4 节第 2 拍,数据阶段已完成时鲸鱼也等问候读满才离开第 1 站,等的时候晃着。维护者试用落地的启动窗口时「小鲸鱼看到的时候就在第二个位置」:那次首次启动里主进程 2.9 秒就建好了数据文件夹,页面 8.6 秒才画出来(冷启动;之后两次启动 2 秒),鲸鱼浮上来 560 ms 就游到了第 2 站。依据:原型 `alive.cjs` 的 greet 用例(数据阶段在入场结束前完成时,鲸鱼入场后 1.66 秒离开第 1 站、再 0.6 秒说「热身中,等我一下」;搜索到一半完成的也一样,且不说「先找个地方放东西」)、试用副本上的实测(窗口 1.1 秒出现、数据 1.9 秒完成、页面 2.1 秒画出来;鲸鱼入场后 1.68 秒离开第 1 站;`main.mjs` 标记数据完成后紧接着就启动引擎,日志里「engine took」从那一刻起算,和问候无关)。- 2026-10-29 文案分层:启动页的字按页面位置分层、一张表,见 [启动页文案](2026-10-29-start-copy.md);第 11 节 `text.mjs` 一条改成指向它;按各层规则改四处:45 秒的提示和「团队界面没有加载出来」去句号,「会放在 …」加句号、〔重新选〕加 …,OneDrive 的原因里「聊天记录」改成「对话」(第 5、6、7 节)。- 2026-10-30 圆环:维护者转来一段讨论,说启动窗口太吵(「现在这版有点噪了」「是不是可以简约一点」「其实我觉得可能就放一个鲸鱼就够,然后可以做交互动画,文字什么的不太需要」),提议只留一只浮在水上、点一下会喷水的鲸鱼,进度做成横条或圆环;比较三份草稿(水线分三段的进度条、圆环、只有鲸鱼)后选了圆环。「为什么」、第 2 到 11 节按圆环改写:三站和留下的圈换成围着鲸鱼的三段弧,每种启动都是 112 px 的鲸鱼、圆环和水线,出卡片时水塘缩到 .62 倍、上移 60 px;顺利时不说话(去掉问候、各阶段的话、「进去吧」、接模型、预览版说明和重装的提示、已用秒数,以后的启动去掉「正在打开你的团队…」),只留盘不够的提示、45 秒、180 秒、失败、卡片和搬数据;以后的启动和搬数据时 45 秒那句由鲸鱼说;点鲸鱼喷水代替转一圈;交接时剩下的弧画满、圆环合上,庆祝的那次喷水、560 ms 潜下去、0.72 秒发 `handoffShow`,不庆祝的 0.22 秒。「待定」去掉问候用哪个名字,水线那一行按圆环改写;「不做什么」和「已知限制」跟着改。依据:原型的圆环布局(82 个状态的截图都过了布局探针,探针也查圆环不碰鲸鱼的话、提示行和卡片:没有问题);`ring-live.cjs`:首次启动 `handoffShow` 在就绪后 0.72 秒(原来的布局 1.09 到 1.17 秒),以后的启动 0.23 到 0.33 秒,都在原型兜底的 1.5 秒和 0.8 秒以内,45 秒的〔打开日志文件夹〕用指针点得到,搬数据那一行在,喷水的「^ ^」眼给失败的姿势让路,〔重试〕清掉红的那段弧;一次独立评审的 10 条意见都已改正(空纸面让点击穿过、卡片在时提示行隐藏、112 px 鲸鱼入场的深度 96 / 84 px、沉下去 84 px、喷水的「^ ^」眼不盖过失败的姿势、就绪以后不喷、强制颜色覆盖弧、光、水柱和水滴、弧 0.5 s 画出来等)。桌面应用里的检查(离屏 Electron、替身桥,15 项都过):首次启动 `handoffShow` 在就绪后 0.73 秒,以后的启动 0.24 秒(引擎在就绪前 0.5 秒才起来);数据阶段在页面画出来以前完成时,第一段弧 820 ms 画满,700 ms 时完成的,565 ms 进行中、999 ms 画满。真机上的首次启动(这条分支的一次性副本,装着锁定的 DSH 0.2.1-rc.4):窗口 1.5 秒出现、页面 2.9 秒画出来,第一段弧在页面时间 2.6 秒画满;引擎 17.1 秒后第二段画满,团队 4.4 秒后就绪;`handoffShow` 在就绪后 738 ms,窗口 173 ms 后开始长大,团队窗口在就绪后 1.31 秒露面,页面上没有留下的圈和已用秒数。和原型有意不同的两处:第一段弧等的时候鲸鱼不换循环(原型先换成工作的循环,循环自己要停满的 400 ms 把弧再推迟);就绪时正在走的那一拍不再走完,剩下的弧一起画满(原型让它走完;照原型写的桌面应用里,引擎在就绪前 0.5 秒起来的以后的启动 0.46 秒才发 `handoffShow`)。评审后补正:第一段弧等的时候鲸鱼不换循环(第 4 节);以后的启动前 1 秒有第一段弧画满的那一下(第 5 节);一拍走完点一下头(第 3 节);安静档点鲸鱼时照样压扁、甩尾和「^ ^」眼;浮上来的那圈涟漪 .56 s 淡完;盘不够的那句按启动的时钟算前 10 秒,入场时就在。+- 2026-10-30 跳到 Chief:维护者问「要不要加个正在做的事情的简单描述,位置上调一些,启动之后流畅变形为主页面,Chief跳到主页左侧的Chief位置」,然后「三点都做」,紧接着又说「文案保持取消状态」:所以没有加描述正在做什么的字,顺利时页面上仍然没有字(第 3 节),只做了另外两点。一是位置上调:没有卡片时整组低 45 px(原来 80 px),圆环上移 35 px,出卡片时整组上移 45 px,有卡片时不变(第 2、6 节)。二是交接时鲸鱼不再潜下去,而是跳出水面,在长大的启动窗口里飞到 Main Bot 的头像会在的位置,缩到头像的大小落下,主窗口在同一个矩形上露面(第 3、4、5、7、8、9、11 节):插件的侧栏在 `dsBotApp.ready()` 里带上 Main Bot 头像的位置(只在默认的鲸鱼、头像在团队列里看得见时),主进程用 `landingOf` 换成启动页的坐标放进交接的快照,启动页的 `leap` 飞 590 ms(不庆祝的 550 ms),比主窗口露面早 30 ms 落下,`handoffDone` 改在落下时发(庆祝的 1150 ms,不庆祝的 650 ms);没有地方落时照旧潜下去。磁贴上的鲸鱼浮上来和 `dsBotApp` 的露面事件都不做了,「待定」里那一行随之去掉:团队界面里的头像不用自己动,鲸鱼落下的地方就是它;「预览版说明」盖着侧栏时鲸鱼照样落在头像的位置上,头像在遮罩下面(第 8 节)。「长大时页面上除了 Mica 什么都不能有」改成只留飞着的鲸鱼;长大时鲸鱼可能一顿一顿地动、落点在 `ready()` 之后团队列还在动时会差几个像素,记进「已知限制」;「不做什么」跟着改。依据:应用的测试(`start-window.test.mjs`:`landingOf` 在两个窗口边框相同、团队页面缩放到 125 %、只有启动窗口有系统标题栏时都算对,不像样的报告都不落;`ready()` 带着位置时交接的快照里有 `landing`,不带时没有;`start-page.test.mjs` 查 `.flight` 层),插件的侧栏测试(`app-ready.test.js`:默认的鲸鱼报告它的位置,别的样子或照片不报)。真机上的首次启动(一次性副本,装着锁定的 DSH 0.2.1-rc.4,团队页面缩放 125%):主进程记下「the whale lands at 105, 116 (60 px)」,团队窗口露面后侧栏里 Main Bot 的头像在 (104, 116)、60 px,差 1 px;`handoffShow` 在就绪后 738 ms,窗口在它之后 171 ms 开始长大,`handoffDone` 在它之后 442 ms,团队窗口在就绪后 1.32 秒露面:这台机器上长大比 300 ms 慢,鲸鱼先落下,再跟着窗口一起长到位(两次运行,落点都一样);首次启动时「预览版说明」的遮罩盖着侧栏,头像在遮罩下面## 待定@@ -397,15 +405,14 @@| 鲸鱼的尾巴能单独动吗? | 启动页把生成器的输出按尾柄(`27.9, 61.1`)裁成两层,不加新形状;生成器加一个尾巴单独成层的选项;尾巴不动 | 先用裁切,只在启动窗口里用。以后插件也要用时,再给生成器加选项。去掉也只少了尾巴,其余不变 || 水线要不要留? | 留:圆环的一条弦,200 px,1 px `--bt-line-2`,首尾渐隐;去掉,只留鲸鱼和圆环 | 留:鲸鱼被裁掉的那条边在这里,喷出的水和涟漪也落在这里 || 启动页超过 45 KB 的预算(第 11 节)怎么办?(原型实测:五个文件的源码 113 KB,压缩后 79 KB,gzip 约 35 KB;`text.mjs` 带中英两种语言) | 放宽预算;`text.mjs` 按语言拆开,只加载界面语言的那一份;打包时压缩 | 先按语言拆 `text.mjs`、打包时压缩,在 M4 实测启动页的第一帧;第一帧不晚就放宽预算:页面是本地文件,不走网络(同 [上手流程](2026-10-26-windows-onboarding.md) 的「待定」) |-| 磁贴上的鲸鱼怎么知道该浮上来?「预览版说明」盖着侧栏时怎么办?(第 8 节) | 主进程显示主窗口时经 `dsBotApp` 发一个露面事件,带上这是不是首次启动([上手流程](2026-10-26-windows-onboarding.md) 第 3 节的 `dsBotApp` 列表要加一项);页面自己等 `visibilitychange` 第一次变成 `visible`(不加接口,但分不出是哪种启动;Electron 默认照常渲染隐藏的新窗口,这时页面第一次加载的 `document.visibilityState` 可能不对)。说明挂着时:照样在它下面浮上来;等它关掉再浮;不浮,鲸鱼从第一帧起就在 | `dsBotApp` 的露面事件:时刻和启动的种类都准。说明挂着时先照样浮,M4 看它在说明下面看不看得见;看不见就不浮:DSH 的说明关掉时没有事件,插件等不到「继续」 |## 不做什么- 不画百分比进度条:引擎不报百分比。圆环的一段弧只有没开始、进行中、完成、失败四种样子,不按百分比画一部分。复制和下载的进度条用真实的字节数。-- 不编造阶段,不为动画推迟引擎和团队界面的加载;交接为了长大多等约 460 ms,见第 8 节。庆祝(喷水)只在首次启动和重试、重新开始后第一次成功时有。庆祝的交接里主窗口在 `ready()` 后约 1.2 秒露面(长大要等页面空了才开始),不庆祝的约 0.7 秒。+- 不编造阶段,不为动画推迟引擎和团队界面的加载;交接为了长大多等约 460 ms,见第 8 节。庆祝(喷水)只在首次启动和重试、重新开始后第一次成功时有。庆祝的交接里主窗口在 `ready()` 后约 1.2 秒露面(长大要等页面上的字、圆环和纸面淡完才开始),不庆祝的约 0.7 秒。- 不放轮播的提示和笑话。顺利时鲸鱼不说话,只在第 3 节列的几种时候说一句和它的状态有关的短话,不冒气泡,不讲笑话,不挡卡片和按钮;鲸鱼的话里只有 180 秒那一句是问题,回答在卡片的按钮上。不提前说进门以后的事(接模型、预览版说明、上次的团队)。失败时不哭不闹,失败页上不说俏皮话。-- 鲸鱼没有「?」徽标(UI 标准 8.2:大头像不显示徽标),不侧身跃出水面;只在用户点它和庆祝的交接时喷水;不游来游去,不对每次按键都有反应,没有声音。-- 鲸鱼不从启动窗口飞进主窗口:它在小窗口里潜下去,首次启动时在侧栏的磁贴上浮上来(第 8 节)。+- 鲸鱼没有「?」徽标(UI 标准 8.2:大头像不显示徽标),不侧身跃出水面(交接时跳向 Main Bot 的头像是它唯一一次离开水面,第 8 节);只在用户点它和庆祝的交接时喷水;不游来游去,不对每次按键都有反应,没有声音。+- 鲸鱼不跨窗口飞:它在启动窗口里飞到 Main Bot 的头像会在的位置,主窗口在同一处接住(第 8 节);团队界面里的头像不另做浮上来的动画。- 不画 DSH 的鲸鱼标志,不用其他产品的动画、插图、声音和字体。- 不往引擎的页面里注入 CSS 或 DOM 来接画面,不改 DSH。- 不用 Rive、Lottie 和网络字体:CSP `default-src 'self'` 不允许 WASM,也不另加运行时。@@ -414,7 +421,7 @@## 已知限制- 主窗口在隐藏时启动 DSH 和 ds-bot。`dsBotApp.ready()`、#559 的重新挂载检查和系统按钮颜色的测量,都在看不见的窗口里跑,要在 M4 验证。-- 从没显示过的 Mica 窗口第一次 `show()` 时,可能先露出一两帧空的 Mica。交接时启动窗口已经长成同样大小的空 Mica,主窗口在它上面露面,这一两帧和下面的一样。M4 用 60 帧录像确认主窗口第一帧之前没有白帧或黑帧;有的话,改成主窗口先在长大后的启动窗口下面露面,画出第一帧再放到上面、销毁启动窗口。+- 从没显示过的 Mica 窗口第一次 `show()` 时,可能先露出一两帧空的 Mica。交接时启动窗口已经长成同样大小的 Mica,上面至多只有落在头像位置上的鲸鱼;主窗口在它上面露面,这一两帧和下面的一样,只是鲸鱼可能先不见一两帧,头像才出来。M4 用 60 帧录像确认主窗口第一帧之前没有白帧或黑帧;有的话,改成主窗口先在长大后的启动窗口下面露面,画出第一帧再放到上面、销毁启动窗口。- `#00000000` 的系统按钮颜色,只在一台 Windows 11(26200,深色,窗口不在前台)上验证过是透明的。前台、浅色、悬停和按下都没验证。按钮画成不透明的系统,改用不透明的 `--bt-main` 窗口。- 未打包、机器忙时实测:进程启动后 1.35–1.57 秒窗口才建好,页面第一次画出来还要再等 0.9–1.0 秒。启动页的第一帧和空窗口一模一样,这段看不出来,但入场会晚。- SVG 里的尾巴和眼睛、圆环的弧和弧上的光、喷出的水柱、内容的模糊淡入和流光不走合成线程。杀毒软件在扫描、引擎又在启动时,可能卡顿;那时先去掉尾巴。@@ -424,7 +431,9 @@- 启动时多一个渲染进程(约 40–60 MB),交接后销毁。- 从开始长大到启动窗口销毁的约 600 ms 里两个窗口同时存在,主窗口露面后的 300 ms 里两个都看得见。启动窗口在主窗口露面时才离开任务栏,任务栏按钮不会消失再出现;但那 300 ms 里 Alt+Tab 可能短暂看到两个。- 一般的首次启动里,数据阶段在页面画出来以前就结束了,第一段弧很少显示进行中:入场后 260 ms 直接画满。-- 庆祝的交接里主窗口在就绪后约 1.2 秒才露面,不庆祝的约 0.7 秒:长大要等页面空了才开始,主窗口长到位才显示。+- 庆祝的交接里主窗口在就绪后约 1.2 秒才露面,不庆祝的约 0.7 秒:长大要等页面上的字、圆环和纸面淡完才开始,主窗口长到位才显示。- 长大靠逐步 `setBounds`:页面每一步都重新排版,但只重画其中一部分,所以长大时纸面必须是空的;机器忙时长大不平滑。+- 鲸鱼跳向头像时,后一半是在窗口长大的那 300 ms 里飞的。它的动画走合成线程,但窗口一步一步长大,页面只在其中几步重画(探针里 23 步重画了 8 次),鲸鱼可能一顿一顿地动,机器忙时更明显。+- 鲸鱼的落点是侧栏调 `ready()` 那一刻量的:之后团队列要是还在动(列表滑动、宽度变化),落点会差几个像素。- 圆环的淡线(`--bt-line`)、进行中的淡蓝和水线(`--bt-line-2`)在真的 Mica 上看不看得清,还没验证:原型的截图用的是不透明的 `--bt-main` 背景。- 启动页的五个文件超过 45 KB 的预算(第 11 节,见「待定」)。\ No newline at end of filediff --git a/docs/plans/2026-10-26-windows-onboarding.md b/docs/plans/2026-10-26-windows-onboarding.mdindex 945ae13b..68b9f1dc 100644--- a/docs/plans/2026-10-26-windows-onboarding.md+++ b/docs/plans/2026-10-26-windows-onboarding.md@@ -2,7 +2,7 @@- 日期:2026-10-26- 相关:#523、#559、#384、#500、#551(PR #567)、#529、#561、#515、#423、#499、#428、#265;Discussions #530、#150-- 一起改:[桌面应用](2026-10-16-desktop-app.md)(结构、窗口、模型、首次启动和导入、改位置、安装和更新、暂时不做、已知限制)、[Bot 运行配置](2026-10-10-bot-runtime.md)(新 Bot 的模型来源、第一个 Main Bot 的开场白和那条已知限制)、[DSH 让步总账](2026-10-13-dsh-concessions.md)(预览版说明关不掉、设置卡借用 `settings.models.sign-in` 的操作、借 `settings.onboarding` 步骤打开「模型」)、[UI 标准](../design/ui-standard.md) 第 11 节(术语「提供商」);启动页的样子、鲸鱼的话和卡片的动作在 [启动窗口](2026-10-26-start-window.md),交接时启动窗口长成主窗口、鲸鱼在侧栏 Main Bot 的磁贴上浮上来在它的第 8 节,它和本文第 5、6 节一起改+- 一起改:[桌面应用](2026-10-16-desktop-app.md)(结构、窗口、模型、首次启动和导入、改位置、安装和更新、暂时不做、已知限制)、[Bot 运行配置](2026-10-10-bot-runtime.md)(新 Bot 的模型来源、第一个 Main Bot 的开场白和那条已知限制)、[DSH 让步总账](2026-10-13-dsh-concessions.md)(预览版说明关不掉、设置卡借用 `settings.models.sign-in` 的操作、借 `settings.onboarding` 步骤打开「模型」)、[UI 标准](../design/ui-standard.md) 第 11 节(术语「提供商」);启动页的样子、鲸鱼的话和卡片的动作在 [启动窗口](2026-10-26-start-window.md),交接时启动窗口长成主窗口、鲸鱼跳到侧栏 Main Bot 的头像上在它的第 8 节,它和本文第 5、6 节一起改- 代码:`app/src/main.mjs`、`first-run.mjs`、`import.mjs`、`updates.mjs`、`preload.cjs`、`host.mjs`、`host-process.mjs`、`downloads.mjs`、`move-data.mjs`、新的 `app/src/start/`;`app/electron-builder.yml`、`app/build/installer.nsh`;`ds-bot/index.js`;`ds-bot/src/client/model-menu.js`、`team-actions.js`、`sidebar.js`、`settings.js`、`diagnostics.js`、`i18n.js`、`ds-bot/src/client/index.js`;`ds-bot/src/host/models.js`、`roster.js`、`turns.js`、`providers.js`、`channel.js`、`parts.js`、`tools.js`;`.github/workflows/release.yml`、`.github/ISSUE_TEMPLATE/`;`README.md`、`README.zh.md`## 为什么@@ -94,7 +94,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装| 启动失败、团队界面没加载出来 | 「DeepSeek Bot 没能启动」「团队界面没有加载出来」 | 无 || 有卡片时 | 空着,由卡片自己的第一句说(15/20、600,在已定的文字上面):推荐盘「C 盘有点挤」(盘不够)或「这里不让我放东西」(没有写入权限),「会放在…」那张「我多加了一层文件夹」,被拒绝的「这里放不了」,找不到数据文件夹「数据不在原来的地方了」;导入的几张见第 4 节;失败的卡没有 | 隐藏 |-- 鲸鱼的话换句时淡出、淡入各 .16 s,不排队。失败时不画叉:鲸鱼失败的姿势、红的那段弧和那句话就是失败。鲸鱼沉下去、换个新文件夹重新开始时,三段弧从头开始。就绪时剩下的弧画满、圆环合上,鲸鱼喷一次水,潜下去。+- 鲸鱼的话换句时淡出、淡入各 .16 s,不排队。失败时不画叉:鲸鱼失败的姿势、红的那段弧和那句话就是失败。鲸鱼沉下去、换个新文件夹重新开始时,三段弧从头开始。就绪时剩下的弧画满、圆环合上,鲸鱼喷一次水,跳出水面,落到侧栏里 Main Bot 的头像上,没有地方落时潜下去(启动窗口第 8 节)。- **一般情况下什么都不问**,用默认位置,但页面上写着放在哪、能换:底注右边一行「数据放在 C 盘(剩 412 GB)· 换个位置…」([启动窗口](2026-10-26-start-window.md) 第 2、4、6 节),什么都不点就按它走;点「换个位置…」才开系统选择框,定根和下面「一个位置」一样,定好后引擎在新文件夹重新起、鲸鱼沉下去重新开始(启动窗口第 7 节),默认位置上这一次建的文件夹删掉。重装没有这一行,导入复制完以后收起。先看是不是重装(下一条),再看要不要出位置卡片。选位置的卡片只有推荐盘这一张,它上面的按钮都已经试写通过,不会点了再被拒绝;每张卡都说明以后在哪里改:- 数据所在的盘不到 5 GB(有团队要导入时,不到「5 GB + 导入卡上要多占的数」),而且有更好的盘:「C 盘只剩 1.2 GB。放到 D 盘(剩 412 GB)?」〔放到 D 盘〕〔仍然放在 C 盘〕,按钮行末尾一个小链接「其他位置…」。按 Enter 就是放到 D 盘。没有更好的盘就不出卡片,只在提示行写一句「C 盘只剩 1.2 GB」,照常启动。- 默认位置不能用(没有写入权限):第一句换成原因「DeepSeek Bot 没有权限在 `C:\Users\<用户名>` 里写文件。」,第二句一样;按钮只有〔放到 D 盘〕和小链接「其他位置…」,没有〔仍然放在 C 盘〕。没有可推荐的盘时只有〔选择其他位置…〕。@@ -113,7 +113,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装- 首次启动期间再双击图标:恢复并聚焦已有窗口,失败页上也一样。- 建窗口不再依赖「下载」文件夹:每次下载时才取它的位置,取不到就用家目录,再不行就不给默认位置,让用户自己选。- 日志:`%APPDATA%\DeepSeek Bot\logs\main.log`,2 MB × 3 份轮换,收主进程和引擎的输出;写之前去掉 `token=…`、`sk-…` 和 `/oauth/callback?…` 的查询部分,把用户文件夹的完整路径(如 `C:\Users\<用户名>`)换成 `%USERPROFILE%`。-- 启动页是纯 DOM,CSP `default-src 'self'`;颜色取 [UI 标准](../design/ui-standard.md) 2.1 节 DeepSeek 主题的值,字号用标准里的 13 / 14 / 15 px。它只拿到 `dsBotStart`(`onState`、`act`),只在页面地址正好是启动页文件时才暴露。引擎页面上的 `dsBotApp` 只新增 `ready()`(上面的 20 秒检查)、`focus()`(第 5 节退回系统浏览器登录时回到前台)、`signIn`(第 5 节的登录窗口:`onClosed(原因, 代理)`、`close()`、`openOutside`)和 `foundKeys()` / `takeKey()`(第 5 节现成的 Key),以及主窗口露面时发给页面的一个事件(侧栏磁贴上的鲸鱼靠它浮上来,[启动窗口](2026-10-26-start-window.md) 第 8 节,待定),其余不变;新增的这些只在引擎的页面上、只对主窗口的主框架暴露。主进程对两者分别做精确的来源检查。+- 启动页是纯 DOM,CSP `default-src 'self'`;颜色取 [UI 标准](../design/ui-standard.md) 2.1 节 DeepSeek 主题的值,字号用标准里的 13 / 14 / 15 px。它只拿到 `dsBotStart`(`onState`、`act`),只在页面地址正好是启动页文件时才暴露。引擎页面上的 `dsBotApp` 只新增 `ready()`(上面的 20 秒检查;它同时带上 Main Bot 的头像在页面上画在哪里,给启动窗口的鲸鱼落脚,[启动窗口](2026-10-26-start-window.md) 第 8 节)、`focus()`(第 5 节退回系统浏览器登录时回到前台)、`signIn`(第 5 节的登录窗口:`onClosed(原因, 代理)`、`close()`、`openOutside`)和 `foundKeys()` / `takeKey()`(第 5 节现成的 Key),其余不变;新增的这些只在引擎的页面上、只对主窗口的主框架暴露。主进程对两者分别做精确的来源检查。- `DS_BOT_HOME` 的一次性运行照旧:不问、不导入,但也显示启动页和失败页。### 4. 已有 DSH 团队:导入卡@@ -147,7 +147,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装设置卡是插件的功能,桌面应用、DSH Desktop 和 DSH Web 里都有,下面没注明的地方各形态一样;登录窗口和现成的 Key 一键用要靠应用(`dsBotApp`),只在桌面应用里。-- 桌面应用首次启动交接后,Main Bot 的鲸鱼在侧栏的磁贴上浮上来一次([启动窗口](2026-10-26-start-window.md) 第 8 节),随后是下面的气泡和设置卡。设置卡的检查、通过和失败驱动磁贴上鲸鱼已有的状态动作(检查时是搜索,通过时是完成);指针在侧栏里时它的眼睛跟着指针(安静档没有);减少动态效果时它不动,只有徽标。+- 桌面应用交接时,启动窗口的鲸鱼跳到侧栏里 Main Bot 的磁贴上,落在头像的位置,主窗口露面时头像正好在它下面(Main Bot 是默认的鲸鱼、团队列看得见时,每种启动都这样;[启动窗口](2026-10-26-start-window.md) 第 8 节);首次启动随后是下面的气泡和设置卡。设置卡的检查、通过和失败驱动磁贴上鲸鱼已有的状态动作(检查时是搜索,通过时是完成);指针在侧栏里时它的眼睛跟着指针(安静档没有);减少动态效果时它不动,只有徽标。- Main Bot 还没有能用的模型时,它的聊天里不再是三个按钮,而是一张卡片(按 UI 标准里提问卡的样式):- 气泡:「你好,我是{名字},负责管理你的 Bot 团队。开始之前,我需要先接上一个模型。选一种方式:」- A「用 DeepSeek 账号登录」,标「推荐」:「不用管理 API Key。没有账号的话,在登录页用手机号就能注册。费用从账号余额里扣;新账号如果有赠送额度,登录后会显示在这里。」主按钮在桌面应用里是〔登录 DeepSeek 账号〕,在 DSH Desktop 和 DSH Web 里是〔在浏览器中登录〕。profile 里没有 DeepSeek 账号功能时不显示 A。@@ -266,7 +266,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装### 8. 以后的启动和回头入口-- 以后每次启动也显示启动页,和首次启动同一个样子:112 px 的鲸鱼和三段弧的圆环,顺利时没有字,也没有底注和位置行;45 秒起鲸鱼说「比平时慢,请再等一会儿」,提示行只有〔打开日志文件夹〕,180 秒和首次启动一样;就绪时不庆祝,圆环合上,鲸鱼直接潜下去([启动窗口](2026-10-26-start-window.md) 第 5 节)。然后打开上次的 Bot(预计 3 到 12 秒,以后的启动还没实测)。+- 以后每次启动也显示启动页,和首次启动同一个样子:112 px 的鲸鱼和三段弧的圆环,顺利时没有字,也没有底注和位置行;45 秒起鲸鱼说「比平时慢,请再等一会儿」,提示行只有〔打开日志文件夹〕,180 秒和首次启动一样;就绪时不庆祝,圆环合上,鲸鱼直接跳到侧栏里 Main Bot 的头像上,没有地方落时潜下去([启动窗口](2026-10-26-start-window.md) 第 5、8 节)。然后打开上次的 Bot(预计 3 到 12 秒,以后的启动还没实测)。- 设置卡由状态决定:没有能用的模型(跳过过、删了 key、退出了登录),Main Bot 的设置卡就回来;账号登录过期时显示「DeepSeek 账号的登录失效了。」〔重新登录〕(桌面应用里同样在登录窗口里登录)。- 目标卡、建议卡和第一件事卡(第 6 节)只在新团队接上模型、上手还没结束时出现。上手结束看 Main Bot 的会话:里面有那行「上手结束」的灰字、或者有用户自己发的消息(第一件事也是),就算结束,从会话里读,不另存标记;结束以后它们不再回来,设置卡回来时也不带它们。上手中途关了应用、或者模型没了:重开或重新接上模型后从目标卡重新开始,开场白不再发,已经建好的 Bot 留着,`restrict` 和 guard 重新挂上(它们只在内存里),「模型请求 n/3」从 0 算起。导入来的团队从来不出。- DS Bot 设置 → 模型在所有形态里都有(在 `team-actions.js` 里接上插件 Host 已有的 `providers`、`provider-key` 等接口,今天只有停用的 `app/ui` 接了),显示每个提供商的 key 状态(「已设置 Key」「需要 API Key」「Key 来自 DS Bot 之外」)和「添加提供商」。原来的「Harness 设置」改叫「高级设置(DeepSeek Harness)」。@@ -318,7 +318,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装| 同上「模型服务商和 key 在 DSH 自己的设置里配」 | 在 Main Bot 的设置卡和 DS Bot 设置 → 模型里配(仍写进 DSH 的凭据和设置);应用关掉 DSH 的自动凭据引导;DSH 的模型页放在「高级设置(DeepSeek Harness)」 || 同上 变更 2026-10-20「DSH 打开的登录窗口交给系统浏览器」 | 桌面应用里登录页在应用自己建的登录窗口里打开(主窗口的子窗口,独立的不持久 partition,关窗就清掉,只允许 DeepSeek 的页面和引擎的回调);DSH 开的空白弹窗照旧允许、一直隐藏,只当它手里的句柄,两个窗口同生同灭;回调一回应就关掉;打不开或主框架要离开 DeepSeek 时才退回系统浏览器。DSH Desktop 和 DSH Web 不变 || 本文首稿 §5「点按钮就在系统浏览器打开 DeepSeek 登录页……登录完成后窗口自动回到前台」 | 同上;`dsBotApp.focus()` 只在退回系统浏览器时用 |-| 本文首稿 §3「`dsBotApp` 只新增 `ready()`……和 `focus()`……」 | 再加 `signIn`(`onClosed(原因, 代理)`、`close()`、`openOutside`)和 `foundKeys()` / `takeKey()`,以及主窗口露面的事件(待定),都只在引擎的页面上、只对主窗口的主框架暴露 |+| 本文首稿 §3「`dsBotApp` 只新增 `ready()`……和 `focus()`……」 | 再加 `signIn`(`onClosed(原因, 代理)`、`close()`、`openOutside`)和 `foundKeys()` / `takeKey()`,以及主窗口露面的事件(待定),都只在引擎的页面上、只对主窗口的主框架暴露。2026-10-30 起露面的事件不做了:鲸鱼在启动窗口里落到磁贴上,Main Bot 头像的位置随 `ready()` 带来([启动窗口](2026-10-26-start-window.md) 第 8 节) || 同上「暂时不做」:DS Bot 自己的界面先停下 | `app/ui` 仍然停着;应用只画启动、导入、失败这几页,不画 Bot 界面 || 同上「改位置」:总工作区和数据位置各自更换,换总工作区时旧文件夹里的文件不动 | 「位置」一处〔移到…〕:停引擎,同一个卷上改名,不同的卷上数据经暂存复制到新位置、重启后总工作区的文件也后台复制过去(原来不复制),用总工作区的 Bot 和群在下一个回合换段;单独换其中一个在「高级」里;加「从 DeepSeek Harness 复制团队…」、后台复制工作文件的进度、〔停止〕和〔继续复制〕、「用新的空白团队开始…」 || 同上「换数据位置」:「旧数据文件夹原样保留,用户确认没问题后自己删」;「换总工作区」:旧文件夹和里面的文件不动 | 搬是搬,只搬应用自己建的文件夹:新引擎 `ready` 之后删掉旧的数据文件夹(和卸载同一张清单),工作文件逐个落位后删原件,只留跳过的;用户自己挑的现成文件夹原样保留,只是团队改用新的;「搬到一半」的记录让没搬完的退回;确认里写明会删什么。空间不再占两份 |@@ -344,6 +344,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装| 同上「文字都是鲸鱼在说,一次一句短话」和首次启动的话和提示那张表:问候「嗨,我是{名字}」,「先找个地方放东西」「找到了」「热身中,等我一下」「第一次会慢一点」「开门去了」「进去吧」;提示行的「待会儿要接一个模型:DeepSeek 账号或 API Key」「里面先有一页说明,点「继续」就行」「上次的 6 个 Bot 和 2 个群聊都在」;「取舍」的「期间在启动页上先提醒一句」;验收里话的顺序、300 ms 的停留和第 2 站的提示 | 顺利时没有字:鲸鱼只在 45 秒、180 秒和失败时说话,提示行只有盘不够时前 10 秒的那句和 45 秒起的〔打开日志文件夹〕;就绪时圆环合上,鲸鱼喷水、潜下去;验收跟着改。讨论里:「其实我觉得可能就放一个鲸鱼就够,然后可以做交互动画,文字什么的不太需要」。接模型由进门后的设置卡说,预览版说明自己有〔继续〕,重装进门就是原来的团队:这几句都不是等不了的事 || 本文 2026-10-28 §8 以后的启动「64 px 的鲸鱼和『正在打开你的团队…』」,10 秒起「已用 N 秒」,45 秒「比平时慢,请再等一会儿」在提示行 | 和首次启动同一个样子(112 px 的鲸鱼、圆环、水线),顺利时没有字;45 秒起鲸鱼说「比平时慢,请再等一会儿」,提示行只有〔打开日志文件夹〕;就绪时不庆祝,圆环合上、鲸鱼潜下去([启动窗口](2026-10-26-start-window.md) 第 5 节)。圆环已经说了在打开,以后的启动只要 3 到 12 秒 || 本文 2026-10-28:首次启动 `handoffShow` 约 1.1 秒、主窗口约 1.6 秒可见,以后的启动约 0.6 秒;验收从鲸鱼停到第 3 站算,`handoffShow` 1.3 秒内、主窗口 2 秒内(鲸鱼还在游的最多各晚 600 ms) | 庆祝的交接(首次启动,重试或重新开始后第一次成功)`handoffShow` 在就绪后 0.72 秒、主窗口约 1.2 秒可见;其余以后的启动 0.22 秒、约 0.7 秒;兜底不变(2.5 秒、0.8 秒)。验收从 `ready()` 算(入场还没到位时从到位算):庆祝的交接 `handoffShow` 1 秒内、主窗口 1.5 秒内,其余 0.5 秒内、1 秒内。没有「进去吧」要读,交接不再等字,也没有排队的游动 |+| 本文 2026-10-28 §5「桌面应用首次启动交接后,Main Bot 的鲸鱼在侧栏的磁贴上浮上来一次」,§3 `dsBotApp` 列表里「主窗口露面时发给页面的一个事件」(待定);§3、§8 就绪时鲸鱼潜下去 | 交接时启动窗口的鲸鱼跳出水面,落到侧栏里 Main Bot 的头像上,主窗口露面时头像正好在它下面,每种启动都这样;头像的位置随 `ready()` 带来,没有露面事件,磁贴上的鲸鱼不另做动画;没有地方落时照旧潜下去([启动窗口](2026-10-26-start-window.md) 第 8 节,那里记过这一行)。维护者 2026-10-30:「启动之后流畅变形为主页面,Chief跳到主页左侧的Chief位置」 |实现各批时,同步改写上面几份文档里对应的规则本身(「已定的行为」写现在的行为,不只是在末尾追加),并在它们的「变更」里写一条;新的 DSH 让步记进 [DSH 让步总账](2026-10-13-dsh-concessions.md),「提供商」记进 [UI 标准](../design/ui-standard.md) 第 11 节的术语表。@@ -375,7 +376,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装| M1 去掉死路 | 应用:「下载」文件夹兜底;`credentialOnboarding: false`;`focusWindow` 在失败时也能聚焦;导入的锁判断、失败清理暂存、`room.id`(合 #567)、不覆盖已有 key。插件:在所有形态接上提供商接口(模型页和 key 卡片活过来);key 卡片加「去创建 Key」链接和余额说明;默认模型只从能用的里选;先打字不再删开场白;`bot.blocked` 和 Bot 聊天的修复卡,「重试」不重发;鲸鱼菜单加「模型和 API Key」「登录」;「高级设置」改名,DSH 设置直接落在「模型」页。文档和发版:README 双语下载区和信任说明、安装问题表单、Release 下载表、`SHA256SUMS` 和固定文件名(README 先链到 `releases/latest` 页面)、最后才标为 Latest | 约 4 人日 || M2 Main Bot 聊天里的第一条回复 | 设置卡:登录窗口(应用:接住 `about:blank` 并一直隐藏、拦下它的第一次导航、自己建的子窗口和不持久的 partition、关窗清掉 partition、只管主框架的允许名单、权限和下载一律拒绝、回调关窗(不看状态码)、两个窗口同生同灭、`onClosed` 带原因和代理(加载失败时由主进程 `resolveProxy` 取)、主框架加载失败时关窗并报 `failed`、窗口里的 `window.open` 分流、固定的标题和尺寸、交给浏览器时关窗、`openOutside`、日志不记地址;插件:按形态的按钮和文案、打不开时的卡(〔重试〕〔在浏览器里打开〕〔取消〕和系统代理的提示)、交给浏览器之后的卡、`onClosed('user')` 且还在等浏览器时 `cancel`、登录结束时 `close()`、修复卡和鲸鱼菜单那条路也一样)、退回时的回到前台(`dsBotApp.focus()`)、余额和赠送额度、充值后自动重查;现成的 Key 一键用(应用:`foundKeys()` / `takeKey()`,读 DeepSeek Harness 的家(`DSH_HOME` 或 `~\.dsh`)里的 `.credentials.yaml` 和 `.env`,那里设了别的 DeepSeek 地址时不出、设置卡期间读剪贴板(如果定下来)、主进程里比对两处的值;插件:一行一个主按钮、A 改次按钮、来源提示);粘贴 key 时的余额检查(mock 模型提供 `sk-test-ok` / `sk-test-bad` / `sk-test-empty`,另认三把 DeepSeek 格式的 Key:`sk-` 加 32 位十六进制,末四位 `0001` 的能用、`0401` 的报 401、`0000` 的余额为零;`sk-test-*` 不合掩码认 Key 的规则,剪贴板和聊天里粘贴的用例用这三把);聊天里粘贴的 Key(观察输入稿、和模型锁合算的一个 block、按状态选文案的卡、〔保存到提供商…〕打开填好 Key 的添加表单、〔填进那张卡〕、〔清掉〕和「改一下」、走输入框自己的 `submit()`);插件 Host 侧的「能用」检查和自动选模型;「已接上 · 更换」;输入框锁定;工作文件夹行;中文默认名字(如果定下来)。上手的后半段:固定的开场白(`llm/stream` 监听里直接回);目标卡(多选、〔确定〕、自由输入、〔跳过〕给三个固定任务)和合并;一次不带工具的 JSON 调用(固定提示词、带 `goal` 的闭合 schema、`maxTokens` 700、12 秒超时);目标卡输入框里的 Key;建议卡(勾选、改名、〔只要…〕、〔换一组建议〕和 3 次的上限、「模型请求 n/3」)、建 Bot(固定的招呼)、第一件事卡和上手结束的灰字;深度限制(Host 里的步骤表、`tools.restrict({ allow })` 只留 `ask_user` 和输入稿模式的 `create_bot`、第一件事发出时解除、`tools.guard` 限次数、每一步的 token 和时限、兜底卡);上手结束从会话里读、中途重开从目标卡重新开始。CI:loopback 上的假 DeepSeek 平台(DSH 的 `platformOrigin` 和 `allowLoopbackHttp`)驱动登录窗口,一次性用户的假 DSH 家和剪贴板替身;mock 模型跑上手的八种情况(正常、断网、来回循环、答非所问、编造模型名、401、余额为零、把 Key 粘进目标卡的输入框) | 约 13 人日(原来 8:目标卡、合并和 JSON 调用约 2,建议卡、建 Bot 和第一件事卡约 1.5,深度限制和兜底卡约 1,mock 模型的八种情况约 0.5) || M3 国内能下、一键安装、卸载说清楚 | 镜像发布和镜像优先的更新(随应用启动、首次启动和导入时不弹重启、可取消的下载、60 秒无数据换源、百分比);一键安装;卸载时的问题、`locations.ini`、标记文件;CI:一键升级覆盖旧的自定义目录、交互式卸载(UI Automation 答「否」和「是」)、固定链接检查;README 换成固定下载链接,加「卸载和重置」 | 约 5 人日 |-| M4 窗口先出来:启动页、卡片和恢复页 | 启动页(圆环即进度:三段弧和合上的整圈、只在要用户知道时说的话、提示行、点鲸鱼喷水、读屏的「启动进度」列表、卡片的第一句)、鲸鱼更有反应的九种动作(探身、呼吸、眨眼、回到窗口时看你、眼睛跟着键盘焦点、按下预备、活泼档越跳越稀、潜得更深、张望)、它的 IPC 和来源检查、中英文案;`main.mjs` 重排;交接时启动窗口长成主窗口(主窗口先隐藏着建在最终的矩形上,主进程约 300 ms 里逐步 `setBounds`,主窗口在同一个矩形上露面,首次启动 2.5 秒的兜底)和侧栏磁贴上的鲸鱼(浮上来一次,设置卡驱动它的状态动作,第 5 节);位置检查、推荐盘、一个位置的布局和确认、重装不问;失败页和 180 秒的问题;日志;`dsBotApp.ready()` 和 20 秒界面检查;#559。CI:打包后的首次启动,用名为「测试 用户」、没有「下载」文件夹、没有 `~/.dsh` 的一次性用户,经 CDP 驱动启动页,逐个状态检查中英文在 720 × 540 和 720 × 500 下没有折行和截断,量交接的时间和中间尺寸,并检查日志里没有 key、token 和用户名 | 约 10 人日(原来 7:圆环即进度的布局、喷水和读屏约 1,交接时窗口长大和兜底计时约 1,九种动作和磁贴上的鲸鱼约 1) |+| M4 窗口先出来:启动页、卡片和恢复页 | 启动页(圆环即进度:三段弧和合上的整圈、只在要用户知道时说的话、提示行、点鲸鱼喷水、读屏的「启动进度」列表、卡片的第一句)、鲸鱼更有反应的九种动作(探身、呼吸、眨眼、回到窗口时看你、眼睛跟着键盘焦点、按下预备、活泼档越跳越稀、潜得更深、张望)、它的 IPC 和来源检查、中英文案;`main.mjs` 重排;交接时启动窗口长成主窗口(主窗口先隐藏着建在最终的矩形上,主进程约 300 ms 里逐步 `setBounds`,主窗口在同一个矩形上露面,首次启动 2.5 秒的兜底)、鲸鱼跳到侧栏 Main Bot 的头像上(侧栏在 `ready()` 里报头像的位置,[启动窗口](2026-10-26-start-window.md) 第 8 节)和磁贴上的鲸鱼(设置卡驱动它的状态动作,第 5 节);位置检查、推荐盘、一个位置的布局和确认、重装不问;失败页和 180 秒的问题;日志;`dsBotApp.ready()` 和 20 秒界面检查;#559。CI:打包后的首次启动,用名为「测试 用户」、没有「下载」文件夹、没有 `~/.dsh` 的一次性用户,经 CDP 驱动启动页,逐个状态检查中英文在 720 × 540 和 720 × 500 下没有折行和截断,量交接的时间和中间尺寸,并检查日志里没有 key、token 和用户名 | 约 10 人日(原来 7:圆环即进度的布局、喷水和读屏约 1,交接时窗口长大和兜底计时约 1,九种动作、跳到头像上和磁贴上的鲸鱼约 1) || M5 启动页上的导入 | 一句话的导入卡和折叠的详情(预览、大小、可跳过的文件夹);卡片一出现就检查对话和预热引擎,「先不复制」不重启引擎;自动重查占用;新版本对话走「更新后再复制」;第一段的空间检查、进度和停止;工作文件在团队打开后后台复制,设置里的进度、停止、续复制;设置里的再次导入;导入后的检查卡和 Main Bot 提前换段(#384)。CI 用假的 `~/.dsh`(含 junction、新版本对话、PID 被重用的旧锁、群聊、大 `node_modules`) | 约 5 人日 || M6 第一个小时和回头入口 | 系统代理和网络设置;沙盒失败提示(#523);PowerShell 5.1 说明;GitHub 代理提示;关窗提醒(#500);保存诊断信息;「DeepSeek Bot 应用」形态;设置里「位置」一处〔移到…〕一起搬、「高级」里分开换;「用新的空白团队开始」 | 约 4 人日 || M7 签名 | 签名钩子、`publisherName`;README 的信任说明缩成杀毒软件一条;winget 清单 | 约 2–3 人日,加外部审批 |@@ -461,7 +462,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装- 开场白是固定文字,不再花钱,但也说不出任何只有模型才知道的东西。- 上手里模型的那一步比卡片慢:真实的网络往返,最坏 12 秒才出兜底卡(8 秒内来了第一个字、之后停住的);它先花钱(只在用户写了字或要换一组时),才见效果;措辞每次不一样,CI 只能测结构。- 合并后的第一件事偏向前两个目标:三个以上目标时,后面的目标没有第一件事;勾掉前面的 Bot 时,用三个固定任务补满,不用后面 Bot 的任务(怎么分见「待定」)。-- 首次启动主窗口在就绪后约 1.2 秒才露面(原来约 620 ms),以后的启动约 0.7 秒(原来 120 ms):多出来的主要是等页面空下来再长大的约 460 ms。+- 首次启动主窗口在就绪后约 1.2 秒才露面(原来约 620 ms),以后的启动约 0.7 秒(原来 120 ms):多出来的主要是等页面上的字和圆环淡完再长大的约 460 ms。- Bot 聊天里余额不足时,DSH 自己的余额提示(不分 Session)会和修复卡同时出现。- 中文默认名字看的是第一次请求时的界面语言;DSH 存的语言偏好还没加载完时,它可能还是浏览器的语言,所以浏览器是英文、DSH 设成中文时,新团队仍可能叫 Chief。桌面应用里全新的数据位置以系统界面语言为准。- 退回系统浏览器登录时,Windows 的前台规则可能不让窗口在登录后回到前台,这时只能靠任务栏闪烁和卡片自己的「已登录」状态。@@ -494,3 +495,4 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装- 2026-10-28(第二次):落地 M4 第一批时维护者看到首次启动仍弹「欢迎使用 DeepSeek Bot」的系统对话框(「我主要不喜欢这个」),要求「给出建议,同时提供自行选择的接口,避免小弹窗」:§3 的「什么都不问」补上启动页底注右边的位置行「数据放在 C 盘(剩 412 GB)· 换个位置…」,点了才开系统选择框,定根和「一个位置」一样,被拒绝的原因加上 DSH 的家和程序文件夹,定好后引擎在新文件夹重新起(启动窗口稿第 2、4、6、7 节);验收加一条。导入问题在 M5 的导入卡落地前仍是挂在启动窗口上的对话框。- 2026-10-29:启动页的文案分层,写进 [启动页文案](2026-10-29-start-copy.md);按各层的写法规则改了本文引用的四处:§3「团队界面没有加载出来」、§8 45 秒的「比平时慢,请再等一会儿」去句号,§3「会放在 `D:\DeepSeek Bot`。」加句号、〔重新选…〕加 …(被拒绝的卡也一样),§4 更新版本那张卡的脚注改成「以后可以在 设置 → 通用 → 位置 里复制。」,和「以后可以在 … 里改。」同一个句式;「用词」加一条指向它。- 2026-10-30:维护者转来一段讨论,说启动窗口太吵(「现在这版有点噪了」「是不是可以简约一点」「其实我觉得可能就放一个鲸鱼就够,然后可以做交互动画,文字什么的不太需要」),提议只留一只浮在水上、点一下会喷水的鲸鱼,进度做成横条或圆环;比较三份草稿(水线分三段的进度条、圆环、只有鲸鱼)后选了圆环。§3 的启动页改成「圆环就是进度」和「顺利时没有字」,话和提示的表只剩盘不够、45 秒、180 秒、失败和卡片;重装、接模型和预览版说明不在启动页上提前说(「取舍」和已知限制跟着改);§8 以后的启动和首次启动同一个样子,没有字;「用词」的圈换成圆环和弧,鲸鱼的话只在这几种时候有;验收(启动页、交接、重装)、M4、「待定」的水线和已知限制里的露面时间跟着改。细节在 [启动窗口](2026-10-26-start-window.md) 同一天的变更里。依据:原型的圆环布局(82 个状态的截图都过了布局探针,没有问题)和 `ring-live.cjs`(首次启动 `handoffShow` 在就绪后 0.72 秒,原来 1.09 到 1.17 秒;以后的启动 0.23 到 0.33 秒)。评审后补正:M4 写九种动作,补上 2026-10-28 加的张望,估计里的布局一项改叫圆环即进度。+- 2026-10-30 跳到 Chief:维护者要「启动之后流畅变形为主页面,Chief跳到主页左侧的Chief位置」。交接时启动窗口的鲸鱼不再潜下去,而是跳出水面,落到侧栏里 Main Bot 的头像上,主窗口在同一个矩形上露面(§3、§5、§8、M4);`ready()` 同时带上 Main Bot 头像的位置,主窗口露面的事件不做了(§3 的 `dsBotApp` 列表),磁贴上的鲸鱼也不另浮上来(§5),「改动的已定设计」加一行,§3 那一行记录补一句;文件头的「一起改」和已知限制里露面时间那一条的说法跟着改。同一次提的「正在做的事情的简单描述」随后被维护者收回(「文案保持取消状态」),启动页顺利时仍然没有字。细节和依据在 [启动窗口](2026-10-26-start-window.md) 同一天「跳到 Chief」那条变更里。diff --git a/docs/plans/README.md b/docs/plans/README.mdindex 66a10f7d..27335b1b 100644--- a/docs/plans/README.md+++ b/docs/plans/README.md@@ -52,7 +52,7 @@| [Side chat(侧边对话)](2026-10-21-btw.md) | 人顺带问一句:侧栏里的常驻对话,以与会话同构的请求回答、不执行工具、不打断、不进模型可见历史;可追问、可开多条;Bot 之间的 `ask_bot` 另行提案 || [消息布局和宽度](2026-10-22-message-layout.md) | 气泡 / 平铺两种布局;平铺时 Bot 的话带头像、名字、时间;气泡宽度和平铺正文宽度各用一个滑块,按正文列的百分比调 || [Windows 上手流程](2026-10-26-windows-onboarding.md) | 从下载到第一条回复:下载区和信任说明、安装、窗口先出来的启动页、一个位置和推荐盘、启动页上的一键导入、Main Bot 聊天里的模型设置卡(登录或检查过的 key、自动选模型)、修复卡、第一个小时的 Windows 问题、卸载时问一次 |-| [启动窗口](2026-10-26-start-window.md) | 启动页的样子和动作:单独的小窗口(待定),Main Bot 的鲸鱼浮在水线上,围着它三段弧的圆环就是三个真实阶段,顺利时没有字,点它会喷水;等待越久越慢,卡片和失败页在同一张纸面上变形,就绪时圆环合上、鲸鱼潜下去、团队窗口盖上来 |+| [启动窗口](2026-10-26-start-window.md) | 启动页的样子和动作:单独的小窗口(待定),Main Bot 的鲸鱼浮在水线上,围着它三段弧的圆环就是三个真实阶段,顺利时没有字,点它会喷水;等待越久越慢,卡片和失败页在同一张纸面上变形,就绪时圆环合上、鲸鱼跳到团队窗口里 Main Bot 的头像上、团队窗口在同一处盖上来 || [启动页文案](2026-10-29-start-copy.md) | 启动页和壳里系统对话框的字:按页面位置分层,每层一条写法规则;`text.mjs` 一张表、旧键到新键的对照、扫全表的测试 || [手机 App](2026-10-24-mobile-app.md) | iOS 和 Android 远程操控电脑上的 Bot 团队:手机不跑 Agent;扫码配对、端到端加密、电脑只往外连;完整功能,高权限操作要解锁手机 || [Office 文档](2026-10-27-office-documents.md) | Bot 离线处理 .docx/.pptx/.xlsx:应用带的 payload、`office.js` 命令行、office 路由换成带 `office-tools` 的版本 |diff --git a/ds-bot/client.js b/ds-bot/client.jsindex 0256a5af..1b9115a9 100644--- a/ds-bot/client.js+++ b/ds-bot/client.js@@ -9603,7 +9603,7 @@ function TeamSidebar(props) {const main = roster.byId[roster.mainBotId];useListGlide(listRef, wideContent, order.map((entry) => entry.item.id).join(","));useLandOnMainBot(roster, useSessions, actions);- useReportReady(roster.ready);+ useReportReady(roster.ready, roster);const openWidth = drag?.width ?? frameSnap.sidebarWidth;const ourWidth = mode === "rail" ? RAIL_WIDTH : openWidth;const pushed = mode === "open" ? openWidth : mode === "hidden" ? 0 : RAIL_WIDTH;@@ -10139,13 +10139,35 @@ function AccountLauncher({ seat = true, settingsOpen, openSettings, openOnboardi);}var readyReported = false;-function useReportReady(drawn) {+function useReportReady(drawn, roster) {(0, import_react18.useEffect)(() => {if (!drawn || readyReported) return;readyReported = true;- void Promise.resolve().then(() => globalThis.dsBotApp?.ready?.()).catch(quietly("app ready"));+ void Promise.resolve().then(() => {+ const ready = globalThis.dsBotApp?.ready;+ if (typeof ready !== "function") return void 0;+ let place;+ try {+ place = mainAvatarPlace(roster);+ } catch {+ place = void 0;+ }+ return place === void 0 ? ready() : ready(place);+ }).catch(quietly("app ready"));}, [drawn]);}+function mainAvatarPlace(roster) {+ const main = roster?.byId?.[roster.mainBotId];+ if (main === void 0 || main.avatar?.image || typeof document === "undefined") return void 0;+ const look = lookOf(main);+ if (look.shape !== MAIN_LOOK.shape || look.color !== MAIN_LOOK.color) return void 0;+ const id = typeof CSS !== "undefined" && CSS.escape ? CSS.escape(main.id) : main.id;+ const mark = document.querySelector(`.bt-side [data-bot-id="${id}"] .bt-mark`);+ if (!mark || mark.checkVisibility?.({ visibilityProperty: true }) === false) return void 0;+ const box = mark.getBoundingClientRect();+ const view = document.documentElement;+ return { x: box.left, y: box.top, width: box.width, height: box.height, viewportWidth: globalThis.innerWidth ?? view.clientWidth, viewportHeight: globalThis.innerHeight ?? view.clientHeight };+}function useLandOnMainBot(roster, useSessions, actions) {const mainView = useSessions((list) => {const row = Object.values(list.byId).find((session) => (session?.retainedBy?.mainView ?? 0) > 0);diff --git a/ds-bot/src/client/sidebar.js b/ds-bot/src/client/sidebar.jsindex 539e436d..66b31856 100644--- a/ds-bot/src/client/sidebar.js+++ b/ds-bot/src/client/sidebar.js@@ -4,7 +4,7 @@ import { FishLogo } from './dsh-primitives.js'import { isMainOf } from './sources.js'import { currentPart, previewOf, relativeShort } from './text.js'import { PlusIcon, SearchIcon, SidebarIcon, GaugeIcon, ClockIcon, GearIcon, PinMarkIcon, ConnectorIcon, SwitchIcon, CloudDownloadIcon, SignInIcon, SignOutIcon, SlidersIcon } from './icons.js'-import { MAIN_LOOK } from './characters.js'+import { lookOf, MAIN_LOOK } from './characters.js'import { botState, BotMark, BotAvatar, RoomAvatar } from './mark.js'import { reducedMotion } from './activity-row.js'import { Shimmer, workPhrase } from './cells.js'@@ -323,7 +323,7 @@ export function TeamSidebar(props) {const main = roster.byId[roster.mainBotId]useListGlide(listRef, wideContent, order.map(entry => entry.item.id).join(','))useLandOnMainBot(roster, useSessions, actions)- useReportReady(roster.ready)+ useReportReady(roster.ready, roster)// Our column pushes the conversation over by what it takes beyond the shell's// collapsed track; a drawer floats over the rail's place, so it pushes as much@@ -814,16 +814,41 @@ export function AccountLauncher({ seat = true, settingsOpen, openSettings, openO}// The desktop app keeps its main window hidden until the team interface has drawn-// the first state, and shows its failure page when that never comes.+// the first state, and shows its failure page when that never comes. The report+// says where the Main Bot's avatar is when it wears the start window's whale: the+// whale there jumps onto it as the team window takes over.let readyReported = false-function useReportReady(drawn) {+function useReportReady(drawn, roster) {useEffect(() => {if (!drawn || readyReported) returnreadyReported = true- void Promise.resolve().then(() => globalThis.dsBotApp?.ready?.()).catch(quietly('app ready'))+ void Promise.resolve().then(() => {+ const ready = globalThis.dsBotApp?.ready+ if (typeof ready !== 'function') return undefined+ // The place is a nicety: whatever goes wrong measuring it, the report still goes.+ let place+ try { place = mainAvatarPlace(roster) } catch { place = undefined }+ return place === undefined ? ready() : ready(place)+ }).catch(quietly('app ready'))}, [drawn])}+// The Main Bot's avatar in the team column, in CSS px of the page, with the page's size.+// Only the default look: a photo or another character would not match the start window's whale.+function mainAvatarPlace(roster) {+ const main = roster?.byId?.[roster.mainBotId]+ if (main === undefined || main.avatar?.image || typeof document === 'undefined') return undefined+ const look = lookOf(main)+ if (look.shape !== MAIN_LOOK.shape || look.color !== MAIN_LOOK.color) return undefined+ const id = typeof CSS !== 'undefined' && CSS.escape ? CSS.escape(main.id) : main.id+ const mark = document.querySelector(`.bt-side [data-bot-id="${id}"] .bt-mark`)+ // Not the opacity: the column fades in as it first draws, which is when this is measured.+ if (!mark || mark.checkVisibility?.({ visibilityProperty: true }) === false) return undefined+ const box = mark.getBoundingClientRect()+ const view = document.documentElement+ return { x: box.left, y: box.top, width: box.width, height: box.height, viewportWidth: globalThis.innerWidth ?? view.clientWidth, viewportHeight: globalThis.innerHeight ?? view.clientHeight }+}+// Opens the Main Bot whenever the main view holds no Bot conversation, the way// The view always lands on a Bot rather than an empty New Session page.// When a Bot's chat moves on to a fresh part, the shell clears the view of the partdiff --git a/ds-bot/test/app-ready.test.js b/ds-bot/test/app-ready.test.jsindex 08556ac9..65765a9d 100644--- a/ds-bot/test/app-ready.test.js+++ b/ds-bot/test/app-ready.test.js@@ -50,13 +50,13 @@ function mount(component) {}// One page load: a fresh copy of the client modules, under the app bridge it was given.-function page(dsBotApp) {+function page(dsBotApp, documentStub = {}) {const module = { exports: {} }runInNewContext(outputFiles[0].text, {module, exports: module.exports,require: name => (name === 'react' ? react : {}),window: { innerWidth: 1280, addEventListener() {}, removeEventListener() {} },- document: { addEventListener() {}, removeEventListener() {}, querySelector: () => null, documentElement: { setAttribute() {}, removeAttribute() {} } },+ document: { addEventListener() {}, removeEventListener() {}, querySelector: () => null, documentElement: { setAttribute() {}, removeAttribute() {} }, ...documentStub },setTimeout: () => 0, clearTimeout() {},...(dsBotApp === undefined ? {} : { dsBotApp }),})@@ -99,6 +99,31 @@ test('the desktop app hears once that the team sidebar drew the first state', asassert.deepEqual(calls, [[]], 'later states and a second mount report nothing more')})+// The Main Bot in the start window's whale: the report says where its avatar is drawn, so the+// desktop app's whale can land on it.+const whaleTeam = { ...TEAM, byId: { main: { ...main, color: 'deepseek', avatar: { shape: 'whale' } } } }+const avatarPage = app => page(app, {+ querySelector: selector => (selector === '.bt-side [data-bot-id="main"] .bt-mark' ? { checkVisibility: () => true, getBoundingClientRect: () => ({ left: 98, top: 70, width: 60, height: 60 }) } : null),+ documentElement: { clientWidth: 1280, clientHeight: 800, setAttribute() {}, removeAttribute() {} },+})++test('the report says where the Main Bot\'s whale is drawn', async () => {+ const { calls, app } = readyCalls()+ mount(avatarPage(app).TeamSidebar)(sidebarProps(whaleTeam))+ await setImmediate()+ // The place was made in the page's own realm: compared by value.+ assert.deepEqual(JSON.parse(JSON.stringify(calls)), [[{ x: 98, y: 70, width: 60, height: 60, viewportWidth: 1280, viewportHeight: 800 }]])+})++test('a Main Bot in another look or a photo reports no place', async () => {+ for (const avatar of [{ shape: 'star' }, { shape: 'whale', image: 'data:image/png;base64,AA' }]) {+ const { calls, app } = readyCalls()+ mount(avatarPage(app).TeamSidebar)(sidebarProps({ ...whaleTeam, byId: { main: { ...main, color: 'deepseek', avatar } } }))+ await setImmediate()+ assert.deepEqual(calls, [[]], JSON.stringify(avatar))+ }+})+test('in Agent mode the return button reports what the team sidebar would', async () => {const { calls, app } = readyCalls()const { BotReturn, TeamSidebar } = page(app)