Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Take the stop button out of the copy

AdamPlatin12374d3b7dd5fb6
diff --git a/app/src/import-flow.mjs b/app/src/import-flow.mjs
index 9672f378..8b5649fc 100644
--- a/app/src/import-flow.mjs
+++ b/app/src/import-flow.mjs
@@ -104,10 +104,8 @@ export class ImportFlow {
// The check of the chats, started while the card is up (stale once a holder came meanwhile).
#check
#checkAbort
- // The copy under way, its stop, and the copying card as it stands.
- #copyAbort
+ // The copying card as it stands.
#copyCard
- #confirming = false
#shownAt = 0
#timer
#lastStep = 0
@@ -148,13 +146,6 @@ export class ImportFlow {
} else if (name === 'importOption' && value !== null && typeof value === 'object' && ['regen', 'skipWork'].includes(value.option)) {
this.#options = { ...this.#options, [value.option]: value.value === true }
this.#io.show(this.card())
- } else if (name === 'stopCopy' && this.#copyAbort !== undefined) {
- if (value === 'confirm') { this.#copyAbort.abort(); return }
- this.#confirming = true
- this.#showCopy(true)
- } else if (name === 'keepCopying' && this.#copyAbort !== undefined) {
- this.#confirming = false
- this.#showCopy(true)
}
}
@@ -229,15 +220,11 @@ export class ImportFlow {
async #copyLoop() {
const io = this.#io
for (;;) {
- this.#copyAbort = new AbortController()
- this.#confirming = false
- const stop = this.#copyAbort.signal
- const signal = AbortSignal.any([stop, io.signal])
+ const signal = io.signal
try {
const unreadable = await this.#checked(signal)
if (typeof unreadable === 'object') return unreadable
if (unreadable > 0) {
- this.#copyAbort = undefined
const next = await io.ask({ kind: 'newer', n: unreadable })
return next === 'startWithout' ? { outcome: 'skipped', newer: true } : { outcome: 'gone' }
}
@@ -258,16 +245,11 @@ export class ImportFlow {
this.#setCopy({ step: 2, steps: [checkedStep, { a: formatBytes(done, io.lang), b: of }, {}], fraction: total > 0 ? done / total : 0, eta })
},
})
- this.#copyAbort = undefined
- this.#confirming = false
this.#setCopy({ step: 3, steps: [checkedStep, { ...this.#copyCard.steps[1], a: of === '…' ? this.#copyCard.steps[1].a : of }, {}], fraction: 0, eta: null }, true)
return { outcome: 'copied', summary }
} catch (error) {
- this.#copyAbort = undefined
- this.#confirming = false
+ // A quit or another start: the copy stopped at a safe point and nothing of it stays.
if (io.signal.aborted) return { outcome: 'gone' }
- // 〔停止复制〕: nothing of the copy stays, and the start goes on with a new team.
- if (stop.aborted) return { outcome: 'skipped' }
const message = error instanceof Error ? error.message : String(error)
const next = await io.ask({ kind: 'importFailed', reason: io.reasonOf(error), log: message.split('\n') })
if (next !== 'retry') return { outcome: next === 'startWithout' ? 'skipped' : 'gone' }
@@ -315,7 +297,7 @@ export class ImportFlow {
const { steps, step, fraction } = this.#copyCard
this.#lastStep = step
this.#io.progress?.(Math.min(1, (step - 1 + Math.max(0, Math.min(1, fraction))) / 3))
- this.#io.show({ ...this.#copyCard, kind: this.#confirming ? 'stopCopy' : 'copying', steps: steps.map(entry => ({ ...entry })), arc: arcShare(step, fraction) })
+ this.#io.show({ ...this.#copyCard, kind: 'copying', steps: steps.map(entry => ({ ...entry })), arc: arcShare(step, fraction) })
}
const due = this.#shownAt + CARD_EVERY_MS - this.#now()
if (now || due <= 0 || this.#lastStep !== card.step) {
diff --git a/app/src/start-window.mjs b/app/src/start-window.mjs
index dcc3cb43..f60b044c 100644
--- a/app/src/start-window.mjs
+++ b/app/src/start-window.mjs
@@ -20,7 +20,7 @@ export const PHASES = ['data', 'engine', 'team']
// (§6): the ring has three arcs while the import card asks, and goes back to three when the copy
// stops or the start goes on without it.
export const IMPORT_PHASES = ['data', 'import', 'engine', 'team']
-const COPY_CARDS = ['copying', 'stopCopy', 'importFailed']
+const COPY_CARDS = ['copying', 'importFailed']
export const phasesOf = state => (state.done.includes('import') || COPY_CARDS.includes(state.card?.kind) ? IMPORT_PHASES : PHASES)
export const START_KINDS = ['first', 'later', 'moving']
export const WATCHDOG_MS = 180_000
@@ -64,8 +64,6 @@ const ACT_VIEWS = {
// The import card's model and options, and the copying card's stop (windows-onboarding §4).
importModel: ['card'],
importOption: ['card'],
- stopCopy: ['card'],
- keepCopying: ['card'],
// The failure page's update banner: 〔下载〕 or 〔重试〕 on it, and 「手动下载」.
installUpdate: ['failed'],
manualDownload: ['failed'],
@@ -320,7 +318,7 @@ export class StartWindow {
* onPick?: (value?: string) => void, onAnswer?: (value?: string) => void,
* saveAs?: (win: any, name: string) => Promise<string | undefined>,
* onUpdate?: (name: 'installUpdate' | 'manualDownload') => void,
- * onImport?: (name: 'importModel' | 'importOption' | 'stopCopy' | 'keepCopying', value: unknown) => void,
+ * onImport?: (name: 'importModel' | 'importOption', value: unknown) => void,
* }} options `lang` is asked at each open; `program` names the folders of the app's own files;
* `onClose` runs when the user closes the start window before the hand-off; `onPick` when
* the page asks for the folder picker ('changePlace' from its place line, nothing from a
@@ -782,7 +780,7 @@ export class StartWindow {
else if (name === 'answer') this.#o.onAnswer?.(valueOf(payload))
else if (name === 'installUpdate' || name === 'manualDownload') this.#o.onUpdate?.(name)
else if (name === 'importOption') this.#o.onImport?.(name, optionOf(payload))
- else if (name === 'importModel' || name === 'stopCopy' || name === 'keepCopying') this.#o.onImport?.(name, valueOf(payload))
+ else if (name === 'importModel') this.#o.onImport?.(name, valueOf(payload))
return true
}
diff --git a/app/src/start/start.css b/app/src/start/start.css
index 5b9056c7..76f199eb 100644
--- a/app/src/start/start.css
+++ b/app/src/start/start.css
@@ -171,16 +171,6 @@ html[data-up] .caption{opacity:0;pointer-events:none}
.caption>*{opacity:0;filter:blur(6px);transition:opacity .16s,filter .16s}
.caption>[data-on]{opacity:1;filter:none;transition:opacity .22s ease-out,filter .22s ease-out}
-/* The copy's stop: a round icon button under the ring, only while the copy runs and no card is
- up; its confirmation is a card. */
-.stop-copy{position:absolute;z-index:1;left:346px;top:324px;width:28px;height:28px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:none;color:var(--bt-ink-2);cursor:pointer;transition:background-color .12s,color .12s,opacity .16s,scale var(--spring-tap-ms) var(--spring-tap)}
-.stop-copy:hover{background:var(--bt-hover);color:var(--bt-ink)}
-.stop-copy:active{scale:.9}
-.stop-copy:focus-visible{outline:2px solid var(--bt-accent);outline-offset:2px}
-.stop-copy svg{width:16px;height:16px;fill:currentColor}
-.stop-copy:not([hidden]){animation:bt-fade-in .22s ease-out}
-html[data-up] .stop-copy{opacity:0;pointer-events:none}
-@keyframes bt-fade-in{from{opacity:0}}
/* sheet: one surface that every card morphs in and out of */
.sheet{position:absolute;left:48px;top:260px;width:624px;height:calc(100% - 304px)}
html[data-sheet=none] .sheet{pointer-events:none}
@@ -317,8 +307,7 @@ html[data-hidden] *{animation-play-state:paused!important}
:root[data-eyes=happy] .bt-eye-happy{opacity:1}
@media (prefers-reduced-motion:reduce){
:root :is(.whale-x,.whale-gaze,.whale,.whale-move,.whale-loop,#tail,#gaze,#eye-pair,.bt-eye,.bt-eye-happy,.ripple,.stage){animation:none!important;transition:none!important}
-:root :is(.voice,.water,.place,.arc-base,.arc-glow,.ring,.props,.props *,.stop-copy){animation:none!important}
-:root .stop-copy,:root .stop-copy:active{scale:none}
+:root :is(.voice,.water,.place,.arc-base,.arc-glow,.ring,.props,.props *){animation:none!important}
:root .props>g{scale:none!important;transition:opacity .12s!important}
:root :is(.arc-fill,.ring-full){transition-duration:.12s!important}
:root .voice>span{animation:none!important;background:none!important;color:var(--bt-ink)!important}
@@ -327,4 +316,4 @@ html[data-hidden] *{animation-play-state:paused!important}
:root[data-exit~=lane] .lane{opacity:0;transition:opacity .12s}
}
-@media (forced-colors:active){.sheet-edge{background:CanvasText}.sheet-fill{background:Canvas}.btn{border:1px solid ButtonText}.bar-fill{background:Highlight}.water{background:CanvasText}.arc .arc-base{stroke:GrayText!important}.arc-fill,.ring-full,.arc-glow,.plume path{stroke:Highlight}.props :is(.folder-back,.folder-front,.gear,.mate circle,.box rect){fill:CanvasText}.stop-copy{color:ButtonText}.page rect,.mate rect{fill:Canvas}.drop{forced-color-adjust:none;background:Highlight}}
+@media (forced-colors:active){.sheet-edge{background:CanvasText}.sheet-fill{background:Canvas}.btn{border:1px solid ButtonText}.bar-fill{background:Highlight}.water{background:CanvasText}.arc .arc-base{stroke:GrayText!important}.arc-fill,.ring-full,.arc-glow,.plume path{stroke:Highlight}.props :is(.folder-back,.folder-front,.gear,.mate circle,.box rect){fill:CanvasText}.page rect,.mate rect{fill:Canvas}.drop{forced-color-adjust:none;background:Highlight}}
diff --git a/app/src/start/start.html b/app/src/start/start.html
index 41f18c9f..26b7a1c4 100644
--- a/app/src/start/start.html
+++ b/app/src/start/start.html
@@ -22,7 +22,6 @@
<div class="whale-hit" aria-hidden="true"></div>
<div class="fx" aria-hidden="true"><span class="ripple"></span></div>
</div>
-<button class="stop-copy" data-act="stopCopy" hidden><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="5" y="5" width="6" height="6" rx="1.3"/></svg></button>
<ol class="track sr" data-t-label="status.track">
<li class="station" data-phase="data" data-state="pending"><span data-t="status.phase.data"></span> <span class="sr"></span></li>
<li class="station" data-phase="import" data-state="pending" hidden><span data-t="status.phase.import"></span> <span class="sr"></span></li>
@@ -42,7 +41,6 @@
<section class="card" data-kind="moveFailed" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.moveFailed"></h2><p class="lead"><span data-why="place" data-t="reason.place.{place}"></span><span data-why="inUse" data-t="card.moveFailed.inUse"></span><span data-why="copy" data-t="card.moveFailed.copy"></span> <span data-t="card.moveFailed.stay"></span></p><div class="card-actions"><button class="btn" data-look="primary" data-act="answer" data-detail="retry" data-why="copy" data-t="btn.retry"></button><button class="btn" data-look="soft" data-act="answer" data-detail="old" data-old data-t="btn.startOld"></button><button class="btn disclose" data-look="link" data-act="toggleDetails" data-why="copy" aria-expanded="false"><span data-t="btn.details"></span><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.2 8 9.7l3.5-3.5"/></svg></button></div><div class="log" hidden><pre></pre></div></div></section>
<section class="card" data-kind="import" hidden><div class="card-scroll"><h2 class="card-title" data-t="card.import.line"></h2><div class="more" hidden><p class="small" data-t="card.import.extra{bare}"></p><p class="small ink model-row"><span data-t="card.import.model"></span><button class="btn" data-look="link" data-act="toggleModels" aria-expanded="false" data-t="btn.changeModel"></button></p><ul class="models" hidden></ul><div class="opts"><label><input type="checkbox" data-opt="regen"><span data-t="card.import.optRegen"></span></label><label><input type="checkbox" data-opt="skipWork"><span data-t="card.import.optSkipWork"></span></label></div><p class="small" data-t="note.copyLater"></p></div></div><div class="card-actions"><button class="btn" data-look="primary" data-act="answer" data-detail="copy" data-t="btn.copy"></button><button class="btn" data-look="soft" data-act="answer" data-detail="skip" data-t="btn.skipCopy"></button><button class="btn disclose end" data-look="link" data-act="toggleMore" aria-expanded="false"><span data-t="btn.more"></span><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.2 8 9.7l3.5-3.5"/></svg></button></div></section>
<section class="card" data-kind="importSpace" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.importSpace"></h2><p class="lead" data-t="card.importSpace.lead"></p></div><div class="card-actions"><button class="btn" data-look="primary" data-act="pick" data-t="btn.pickPlace"></button><button class="btn" data-look="soft" data-act="answer" data-detail="skip" data-t="btn.skipCopy"></button></div></section>
-<section class="card" data-kind="stopCopy" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.stopCopy"></h2><p class="lead" data-t="card.copying.stopConfirm"></p></div><div class="card-actions"><button class="btn" data-look="primary" data-act="keepCopying" data-t="btn.keepCopying"></button><button class="btn danger" data-look="soft" data-act="stopCopy" data-detail="confirm" data-t="btn.stopCopy"></button></div></section>
<section class="card" data-kind="inUse" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.inUse"></h2><p class="lead" data-t="card.inUse.lead"></p></div><div class="card-actions"><button class="btn" data-look="primary" data-act="answer" data-detail="skip" data-t="btn.skipCopy"></button></div></section>
<section class="card" data-kind="newerUpdating" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.newer"></h2><p class="lead" data-t="card.newerUpdating.lead"></p><p class="small"><span data-t="card.update.slow"></span> <button class="btn" data-look="link" data-act="manualDownload" data-t="btn.manualDownload"></button></p></div><div class="card-actions"><button class="btn" data-look="primary" data-act="answer" data-detail="skip" data-t="btn.skipCopy"></button></div></section>
<section class="card" data-kind="newer" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.newer"></h2><p class="lead" data-t="card.newer.lead"></p></div><div class="card-actions"><button class="btn" data-look="primary" data-act="answer" data-detail="startWithout" data-t="btn.startWithout"></button><p class="foot" data-t="note.copyAgain"></p></div></section>
diff --git a/app/src/start/start.js b/app/src/start/start.js
index 45979817..2bfdf9e0 100644
--- a/app/src/start/start.js
+++ b/app/src/start/start.js
@@ -38,7 +38,6 @@ const sheet = $('.sheet'), edge = $('.sheet-edge'), fill = $('.sheet-fill'), sta
const voiceEl = $('.voice'), voiceText = $('.voice>span')
const captionText = $('.caption-text')
const placeEl = $('.place'), placeText = $('.place-text')
-const stopButton = $('.stop-copy')
const CODE = new Set(['path', 'dataDir', 'workspace'])
let lang = 'zh'
let s = null
@@ -68,8 +67,6 @@ function renderStatic() {
root.lang = lang === 'zh' ? 'zh-CN' : 'en'
for (const el of document.querySelectorAll('.track [data-t], .footrow [data-t], .caption [data-t]')) render(el)
$('.track').setAttribute('aria-label', say('status.track'))
- stopButton.setAttribute('aria-label', say('btn.stopCopy'))
- stopButton.title = say('btn.stopCopy')
for (const st of document.querySelectorAll('.station')) st.querySelector('.sr').textContent = say(`status.state.${st.dataset.state}`)
if (s) { fillBlock(shown); placeUI(s.place); timeUI() }
}
@@ -477,7 +474,7 @@ document.addEventListener('click', (event) => {
if (name === 'toggleModels') return toggleModels(button)
if (name === 'copyDetails') copiedLabel(button)
if (name === 'importModel') toggleModels(button.closest('.card').querySelector('[data-act=toggleModels]'), false)
- if (name === 'answer' || name === 'wait' || name === 'keepCopying') director.nod()
+ if (name === 'answer' || name === 'wait') director.nod()
bridge?.act(name, value === undefined ? undefined : { value })
})
document.addEventListener('change', (event) => {
@@ -503,7 +500,6 @@ function apply(next) {
root.dataset.view = next.view
shimmer()
placeUI(next.place)
- stopButton.hidden = !(next.view === 'card' && next.card?.kind === 'copying' && next.card.step < 3)
const name = blockFor(next)
// The import card comes once the data folder's arc has filled (start-window §6).
if (name === 'import' && name !== shown && !jump) director.through(0).then(() => { if (blockFor(s) === 'import') showBlock('import', false) })
diff --git a/app/src/start/text.mjs b/app/src/start/text.mjs
index daddd54d..e1fabab2 100644
--- a/app/src/start/text.mjs
+++ b/app/src/start/text.mjs
@@ -33,7 +33,6 @@ export const TEXT = {
'say.picked': '我多加了一层文件夹',
'say.missing': '数据不在原来的地方了',
'say.importSpace': '地方不够放',
- 'say.stopCopy': '停止复制?',
'say.inUse': 'DeepSeek Harness 还在用这个团队',
'say.newer': '这些对话比我新',
'say.move': '搬到这个文件夹?',
@@ -56,7 +55,6 @@ export const TEXT = {
'card.import.optRegen': '不复制可以重新生成的文件夹',
'card.import.optSkipWork': '先不复制工作文件',
'card.importSpace.lead': '空间不够:复制要约 {need},{drive} 盘只剩 {free},还差 {short}。',
- 'card.copying.stopConfirm': '停下后不会留下复制了一半的团队,DeepSeek Harness 里的团队不受影响。',
'card.inUse.lead': '请完全退出 DSH Desktop(任务栏右下角的托盘图标也要退出),并关掉 DSH Web,这里会自动继续。',
'card.newerUpdating.lead': 'DeepSeek Bot {version} 能读它们,正在下载({p}%)。装好后会重新打开,再复制团队。',
'card.newer.lead': '这些对话是更新版本的 DeepSeek Harness 写的,DeepSeek Bot 现在读不了。',
@@ -101,8 +99,6 @@ export const TEXT = {
'btn.skipCopy': '先不复制',
'btn.more': '详细',
'btn.changeModel': '更换',
- 'btn.stopCopy': '停止复制',
- 'btn.keepCopying': '继续复制',
'btn.startWithout': '先不带团队开始',
'btn.copyDetails': '复制详细信息',
'btn.copied': '已复制',
@@ -209,7 +205,6 @@ export const TEXT = {
'say.picked': 'I added one more folder',
'say.missing': 'Your data isn’t where it was',
'say.importSpace': 'Not enough room',
- 'say.stopCopy': 'Stop copying?',
'say.inUse': 'DeepSeek Harness is still using this team',
'say.newer': 'These chats are newer than me',
'say.move': 'Move the data here?',
@@ -232,7 +227,6 @@ export const TEXT = {
'card.import.optRegen': 'Skip folders that can be regenerated',
'card.import.optSkipWork': 'Don’t copy work files yet',
'card.importSpace.lead': 'Not enough space: the copy needs about {need}, drive {drive} has {free} left, {short} short.',
- 'card.copying.stopConfirm': 'Stopping leaves no half-copied team, and the team in DeepSeek Harness is not affected.',
'card.inUse.lead': 'Quit DSH Desktop completely (its tray icon at the bottom right of the taskbar too) and close DSH Web; this continues by itself.',
'card.newerUpdating.lead': 'DeepSeek Bot {version} can read them and is downloading ({p}%). After installing it reopens and copies the team.',
'card.newer.lead': 'These chats were written by a newer DeepSeek Harness, which DeepSeek Bot can’t read yet.',
@@ -277,8 +271,6 @@ export const TEXT = {
'btn.skipCopy': 'Don’t copy yet',
'btn.more': 'Details',
'btn.changeModel': 'Change',
- 'btn.stopCopy': 'Stop copying',
- 'btn.keepCopying': 'Keep copying',
'btn.startWithout': 'Start without the team',
'btn.copyDetails': 'Copy details',
'btn.copied': 'Copied',
diff --git a/app/src/start/whale.js b/app/src/start/whale.js
index 26065861..7baf66d9 100644
--- a/app/src/start/whale.js
+++ b/app/src/start/whale.js
@@ -121,8 +121,8 @@ export function createDirector({ start, resume, act, label, announce, onCheck, o
const last = () => phases.length - 1
const stationEl = i => stations.find(st => st.dataset.phase === phases[i])
const arcEl = i => document.querySelector(`.arc[data-phase="${phases[i]}"]`)
- // The import's arc runs while the copy does, its confirmation to stop included.
- const copying = () => ['copying', 'stopCopy'].includes(want.card)
+ // The import's arc runs while the copy does.
+ const copying = () => want.card === 'copying'
// A start that offers an import holds after the data folder's arc until the import card is
// answered: the engine warms up meanwhile, but its arc does not run ahead of the question.
const holding = () => D.offer && !D.answered
@@ -1051,7 +1051,7 @@ export function createDirector({ start, resume, act, label, announce, onCheck, o
update(s) {
D.offer = s.explain?.mode === 'import'
if (s.card?.kind === 'import') D.asked = true
- if (D.asked && (['copying', 'stopCopy', 'importFailed'].includes(s.card?.kind) || ['boot', 'moving', 'handoff', 'failed', 'viewFailed'].includes(s.view))) D.answered = true
+ if (D.asked && (['copying', 'importFailed'].includes(s.card?.kind) || ['boot', 'moving', 'handoff', 'failed', 'viewFailed'].includes(s.view))) D.answered = true
if (Array.isArray(s.phases) && s.phases.join() !== phases.join() && s.phases.every(phase => stations.some(st => st.dataset.phase === phase))) relayout(s.phases)
const done = s.done ?? []
const now = performance.now()
diff --git a/app/test/import-flow.test.mjs b/app/test/import-flow.test.mjs
index 31aad635..7936137e 100644
--- a/app/test/import-flow.test.mjs
+++ b/app/test/import-flow.test.mjs
@@ -205,28 +205,32 @@ test("the check of the chats fills the import arc's first 15 %, the copy the res
assert.equal(arcShare(3, 0), 1)
})
-test('〔停止复制〕 asks on the card, 〔继续复制〕 goes back, and the confirmed stop leaves no team', async () => {
+// The copy has no stop button (the user's decision, start-window §6): a quit, or closing the
+// window, stops it at a safe point, and nothing of it stays.
+test('a quit during the copy stops it and leaves no team', async () => {
let release
let stopped = false
+ const quit = new AbortController()
const { io, shown, answer } = harness({
copy: ({ signal }) => new Promise((resolve, reject) => {
release = () => { resolve({ bots: 6, sessions: 3 }) }
signal.addEventListener('abort', () => { stopped = true; reject(new Error('stopped')) })
}),
})
+ io.signal = quit.signal
const flow = new ImportFlow(io)
const run = flow.run()
await tick()
answer('copy')
while (release === undefined) await tick()
- flow.act('stopCopy')
- assert.equal(shown.at(-1).kind, 'stopCopy')
- flow.act('keepCopying')
assert.equal(shown.at(-1).kind, 'copying')
- flow.act('stopCopy')
+ // The acts of the stop that the page no longer has change nothing.
flow.act('stopCopy', 'confirm')
- assert.deepEqual(await run, { outcome: 'skipped' })
- assert.equal(stopped, true)
+ await tick()
+ assert.equal(stopped, false)
+ quit.abort()
+ assert.deepEqual(await run, { outcome: 'gone' })
+ assert.equal(stopped, true, 'the copy was told to stop')
})
test('chats newer than this DSH reads say so, and the start goes on without the team', async () => {
diff --git a/app/test/main-import-quit.test.mjs b/app/test/main-import-quit.test.mjs
new file mode 100644
index 00000000..084554b7
--- /dev/null
+++ b/app/test/main-import-quit.test.mjs
@@ -0,0 +1,50 @@
+// The import's copy has no stop button (start-window §6): quitting the app, or closing the start
+// window, is how a copy is stopped. The quit waits for the copy to stop at a safe point, then
+// goes through, and nothing of the copy is left. The home and the DSH home are throwaway
+// folders, so the test never sees the user's own; the Electron parts and the Host are test doubles.
+import assert from 'node:assert/strict'
+import { existsSync, mkdirSync, mkdtempSync, readdirSync, writeFileSync } from 'node:fs'
+import { tmpdir } from 'node:os'
+import { dirname, join } from 'node:path'
+import { test } from 'node:test'
+import { app, paths, state } from './helpers/fake-electron.mjs'
+import { hold, state as hostState } from './helpers/fake-host-process.mjs'
+import { startAct, startState, startWindows, waitFor } from './helpers/app-harness.mjs'
+import { installHooks } from './helpers/register.mjs'
+
+const home = mkdtempSync(join(tmpdir(), 'ds-bot-import-quit-'))
+process.env.HOME = home
+process.env.USERPROFILE = home
+process.env.DSH_HOME = join(home, 'dsh')
+delete process.env.DS_BOT_HOME
+delete process.env.DS_BOT_WORKSPACE
+
+const write = (path, text) => { mkdirSync(dirname(path), { recursive: true }); writeFileSync(path, text) }
+const dsh = process.env.DSH_HOME
+write(join(dsh, 'bot', 'state.json'), JSON.stringify({ bots: { b1: { id: 'b1', name: 'Chief', sessionId: 's1' } }, rooms: {} }))
+write(join(dsh, 'sessions', 'g', 's1', 'notes.txt'), 'one')
+
+await installHooks()
+
+test('quitting during the copy stops it, then quits, and leaves no team behind', async () => {
+ mkdirSync(paths.userData, { recursive: true })
+ writeFileSync(join(paths.userData, 'tray-close-acknowledged'), '')
+ // The Host waits: the chats' check, and with it the copy, stays under way until the quit.
+ hold()
+ await import('../src/main.mjs')
+ await waitFor(() => startState()?.card?.kind === 'import', 'offer the team on the import card')
+ await startAct('answer', 'copy')
+ await waitFor(() => startState().card?.kind === 'copying', 'start the copy')
+
+ app.quit()
+ assert.equal(state.quitPrevented, true, 'the quit waits for the copy to stop')
+ await waitFor(() => state.quits >= 2 && state.quitPrevented === false, 'quit once the copy has stopped')
+ hostState.release()
+ await waitFor(() => startWindows().every(win => win.destroyed), 'close the start window')
+
+ const data = join(home, '.ds-bot')
+ assert.equal(existsSync(join(data, 'bot', 'imported.json')), false, 'no copied team')
+ // The check's folder goes once its Host, held until now, has stopped.
+ const left = () => (existsSync(data) ? readdirSync(data).filter(name => name.startsWith('.import-')) : [])
+ await waitFor(() => left().length === 0, `leave no copy or check folder behind (${left().join(', ')})`)
+})
diff --git a/app/test/start-page.test.mjs b/app/test/start-page.test.mjs
index 88f798b5..65fd2bf2 100644
--- a/app/test/start-page.test.mjs
+++ b/app/test/start-page.test.mjs
@@ -62,7 +62,7 @@ test('the page sends only the acts of the start window', () => {
...[...code['start.js'].matchAll(/\bact: '(\w+)'|\bact\('(\w+)'/gu)].map(match => match[1] ?? match[2]),
...[...code['whale.js'].matchAll(/\bact\('(\w+)'\)/gu)].map(match => match[1]),
].filter(name => !local.has(name)))
- assert.deepEqual([...sent].sort(), ['answer', 'copyDetails', 'freshStart', 'handoffDone', 'handoffShow', 'importModel', 'importOption', 'installUpdate', 'keepCopying', 'manualDownload', 'painted', 'pick', 'reloadView', 'retry', 'saveLog', 'stopCopy', 'wait'])
+ assert.deepEqual([...sent].sort(), ['answer', 'copyDetails', 'freshStart', 'handoffDone', 'handoffShow', 'importModel', 'importOption', 'installUpdate', 'manualDownload', 'painted', 'pick', 'reloadView', 'retry', 'saveLog', 'wait'])
// Every act the main process takes is one that the page sends, under the same name.
for (const name of START_ACTS) assert.ok(sent.has(name), `the main process takes ${name}, which the page never sends`)
})
diff --git a/app/test/start-window.test.mjs b/app/test/start-window.test.mjs
index 59c1e03a..246c88f6 100644
--- a/app/test/start-window.test.mjs
+++ b/app/test/start-window.test.mjs
@@ -83,9 +83,9 @@ test('only a missing file of the app\'s own says that the install is incomplete'
})
test('the main process takes only its own acts, each in its own views', () => {
- assert.deepEqual([...START_ACTS].sort(), ['answer', 'copyDetails', 'handoffDone', 'handoffShow', 'importModel', 'importOption', 'installUpdate', 'keepCopying', 'manualDownload', 'painted', 'pick', 'reloadView', 'retry', 'saveLog', 'stopCopy', 'wait'])
- // The import card's model and options and the copying card's stop, on a card only.
- for (const name of ['importModel', 'importOption', 'stopCopy', 'keepCopying']) {
+ assert.deepEqual([...START_ACTS].sort(), ['answer', 'copyDetails', 'handoffDone', 'handoffShow', 'importModel', 'importOption', 'installUpdate', 'manualDownload', 'painted', 'pick', 'reloadView', 'retry', 'saveLog', 'wait'])
+ // The import card's model and options, on a card only. The copy has no stop of its own.
+ for (const name of ['importModel', 'importOption']) {
assert.equal(acceptsAct(name, 'card'), true, name)
for (const view of ['boot', 'failed', 'watchdog', 'handoff', 'moving']) assert.equal(acceptsAct(name, view), false, `${name} in ${view}`)
}
@@ -450,10 +450,8 @@ test("the copy is a stage of its own, and the engine's stage waits for the copie
s.start.card(copying(1, 0))
assert.deepEqual(s.state().phases, ['data', 'import', 'engine', 'team'])
assert.equal(s.state().phase, 'import')
- s.start.card({ ...copying(2, 0.6), kind: 'stopCopy' })
- assert.equal(s.state().phases.length, 4, 'the stop\'s question keeps the copy\'s arc')
s.start.card(undefined)
- assert.deepEqual(s.state().phases, ['data', 'engine', 'team'], 'a stopped copy goes back to three')
+ assert.deepEqual(s.state().phases, ['data', 'engine', 'team'], 'a copy that ends without the team goes back to three')
s.start.card(copying(2, 0.15))
s.start.engineDown()
assert.deepEqual(s.state().done, ['data'])
diff --git a/docs/plans/2026-10-26-start-window.md b/docs/plans/2026-10-26-start-window.md
index aab28be1..0d5fefc7 100644
--- a/docs/plans/2026-10-26-start-window.md
+++ b/docs/plans/2026-10-26-start-window.md
@@ -61,11 +61,11 @@
- 完成:`--bt-ink-deepseek` 的线顺时针把这一段画满,.56 s。
- 失败:这段线变成 60% 的 `--bt-danger`(第 7 节)。
- 交接:段与段之间的空隙接上,合成一整圈(.3 s),整圈鼓起一次(.5 s,最大 1.035 倍,第 8 节)。
-- 每次启动都从三段开始,要导入的首次启动也一样。答〔复制过来〕、复制开始以后,多出一个阶段「复制以前的团队」,排在数据文件夹和引擎之间:圆环变成四段,各占 90°,段与段之间仍空 10°(每段画出 80°),依次是数据文件夹、复制、引擎、团队。换的时候不跳:卡片变成的圆点落在第一段后面的空隙(120°)上,复制那一段从那一点长出来,其他三段同时挪开让位,每一帧都按新旧角度之间画(所以一直在圆上),走 `SPRING_SHAPE`(.42 s)。复制停下或「先不带团队开始」时反过来:复制那一段缩回那一点,其他三段回到三段的位置。答〔先不复制〕就一直是三段。复制这一段:
+- 每次启动都从三段开始,要导入的首次启动也一样。答〔复制过来〕、复制开始以后,多出一个阶段「复制以前的团队」,排在数据文件夹和引擎之间:圆环变成四段,各占 90°,段与段之间仍空 10°(每段画出 80°),依次是数据文件夹、复制、引擎、团队。换的时候不跳:卡片变成的圆点落在第一段后面的空隙(120°)上,复制那一段从那一点长出来,其他三段同时挪开让位,每一帧都按新旧角度之间画(所以一直在圆上),走 `SPRING_SHAPE`(.42 s)。复制失败后「先不带团队开始」时反过来:复制那一段缩回那一点,其他三段回到三段的位置。答〔先不复制〕就一直是三段。复制这一段:
- 圆点落下、这一段长出来时就是进行中(第 6 节)。
- 按复制的真实进度画满:检查对话占前 15%,复制 Bot 和对话按字节占其余 85%,每 200 ms 一次,.3 s 跟上,不往回走。
- 复制失败:这段线和已经画到的部分变成 `--bt-danger`,重试时回到进行中,从 0 重画。
- - 复制完了这一段画满,之后一直是四段;复制停下、「先不带团队开始」:回到三段(上面)。
+ - 复制完了这一段画满,之后一直是四段;复制失败后「先不带团队开始」:回到三段(上面)。
- 预热好的引擎为复制停下,引擎那一段回到没开始,等复制好的团队的引擎起来才画满;复制完到引擎起来这段时间是引擎那一段在进行中。
- 道具:鲸鱼面前(x 413–459,底边在水线上)一个 46 px 的小道具,画的是进行中那一段在做的事:「准备数据文件夹」一个文件夹,里面的纸一张接一张翻起来(1.5 s);「复制以前的团队」左边一个浅色的旧箱子,右边一个新箱子,中间一条点线:一个箱子从旧的上面被拿起,沿点线往前倾着飞过去,压扁一下落到新箱子上,停一下再淡掉(1.6 s 一趟);「启动本机引擎」两个咬合的齿轮反向转(9 齿和 6 齿,2.7 s 和 1.8 s 一圈,所以一直咬着),整组 1.35 s 鼓一下;「打开团队」三个小成员一个接一个跳一下(1.8 s)。只在那段弧进行中时有:出现用 `SPRING_POP` 从 .6 倍弹到原大、淡入 .2 s,离开淡出 .16 s;没人看见就已经完成的阶段也有它的一拍:页面画出来以前就建好的数据文件夹、导入卡等回答或复制进行时就起来的引擎,等轮到它时照样先进行中,道具出来,至少停 420 ms 再画满;真在进行中的阶段不多等。「打开团队」也一样:团队界面在这一段进行中以前就好了(卡片等回答时、或者一下子就加载完),首次启动在交接前先让它进行中 420 ms(首次启动的兜底是 2.5 s,够用)。颜色是 `--bt-ink-deepseek` 和它的淡色,纸和成员的眼睛是 `--bt-card`。道具在水塘里,出卡片时跟着缩小上移;失败、卡片等回答(那段弧不是进行中)和交接时没有。
- 圆环、水道、水线、鲸鱼的点击区和涟漪是一块,下面叫水塘。没有卡片时,水塘、鲸鱼的话和提示行整组比有卡片时低 45 px,鲸鱼在窗口的视觉中心稍上一点。要出卡片时,整组用 `SPRING_SHAPE` 上移 45 px,水塘在同一个弹簧里以圆心为准缩到 .62 倍、再上移 60 px,圆环落在卡片上面,卡片出现在下面的纸面里;卡片收回后,水塘回到原大,整组回到低处。位置行不动。页面不能滚动(第 11 节)。
@@ -190,11 +190,11 @@
- 导入时空间不够:「地方不够放」。
- DSH 正在用这个团队:「DeepSeek Harness 还在用这个团队」。
- 更新版本的对话,和它的「正在下载」:「这些对话比我新」。
- - 复制中没有卡片(圆环上的复制那一段就是进度);停止复制的确认:「停止复制?」。
+ - 复制中没有卡片(圆环上的复制那一段就是进度)。
- 恢复卡、团队界面没有加载出来和复制失败的卡没有这一行,也不说俏皮话(第 7 节)。180 秒的卡也没有,问题由鲸鱼问。
- 鲸鱼跳不跳:
- 应用主动问的卡片(推荐盘、找不到数据文件夹、导入、180 秒),跳两下,最后一跳落地时探身看着卡片,然后停下(第 3 节第二张表)。
- - 用户自己引出的卡片(「其他位置…」选完后的「会放在…」、以后的启动搬数据时的「这里放不了」和「搬到这个文件夹?」、停止复制的确认),不跳,变形开始 70 ms 后探身。复制中没有卡片,鲸鱼工作。
+ - 用户自己引出的卡片(「其他位置…」选完后的「会放在…」、以后的启动搬数据时的「这里放不了」和「搬到这个文件夹?」),不跳,变形开始 70 ms 后探身。复制中没有卡片,鲸鱼工作。
- 同一件事又出了新问题(复制时空间不够),跳一下。
- 选位置的卡片只有推荐盘这一种,只在首次启动出现,〔放到 D 盘〕〔仍然放在 C 盘〕都已经试写通过(上手流程第 3 节);以后的启动还会出「找不到数据文件夹」卡:
- 推荐盘:「C 盘只剩 1.2 GB。放到 D 盘(剩 412 GB)?」〔放到 D 盘〕(主按钮,拿到焦点)〔仍然放在 C 盘〕,按钮行末尾一个小链接「其他位置…」。默认位置不能用时,第一句换成原因(「DeepSeek Bot 没有权限在 `C:\Users\<用户名>` 里写文件。」),第二句一样;按钮只有〔放到 D 盘〕(主按钮)和小链接「其他位置…」,没有〔仍然放在 C 盘〕;没有可推荐的盘时只有〔选择其他位置…〕。
@@ -213,13 +213,13 @@
- 导入卡越短越好:只有一行「找到你以前的团队了:4 个 Bot、0 个群聊」和〔复制过来〕(主按钮,拿到焦点)〔先不复制〕,按钮行末尾一个「详细」。「详细」是和失败页一样的折叠区,展开才有:「复制后会多占 4.6 GB,DeepSeek Harness 里的原件不动。」(不到 1 MB 写「不到 1 MB」,不写「0 MB」)、「模型设置:DeepSeek API · DeepSeek-V4-Pro 更换」、两个勾选框、脚注「也可以在 设置 → 通用 → 位置 里复制。」;展开时卡片的边用 `SPRING_SHAPE` 长高,内容晚 70 ms 淡入。找到的名字、段数和会复制什么不在卡上(名字和段数进门后在「复制好了」卡上)。
- 卡片在第一段(数据文件夹)画满以后才出来。卡片一出现,引擎就开始预热,没被 DSH 占着时检查对话同时进行,鲸鱼跳两下后停下。答之前圆环停在第一段:预热好了也不画引擎那一段、不出齿轮。答〔先不复制〕时鲸鱼点一下头,预热好的引擎接着当正式引擎用,不重启,引擎那一段接着画(三段)。
- 空间不够(只查第一段):「空间不够:复制要约 1.7 GB,C 盘只剩 1.5 GB,还差 0.2 GB。」〔选择其他位置…〕(主按钮)〔先不复制〕
- - 复制中:卡片不收回,而是跳上去变成圆环的一段。答〔复制过来〕(或〔继续复制〕、复制失败后的〔重试〕)时:
- - 卡片的内容照常 .16 s 退场;卡片的底色和边线 60 ms 后开始收:用 `clip-path` 缩成卡片中间一个 12 px 的圆点,同时变成 `--bt-ink-deepseek`,沿一条先上后右的弧线跳到圆环上:三段时落在第一段后面的空隙,已经四段时(〔继续复制〕、〔重试〕)落在复制那一段的中点(这时水塘还是缩小上移的样子),落地前淡掉,一共 .52 s:前 45% 缩小上升(`cubic-bezier(.3,.7,.4,1)`),到 80% 跳到位,最后淡掉。
+ - 复制中:卡片不收回,而是跳上去变成圆环的一段。答〔复制过来〕(或复制失败后的〔重试〕)时:
+ - 卡片的内容照常 .16 s 退场;卡片的底色和边线 60 ms 后开始收:用 `clip-path` 缩成卡片中间一个 12 px 的圆点,同时变成 `--bt-ink-deepseek`,沿一条先上后右的弧线跳到圆环上:三段时落在第一段后面的空隙,已经四段时(复制失败后的〔重试〕)落在复制那一段的中点(这时水塘还是缩小上移的样子),落地前淡掉,一共 .52 s:前 45% 缩小上升(`cubic-bezier(.3,.7,.4,1)`),到 80% 跳到位,最后淡掉。
- 圆点到位时(.42 s)圆环从三段变四段(第 2 节),复制那一段从落点长出来、进行中,淡线一下子粗到 5 px 再回到 2 px(.42 s);道具换成搬箱子。然后水塘回到原大,整组回到低处(第 2 节)。
- 复制那一段按真实进度画满(第 2 节);没有分步的清单、数字和剩余时间。任务栏进度照旧显示在启动窗口上。
- 复制在落地前就做完了(团队很小):那一段照样先亮起,进行中满 420 ms 才画满。
- 鲸鱼工作。
- - 停止复制:复制时圆环正下方有一个 28 px 的圆形图标按钮(一个小方块,`--bt-ink-2`,悬停加底色;读屏和悬停提示是「停止复制」),只在复制进行中、没有卡片时有。点它出一张用户自己引出的卡:「停止复制?」「停下后不会留下复制了一半的团队,DeepSeek Harness 里的团队不受影响。」〔继续复制〕(主按钮)〔停止复制〕(危险色文字)。鲸鱼停下,复制不停,那一段照样往前画。〔继续复制〕:卡片照样跳回圆环;〔停止复制〕:卡片收回,圆环缩回三段,用新的空白团队接着启动。
+ - 复制没有停止按钮(用户 2026-11-02 定的):要停就退出应用或关掉启动窗口,复制在一个安全的地方停下、不留下复制了一半的团队,然后才退出。
- DSH 正在用这个团队(答〔复制过来〕后):鲸鱼停下,不晃。每 2 秒重查一次,不显示任何东西;锁一放开,卡片直接变成复制中。卡上一个〔先不复制〕(主按钮)。「正在下载」的卡也有〔先不复制〕(主按钮),加「下载太慢?手动下载」;下载失败时〔重试〕〔手动下载〕。
- 复制失败:鲸鱼用失败的姿势,复制那一段变红(第 2 节),卡上〔重试〕(主按钮)〔先不带团队开始〕和失败页一样的日志按钮。
- 工作文件不经过启动窗口:团队打开后由应用在后台复制,进度在 设置 → 通用 → 位置 和 Main Bot 聊天里的「复制好了」卡上。
@@ -294,7 +294,7 @@
- 道具直接出现、淡出,不弹、不动:文件夹的纸不翻,箱子不搬,齿轮不转,成员不跳。
- 状态只靠眼睛直接切换:平时睁眼,45 秒起眯眼,失败时眼皮变重;点鲸鱼时和庆祝的交接里(就绪到内容淡出)是「^ ^」。
- 圆环不画出来,一开始就在;弧画满、合成一整圈都只用 .12 s,整圈不鼓起;进行中的弧只染淡蓝,没有跑动的光。
-- 鲸鱼的话、卡片、提示行和更新条只淡入 .12 s、淡出 .16 s,没有模糊、位移和缩放。答〔复制过来〕时卡片不飞,照常收回,圆环直接换成四段(不长、不让位),复制那一段直接进行中、不加粗;停止复制的按钮直接出现。卡片高度直接到位(内容先是透明的);整组上移、水塘缩小,回到低处和原大,也都直接到位;没有流光。
+- 鲸鱼的话、卡片、提示行和更新条只淡入 .12 s、淡出 .16 s,没有模糊、位移和缩放。答〔复制过来〕时卡片不飞,照常收回,圆环直接换成四段(不长、不让位),复制那一段直接进行中、不加粗。卡片高度直接到位(内容先是透明的);整组上移、水塘缩小,回到低处和原大,也都直接到位;没有流光。
- 沉下去重新开始时,水道淡出 .16 s,各段弧回到没开始,鲸鱼直接回来。
- 交接时不长大,鲸鱼不跳:剩下的弧画满、圆环合上,300 ms 时内容淡出 .12 s,420 ms 时发 `handoffShow`,主窗口直接出现在它最后的矩形上(第 8 节)。
- 信息一样不少:各段弧、道具、鲸鱼的话、提示行、按钮、看不见的阶段列表和朗读都在。
@@ -412,6 +412,7 @@
- 2026-11-01 不写字,加道具:用户要求「启动窗口轻易不写文字,除非出现空间不足或者报错,后者并提供一键复制/下载日志的选项」,并且「加载的时候应当有相关组件,例如放在鲸鱼面前一个正在翻动的文件夹,脉冲转动的两个齿轮」。所以去掉 45 秒的两句(「有点久,可能是杀毒软件在查新文件」「比平时慢,请再等一会儿」)、搬数据时的「正在搬 DeepSeek Bot 的数据…」和 45 秒的〔打开日志文件夹〕,慢只靠鲸鱼的姿势;位置行在首次启动也只在盘不够时有(推翻 2026-10-31「首次启动照旧显示」那一条,首次启动在盘够时就没有选位置的入口了);出错的每一页都有〔复制详细信息〕和新的〔保存日志…〕(`saveLog`,系统保存框,最后 5000 行),代替〔打开日志文件夹〕(`openLogs` 不再是启动页的动作);鲸鱼面前加每个阶段的道具:翻纸的文件夹、咬合的齿轮、跳的小成员(第 2、3、4、5、6、7、9、11 节)。另外加了开发用的三种进度画法(`DS_BOT_START_PROGRESS`,第 11 节),只为比较,不给用户。依据:启动页和启动窗口的单元测试;无头 Chrome 加替身桥录的整次启动(浅色、深色)和各阶段、失败页、180 秒、盘不够的截图;减少动态效果时道具和三种画法都没有循环动画。还没有在桌面应用里真机跑,〔保存日志…〕也还没有真点过。这次改的是已定的设计,要维护者确认。
- 2026-11-01(待维护者确认):动画只有一个来源。启动窗口的卡片和团队窗口里代替系统对话框的卡片(`app/src/page-card.css`)用同一组颜色和弹簧,都由 `scripts/start-assets.mjs` 从插件的 `themes.js` 和 `motion.js` 生成:卡片出现走 `SPRING_SHAPE`,收起用启动窗口卡片的退场(下沉 6 px、缩到 .975、模糊 3px,.16 s),减少动态效果时只淡入 .12 s、淡出 .16 s(第 9 节)。导入的几张卡(第 6 节)由主进程的 `import-flow.mjs` 发快照,页面照旧只按快照画。
- 2026-11-01 交接的露面:在桌面应用里录了交接(真的 Electron 44、真的 `StartWindow`、替身团队页、ffmpeg 60 帧录屏),看到三个问题:长大用 `cubic-bezier(.2,.7,.2,1)`,前 40% 就走完了大半,窗口很早看着就长完了,鲸鱼落下后在一大块空的深色窗口里等 200 多毫秒;主窗口用 `show()` 露面时 Windows 自己的打开过渡压在启动窗口上,有一两帧整窗发灰、鲸鱼和头像错开成两个,然后深色一下跳成浅色;长大前 160 ms 的等待让鲸鱼停在跳的最高点。改成:主窗口在 `ready()` 时就以不透明度 0 显示在启动窗口下面(打开过渡看不见地走完,也不卡长大的第一步);长大 `handoffShow` + 40 ms 开始,260 ms,缓入缓出;鲸鱼长到位 60 ms 后落下,主进程等 `handoffDone` 才让主窗口变成不透明,再把启动窗口 180 ms 淡出,鲸鱼化进头像。减少动态效果和页面没发 `handoffShow` 时不长大,同样淡出。依据:录屏前后对比(首次启动就绪到主窗口露出 1.24 秒带一帧发灰,变成 1.09 秒开始淡、1.29 秒淡完;以后的启动 0.58 秒开始);启动窗口的单元测试(主窗口在 `ready()` 时透明地显示在下面、等落下或 300 ms、淡出后才给焦点、失败时收回)。Mica 窗口用 `setOpacity` 淡出在 Windows 11 上正常。
+- 2026-11-02 复制没有停止按钮:圆环下那个停止复制的小按钮看着像留下的一个点。用户定的:「取消终止复制按钮」。第 6 节去掉按钮和「停止复制?」那张确认卡;要停就退出应用或关窗口,复制先停下、不留下半个团队再退出。
- 2026-11-02 每段都有它的一拍:答〔先不复制〕的录屏里看不到齿轮,引擎在卡片等回答时就预热好了,答完圆环直接跳到「打开团队」。第 2 节:没人看见就完成的阶段(不只是数据文件夹)轮到时照样进行中至少 420 ms、道具出来再画满,首次启动的「打开团队」在交接前也一样。
- 2026-11-02 先三段,答了再变四段:用户看了四段的录屏,说预想的是「一开始是3条,第一条转完扫出来问要不要,要的话跳上去,重新排布为4条,并开始导入,搬箱子动画优化一下,不要的话继续3条启动」。第 2 节:每次启动都从三段开始,复制开始时才长出复制那一段,其他三段让位,复制停下就缩回三段;搬箱子的道具重画(旧箱子、新箱子和点线,箱子倾着飞、压扁落下)。第 6 节:导入卡等第一段画满才出来,答之前圆环停在第一段;圆点落在第一段后面的空隙。
- 2026-11-02 导入并进圆环:用户看了导入的录屏,要求「尽可能减少,导入改为一个进度条点击后向上跳转变形将(3段圆环改为四段圆环」。第 2 节:从 DSH 复制团队的首次启动圆环四段,多出「复制以前的团队」,按复制的真实进度画满,复制时道具是搬箱子,预热的引擎为复制停下时引擎那一段回到没开始;其他启动仍三段。第 6 节:导入卡只剩一行和两个按钮,大小、模型设置、勾选框和脚注收进「详细」,找到的名字、段数、会复制什么去掉;「正在搬过来」的分步卡去掉,〔复制过来〕后卡片缩成一个点跳进复制那一段;停止复制改成圆环下的图标按钮加一张确认卡;复制失败那一段变红。第 9 节:减少动态效果时卡片不飞。不到 1 MB 写「不到 1 MB」。依据:桌面应用里对着替身 DSH 家录的导入(`app/dist-recordings/`,不进仓库)。
diff --git a/docs/plans/2026-10-26-windows-onboarding.md b/docs/plans/2026-10-26-windows-onboarding.md
index 2e6b6d23..70e5a6f4 100644
--- a/docs/plans/2026-10-26-windows-onboarding.md
+++ b/docs/plans/2026-10-26-windows-onboarding.md
@@ -133,7 +133,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装
- 工作文件的空间在第二段开始前单独查,要求剩余不少于「要复制的工作文件 + 1 GB」,不够就不开始,只在设置里写「工作文件没有复制:D 盘还差 2.2 GB」〔重试〕,不打断启动;复制中剩余不到 500 MB 就停下,设置里写「工作文件没复制完:D 盘只剩 480 MB」〔继续复制〕。暂存加硬链接落位本来就不多占空间。
- 复制后,设置 → 通用 → 位置 里有一行「DeepSeek Harness 里的原团队还在 `C:\Users\<用户名>\.dsh`(4.6 GB),DeepSeek Bot 不会改动它。」〔打开文件夹〕;要不要删、什么时候删由用户在 DeepSeek Harness 里决定。
- 新用户从不复制任何东西:推荐盘和「其他位置…」只新建空文件夹,重装接着用原处的数据。应用自己的数据搬动时(第 8 节〔移到…〕、恢复页的〔换个位置…〕、以后的启动盘快满时位置行的〔换个位置…〕)旧位置不留副本。
-- 第一段复制时没有卡片:答〔复制过来〕后卡片跳进启动页的圆环,圆环从三段重新排成四段,多出来的一段「复制以前的团队」,按真实进度画满(检查对话 15%,其余按字节),任务栏进度照旧。圆环下的一个图标按钮是〔停止复制〕,点了出确认卡,说明停下后会留下什么:不留下复制了一半的团队,DSH 里的团队不受影响。
+- 第一段复制时没有卡片:答〔复制过来〕后卡片跳进启动页的圆环,圆环从三段重新排成四段,多出来的一段「复制以前的团队」,按真实进度画满(检查对话 15%,其余按字节),任务栏进度照旧。复制没有停止按钮(用户定的);退出应用或关掉启动窗口时复制先停下,不留下复制了一半的团队,DSH 里的团队不受影响。
- DSH 正在用这个团队:第一句「DeepSeek Harness 还在用这个团队」,下面「请完全退出 DSH Desktop(任务栏右下角的托盘图标也要退出),并关掉 DSH Web,这里会自动继续。」这张卡在答〔复制过来〕时才出现(卡片一出现就查到被占着时只是不暂存),每 2 秒自动重查,不用点重试,锁一放开就开始暂存和复制;卡上有〔先不复制〕,退不掉 DSH 的人有路可走。判断规则和 ds-bot 的 home-lock 一样:同一台机器上 PID 活着**而且**锁在 60 秒内刷新过(#428 的修法),被系统重用的旧 PID 不再算。
- 有更新版本 DSH 写的对话(下面两张卡的第一句都是「这些对话比我新」):更新器现在随应用一起启动,找到能读的版本时:「DeepSeek Bot 0.2.4 能读它们,正在下载(37%)。装好后会重新打开,再复制团队。」卡上有〔先不复制〕,还有「下载太慢?手动下载」;下载失败时〔重试〕〔手动下载〕(和恢复页的更新条一样)。位置在这之前不保存,重开后会再问导入。没找到时:「这些对话是更新版本的 DeepSeek Harness 写的,DeepSeek Bot 现在读不了。」主按钮是〔先不带团队开始〕(不再是「退出」),脚注「以后可以在 设置 → 通用 → 位置 里复制。」
- 复制失败(失败的卡没有鲸鱼的第一句):「团队没有复制完:{原因}。DeepSeek Harness 里的团队没有变化。」常见原因翻成人话(文件被别的程序占用 / 没有权限读取 / 磁盘满了),其他放进「详细信息」。〔重试〕〔先不带团队开始〕〔复制详细信息〕。失败或停止时删掉 `.import-<时间>` 暂存文件夹。
diff --git a/docs/plans/2026-10-29-start-copy.md b/docs/plans/2026-10-29-start-copy.md
index 63a4c044..6e502de1 100644
--- a/docs/plans/2026-10-29-start-copy.md
+++ b/docs/plans/2026-10-29-start-copy.md
@@ -50,7 +50,7 @@
鲸鱼的话 `voice.*`:`voice.slow45 / watchdog` 不动;`title.moving` → `voice.moving`,`title.failed` → `voice.failed`,`title.viewFailed` → `voice.viewFailed`「团队界面没有加载出来」(去句号),`slow.45.later` → `voice.slowLater`「比平时慢,请再等一会儿」(去句号;以后的启动和搬数据时 45 秒起由鲸鱼说)。启动窗口顺利时不说话([启动窗口](2026-10-26-start-window.md) 第 3 节),所以表里没有问候、各阶段的话和「进去吧」(`voice.hello / helloName / helloBack / data / found / engine / slow10 / team / ready`),`title.later`「正在打开你的团队…」也没有键。
-卡片第一行 `say.*`:`say.space / permission / rejected / picked / missing / importSpace / inUse / newer` 不动;停止复制的确认 `say.stopCopy`「停止复制?」。导入卡的第一行带数字,是 `card.import.line`「找到你以前的团队了:{bots} 个 Bot、{groups} 个群聊」(不是句子,不加句号);复制中没有卡片,所以没有 `say.copying`。
+卡片第一行 `say.*`:`say.space / permission / rejected / picked / missing / importSpace / inUse / newer` 不动。导入卡的第一行带数字,是 `card.import.line`「找到你以前的团队了:{bots} 个 Bot、{groups} 个群聊」(不是句子,不加句号);复制中没有卡片,所以没有 `say.copying`。
提示行 `hint.*`:只有 `hint.space`,不动。接模型、预览版说明和重装的三句(`hint.model / preview / reinstall`)没有键:启动页不提前说进门以后的事。
@@ -67,7 +67,6 @@
| `import.extra / model` | `card.import.extra / model` | 只在「详细」里;`lead / found / scope` 没有了 |
| `import.opt.regen / skipWork` | `card.import.optRegen / optSkipWork` | 勾选框的标签 |
| `import.space` | `card.importSpace.lead` | |
-| `stop.confirm` | `card.copying.stopConfirm` | |
| `inUse` | `card.inUse.lead` | |
| `newer.updating`、`newer.unreadable` | `card.newerUpdating.lead`、`card.newer.lead` | |
| `importFailed` | `card.importFailed.lead` | |
@@ -99,7 +98,6 @@
| `card.picked.use`、`card.picked.repick` | `btn.continue`、`btn.repick` | 继续、重新选…(加 …:它打开选择框) |
| `import.copy`、`import.skip` | `btn.copy`、`btn.skipCopy` | 复制过来、先不复制 |
| `import.more`、`import.change` | `btn.more`、`btn.changeModel` | 详细、更换 |
-| `stop`、`keepCopying` | `btn.stopCopy`、`btn.keepCopying` | 停止复制、继续复制 |
| `startWithout` | `btn.startWithout` | 先不带团队开始 |
| `copyDetails`、`copied`、`details` | `btn.copyDetails`、`btn.copied`、`btn.details` | |
| `update.install`、`manualDownload`、`reload` | `btn.install`、`btn.manualDownload`、`btn.reload` | |
@@ -195,3 +193,4 @@
- 2026-10-31:启动页的底注去掉([启动窗口](2026-10-26-start-window.md) 同一天的变更),表里去掉 `foot.community`;`foot` 层只剩位置行,第 2、3 节跟着改,「改动的已定设计」加一行。以后的启动搬数据改在卡片上问,加 `say.move`「搬到这个文件夹?」、`card.move.lead`、`reason.place.drive / workspace`(第 3 节对照表加一行,第 2 节 `reason.*` 改成九个原因);按钮用已有的 `btn.move / repick / cancel`。依据:维护者「移除左下角的社区非官方声明」「让我们尽可能避免系统中出现任何这样的默认弹窗」。
- 2026-11-01:启动页轻易不写字([启动窗口](2026-10-26-start-window.md) 同一天的变更),表里去掉 `voice.slow45 / slowLater / moving` 和 `btn.openLogs`,加 `btn.saveLog`「保存日志…」(打开系统保存框,所以以 … 结尾);`voice` 层只剩出错时的三句。第 3 节的旧键对照是当时的记录,不改。
- 2026-11-02:导入并进圆环([启动窗口](2026-10-26-start-window.md) 同一天的变更):加 `card.import.line`、`say.stopCopy` 和 `status.phase.import`「复制以前的团队」;去掉 `say.import / copying`、`card.import.lead / leadBare / found / scope` 和 `card.copying.step1 / 2 / 3 / eta / etaSoon`。
+- 2026-11-02:复制没有停止按钮([启动窗口](2026-10-26-start-window.md) 同一天的变更):去掉 `say.stopCopy`、`card.copying.stopConfirm`、`btn.stopCopy`、`btn.keepCopying`。