Skip to content

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

Start every ring with three arcs and grow the fourth when the copy starts

AdamPlatin123d5e4e72bdd76
diff --git a/app/src/main.mjs b/app/src/main.mjs
index 176d3ccf..fd6b5899 100644
--- a/app/src/main.mjs
+++ b/app/src/main.mjs
@@ -659,8 +659,8 @@ async function importStep(mine) {
if (result.outcome === 'gone' || signal.aborted || mine !== attempt) return undefined
importOffer = undefined
saveLocations(where)
- startWindow.done('import')
if (result.outcome === 'copied') {
+ startWindow.done('import')
const { summary } = result
console.log(`DeepSeek Bot: copied ${String(summary.bots)} Bots and ${String(summary.sessions)} Sessions from ${summary.from}`)
// The team lives here now; moving it is Settings' job (the data move).
diff --git a/app/src/start-window.mjs b/app/src/start-window.mjs
index dc3047a7..dcc3cb43 100644
--- a/app/src/start-window.mjs
+++ b/app/src/start-window.mjs
@@ -16,9 +16,12 @@ export const SHORT_START_SIZE = { width: 720, height: 500 }
const SHORT_WORK_AREA = 588
export const MAIN_SIZE = { width: 1320, height: 860 }
export const PHASES = ['data', 'engine', 'team']
-// A first start that copies a team from DSH has a stage of its own for the copy (§6).
+// A start that copies a team from DSH gets a stage of its own for the copy once the copy runs
+// (§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']
-export const phasesOf = state => (state.explain?.mode === 'import' ? IMPORT_PHASES : PHASES)
+const COPY_CARDS = ['copying', 'stopCopy', '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
export const TEAM_VIEW_MS = 20_000
diff --git a/app/src/start/start.css b/app/src/start/start.css
index 6faea75e..0edc2c31 100644
--- a/app/src/start/start.css
+++ b/app/src/start/start.css
@@ -137,12 +137,15 @@ html[data-resume] :is(.arc-fill,.ring-full){transition:none}
.gear-small{fill:color-mix(in srgb,var(--bt-ink-deepseek) 55%,transparent);animation:bt-turn 1.8s linear infinite reverse}
[data-p=engine]{animation:bt-pulse 1.35s ease-in-out infinite}
.pond:not(:has(.arc[data-phase=engine][data-state=active])) [data-p=engine]{animation:none}
-/* The import: a box is lifted off the old pile and carried onto the new one. */
+/* The import: a box is lifted off the old pile, tips forward along a dotted route and lands with a
+ squash on the new one, 1.6 s a trip. The pale pile is where the team was. */
.box rect{fill:var(--bt-ink-deepseek)}
-.box path{fill:none;stroke:var(--bt-card);stroke-width:1.2;stroke-linecap:round}
-.box-from rect{fill:color-mix(in srgb,var(--bt-ink-deepseek) 40%,transparent)}
-.box-moving{animation:bt-carry 1.6s cubic-bezier(.4,0,.2,1) infinite}
-@keyframes bt-carry{0%{translate:0 0;opacity:0}12%{translate:0 0;opacity:1}42%{translate:10px -17px}66%,86%{translate:20px -12px;opacity:1}100%{translate:20px -12px;opacity:0}}
+.box path{fill:none;stroke:var(--bt-card);stroke-width:1.3;stroke-linecap:round}
+.box-from rect{fill:color-mix(in srgb,var(--bt-ink-deepseek) 35%,transparent)}
+.box-from path{stroke:color-mix(in srgb,var(--bt-card) 70%,transparent)}
+.route{fill:none;stroke:color-mix(in srgb,var(--bt-ink-deepseek) 55%,transparent);stroke-width:1.5;stroke-linecap:round;stroke-dasharray:0 3.4}
+.box-moving{transform-origin:50% 100%;animation:bt-carry 1.6s infinite}
+@keyframes bt-carry{0%{translate:0 0;rotate:0deg;scale:1;opacity:0;animation-timing-function:ease-out}12%{translate:0 -2px;opacity:1;animation-timing-function:cubic-bezier(.3,.6,.5,1)}38%{translate:10px -15px;rotate:14deg;animation-timing-function:cubic-bezier(.5,0,.8,.4)}62%{translate:21px -12px;rotate:0deg;scale:1.12 .86;animation-timing-function:ease-out}72%{scale:.96 1.05}80%,90%{translate:21px -12px;scale:1;opacity:1}100%{translate:21px -12px;opacity:0}}
@keyframes bt-turn{to{rotate:360deg}}
@keyframes bt-pulse{0%,100%{transform:none}15%{transform:scale(1.07)}35%{transform:none}}
.mate circle{fill:var(--bt-ink-deepseek)}
diff --git a/app/src/start/start.html b/app/src/start/start.html
index 880aabea..41f18c9f 100644
--- a/app/src/start/start.html
+++ b/app/src/start/start.html
@@ -14,7 +14,7 @@
<main class="stage">
<div class="pond">
<svg class="ring" viewBox="0 0 220 220" aria-hidden="true"><g class="arc" data-phase="data" data-state="pending"><path class="arc-base" d="M119.24 4.40A106 106 0 0 1 206.07 154.80" pathLength="100"/><path class="arc-fill" d="M119.24 4.40A106 106 0 0 1 206.07 154.80" pathLength="100"/><path class="arc-glow" d="M119.24 4.40A106 106 0 0 1 206.07 154.80" pathLength="100"/></g><g class="arc" data-phase="engine" data-state="pending"><path class="arc-base" d="M196.83 170.80A106 106 0 0 1 23.17 170.80" pathLength="100"/><path class="arc-fill" d="M196.83 170.80A106 106 0 0 1 23.17 170.80" pathLength="100"/><path class="arc-glow" d="M196.83 170.80A106 106 0 0 1 23.17 170.80" pathLength="100"/></g><g class="arc" data-phase="team" data-state="pending"><path class="arc-base" d="M13.93 154.80A106 106 0 0 1 100.76 4.40" pathLength="100"/><path class="arc-fill" d="M13.93 154.80A106 106 0 0 1 100.76 4.40" pathLength="100"/><path class="arc-glow" d="M13.93 154.80A106 106 0 0 1 100.76 4.40" pathLength="100"/></g><g class="arc" data-phase="import" data-state="pending"><path class="arc-base" d="M215.60 119.24A106 106 0 0 1 119.24 215.60" pathLength="100"/><path class="arc-fill" d="M215.60 119.24A106 106 0 0 1 119.24 215.60" pathLength="100"/><path class="arc-glow" d="M215.60 119.24A106 106 0 0 1 119.24 215.60" pathLength="100"/></g><circle class="ring-full" cx="110" cy="110" r="106" pathLength="100" transform="rotate(-90 110 110)"/></svg>
-<svg class="props" viewBox="0 0 40 40" aria-hidden="true"><g data-p="data"><path class="folder-back" d="M4 12a2 2 0 0 1 2-2h9l3 3h16a2 2 0 0 1 2 2v19a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2Z"/><g class="page"><rect x="9" y="7" width="22" height="22" rx="1.5"/><path d="M13 13h14M13 17h14M13 21h9"/></g><g class="page"><rect x="9" y="7" width="22" height="22" rx="1.5"/><path d="M13 13h14M13 17h14M13 21h9"/></g><g class="page"><rect x="9" y="7" width="22" height="22" rx="1.5"/><path d="M13 13h14M13 17h14M13 21h9"/></g><path class="folder-front" d="M2.5 19h35l-2.2 15.2a2 2 0 0 1-2 1.8H6.7a2 2 0 0 1-2-1.8Z"/></g><g data-p="import"><g class="box box-from"><rect x="3" y="24" width="13" height="12" rx="2"/><path d="M3 28h13M9.5 24v4"/></g><g class="box"><rect x="23" y="24" width="13" height="12" rx="2"/><path d="M23 28h13M29.5 24v4"/></g><g class="box box-moving"><rect x="3" y="24" width="13" height="12" rx="2"/><path d="M3 28h13M9.5 24v4"/></g></g><g data-p="engine"><path class="gear gear-big" fill-rule="evenodd" d="M23.25 22.40L25.94 22.85L25.94 25.15L23.25 25.60L22.35 28.07L24.12 30.15L22.64 31.91L20.29 30.53L18.01 31.84L18.03 34.57L15.77 34.97L14.85 32.40L12.27 31.94L10.53 34.05L8.53 32.90L9.49 30.34L7.80 28.33L5.11 28.82L4.33 26.66L6.70 25.31L6.70 22.69L4.33 21.34L5.11 19.18L7.80 19.67L9.49 17.66L8.53 15.10L10.53 13.95L12.27 16.06L14.85 15.60L15.77 13.03L18.03 13.43L18.01 16.16L20.29 17.47L22.64 16.09L24.12 17.85L22.35 19.93ZM18.00 24.00A3 3 0 1 0 12.00 24.00A3 3 0 1 0 18.00 24.00Z"/><path class="gear gear-small" fill-rule="evenodd" d="M23.26 16.79L21.10 16.54L20.93 14.17L23.03 13.61L24.16 11.26L23.29 9.27L25.26 7.93L26.79 9.47L29.40 9.27L30.69 7.52L32.83 8.55L32.26 10.65L33.74 12.81L35.90 13.06L36.07 15.43L33.97 15.99L32.84 18.34L33.71 20.33L31.74 21.67L30.21 20.13L27.60 20.33L26.31 22.08L24.17 21.05L24.74 18.95ZM30.70 14.80A2.2 2.2 0 1 0 26.30 14.80A2.2 2.2 0 1 0 30.70 14.80Z"/></g><g data-p="team"><g transform="translate(8 30)"><g class="mate"><circle cx="0" cy="0" r="7"/><rect x=".8" y="-3.3" width="1.9" height="4.6" rx=".95"/><rect x="3.8" y="-3.7" width="1.6" height="4.3" rx=".8"/></g></g><g transform="translate(20 22)"><g class="mate"><circle cx="0" cy="0" r="7"/><rect x=".8" y="-3.3" width="1.9" height="4.6" rx=".95"/><rect x="3.8" y="-3.7" width="1.6" height="4.3" rx=".8"/></g></g><g transform="translate(32 30)"><g class="mate"><circle cx="0" cy="0" r="7"/><rect x=".8" y="-3.3" width="1.9" height="4.6" rx=".95"/><rect x="3.8" y="-3.7" width="1.6" height="4.3" rx=".8"/></g></g></g></svg>
+<svg class="props" viewBox="0 0 40 40" aria-hidden="true"><g data-p="data"><path class="folder-back" d="M4 12a2 2 0 0 1 2-2h9l3 3h16a2 2 0 0 1 2 2v19a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2Z"/><g class="page"><rect x="9" y="7" width="22" height="22" rx="1.5"/><path d="M13 13h14M13 17h14M13 21h9"/></g><g class="page"><rect x="9" y="7" width="22" height="22" rx="1.5"/><path d="M13 13h14M13 17h14M13 21h9"/></g><g class="page"><rect x="9" y="7" width="22" height="22" rx="1.5"/><path d="M13 13h14M13 17h14M13 21h9"/></g><path class="folder-front" d="M2.5 19h35l-2.2 15.2a2 2 0 0 1-2 1.8H6.7a2 2 0 0 1-2-1.8Z"/></g><g data-p="import"><path class="route" d="M10 20Q19 3 29 9"/><g class="box box-from"><rect x="2" y="24" width="14" height="12" rx="2"/><path class="lid" d="M2 28h14"/><path class="tape" d="M9 24v4"/></g><g class="box"><rect x="23" y="24" width="14" height="12" rx="2"/><path class="lid" d="M23 28h14"/><path class="tape" d="M30 24v4"/></g><g class="box box-moving"><rect x="2" y="24" width="14" height="12" rx="2"/><path class="lid" d="M2 28h14"/><path class="tape" d="M9 24v4"/></g></g><g data-p="engine"><path class="gear gear-big" fill-rule="evenodd" d="M23.25 22.40L25.94 22.85L25.94 25.15L23.25 25.60L22.35 28.07L24.12 30.15L22.64 31.91L20.29 30.53L18.01 31.84L18.03 34.57L15.77 34.97L14.85 32.40L12.27 31.94L10.53 34.05L8.53 32.90L9.49 30.34L7.80 28.33L5.11 28.82L4.33 26.66L6.70 25.31L6.70 22.69L4.33 21.34L5.11 19.18L7.80 19.67L9.49 17.66L8.53 15.10L10.53 13.95L12.27 16.06L14.85 15.60L15.77 13.03L18.03 13.43L18.01 16.16L20.29 17.47L22.64 16.09L24.12 17.85L22.35 19.93ZM18.00 24.00A3 3 0 1 0 12.00 24.00A3 3 0 1 0 18.00 24.00Z"/><path class="gear gear-small" fill-rule="evenodd" d="M23.26 16.79L21.10 16.54L20.93 14.17L23.03 13.61L24.16 11.26L23.29 9.27L25.26 7.93L26.79 9.47L29.40 9.27L30.69 7.52L32.83 8.55L32.26 10.65L33.74 12.81L35.90 13.06L36.07 15.43L33.97 15.99L32.84 18.34L33.71 20.33L31.74 21.67L30.21 20.13L27.60 20.33L26.31 22.08L24.17 21.05L24.74 18.95ZM30.70 14.80A2.2 2.2 0 1 0 26.30 14.80A2.2 2.2 0 1 0 30.70 14.80Z"/></g><g data-p="team"><g transform="translate(8 30)"><g class="mate"><circle cx="0" cy="0" r="7"/><rect x=".8" y="-3.3" width="1.9" height="4.6" rx=".95"/><rect x="3.8" y="-3.7" width="1.6" height="4.3" rx=".8"/></g></g><g transform="translate(20 22)"><g class="mate"><circle cx="0" cy="0" r="7"/><rect x=".8" y="-3.3" width="1.9" height="4.6" rx=".95"/><rect x="3.8" y="-3.7" width="1.6" height="4.3" rx=".8"/></g></g><g transform="translate(32 30)"><g class="mate"><circle cx="0" cy="0" r="7"/><rect x=".8" y="-3.3" width="1.9" height="4.6" rx=".95"/><rect x="3.8" y="-3.7" width="1.6" height="4.3" rx=".8"/></g></g></g></svg>
<div class="water" aria-hidden="true"></div>
<div class="lane"><div class="whale-x"><div class="whale-gaze"><div class="whale"><div class="whale-move"><div class="whale-loop">
<!-- whale --><svg class="whale-svg" viewBox="0 0 100 100" aria-hidden="true" focusable="false"><defs><mask id="st-eyes" maskUnits="userSpaceOnUse" x="-100" y="-100" width="300" height="300"><rect x="-100" y="-100" width="300" height="300" fill="#fff"/><g id="gaze" class="bt-gaze"><g id="eye-pair" class="bt-eyes" fill="#000"><g transform="translate(72.5 48.4) rotate(-15.8)"><rect class="bt-eye" x="-4.65" y="-11.5" width="9.3" height="23" rx="4.65"/></g><g transform="translate(85.6 43.4) rotate(-21.2)"><rect class="bt-eye" x="-3.5" y="-11.45" width="7" height="22.9" rx="3.5"/></g><g transform="translate(72.5 48.4) rotate(-15.8)"><path class="bt-eye-happy" opacity="0" d="M-5.766 3.22Q0 -9.66 5.766 3.22" fill="none" stroke="#000" stroke-width="4.65" stroke-linecap="round"/></g><g transform="translate(85.6 43.4) rotate(-21.2)"><path class="bt-eye-happy" opacity="0" d="M-4.34 3.206Q0 -9.617999999999999 4.34 3.206" fill="none" stroke="#000" stroke-width="3.5" stroke-linecap="round"/></g></g></g></mask><clipPath id="st-tail-cut" clipPathUnits="userSpaceOnUse"><path d="M-100 -100H32.45V52.05L36.02 53.85L27.9 61.1L23.35 70.15L23.35 200H-100Z"/></clipPath><clipPath id="st-torso-cut" clipPathUnits="userSpaceOnUse"><path d="M32.45 -100H200V200H-100V70.15H23.35L32.45 52.05Z"/></clipPath><g id="whale-layers" fill-rule="evenodd"><g id="w-body"><path d="M65.3 20.9l5.1 .1 4.8 .9 4.8 1.7 4.3 2.3 3.8 3.1 3 3.4 2.3 3.8 1.6 4.3 .9 4.3 0 4.8-.8 4.8-1.4 4.3-2.3 4.3-3.2 4.3-3.4 3.3-4.3 3.1-7.2 3.5-7.6 1.7-7.2 .1-9.6-1.6-3.3-1-2.9-1.7-8.8-8.9-6-4.7-3.3-.5-7.7 1.1-4.8-.1-4.7-1.2-1.9-1.2-1-1-.5-1.5 .4-1.4 1.1-1.3 1.9-1.3 4.7-1.5 7.7-.6 1.1-.5 .7-1 0-1.4-2.8-7.2-1.2-5.3-.1-4.3 .4-1.4 .9-1.2 1.9-.2 2 1 2.2 2.3 2.2 3.4 3.2 7.6 1.9 9.7 .5-.1 1.1-7.2 1.8-4.8 3.2-5.2 3.9-4.3 4.9-3.9 5.6-2.9 5.8-1.9z" fill="var(--bt-ink-deepseek)"/></g><g id="w-belly"><path d="M93.3 55.8l1-.3 .1 1.2-2.4 5.3-3.4 4.8-3.8 3.8-4.8 3.4-5.7 2.8-4.8 1.5-4.8 .4 20.1-17.4 5.2-3.7z" fill="#fff" fill-opacity="1"/></g><g id="w-shade"><path d="M88.6 29.5l2.4 2.9 1.9 2.8 2.4 6.3 .5 3.3 .1 5.3-1.5 6.6-1.9 4.3-2 3.3-4.8 5.4-5.7 4.3-7.2 3.3-6.2 1.5-6.7 .1-3.3-.2-9.6-1.8-3.3-1.5-2.4-1.9-8.6-8.9-5.3-3.9-3.3-.1-2.9 .2-3.3 .8-5.8 0-4.3-1-2.9-1.9 .6-.6 3.8-1.3 10.5-2.5 4.3 .9 1.4-.1 2.2-1.7 .5-1.4-.3-1.5-1.2-1.4-2.2-1.4-1.2-1.9-.6-12 .4-3.3 .5-.5 2.9 3.8 2.4 4.8 1.9 5.7 .7 5.8 .7 2.8 2.1 2.4 2.7 5.5 3.8 4.3 2.9 2.2 3.3 1 3.4-.4 6.2-3 7.1-4.5 7.3-5.6 6.6-5.9 5.9-6.5 3.7-5.3 1.7-4.2 .1-2.9z" fill="#000" fill-opacity=".14"/></g><g id="w-light"><path d="M55.6 22.8l1.9-.3 1.5 .3 .6 1 .1 .9-2 4.3-3.8 5.3-5.8 6.2-5.4 4.4-4.8 2.3-1.4 0-1.2-.5-.8-1.9 .5-3.3 2.5-4.8 3.3-4.3 2.4-2.4 5.3-3.9zM19.3 28.1l-1.4 2 .3-1.1zM21.7 49.1l.6 .5-.3 .5-.8 0zM35.8 52l1.2-.4 .9 .7 .7 1.6-.4 .9-1.2 .1-2.6-.5zM7.2 52.9l-2.9 2.9 1.2-1.6z" fill="#fff" fill-opacity=".16"/></g></g></defs><g class="bt-b"><g mask="url(#st-eyes)"><g id="tail"><use href="#whale-layers" clip-path="url(#st-tail-cut)"/></g><g id="torso"><use href="#whale-layers" clip-path="url(#st-torso-cut)"/></g></g></g></svg><!-- /whale -->
diff --git a/app/src/start/start.js b/app/src/start/start.js
index bc051141..45979817 100644
--- a/app/src/start/start.js
+++ b/app/src/start/start.js
@@ -331,11 +331,12 @@ async function flyIn(mine) {
land()
}
}
-// The middle of the import's arc, where the page shows it now (the pond may be shrunk).
+// Where the import's arc is, as the page shows it now (the pond may be shrunk): the middle of the
+// arc on a ring of four, else the gap after the data folder's arc that it grows out of.
function importPoint() {
- const path = $('.arc[data-phase=import] .arc-base')
- const p = path.getPointAtLength(path.getTotalLength() / 2)
- return new DOMPoint(p.x, p.y).matrixTransform(path.getScreenCTM())
+ const ring = $('.ring')
+ const a = ((ring.dataset.n === '4' ? 135 : 120) * Math.PI) / 180
+ return new DOMPoint(110 + 106 * Math.sin(a), 110 - 106 * Math.cos(a)).matrixTransform(ring.getScreenCTM())
}
// What a new card says to a screen reader: its first line and its first visible sentence (the
@@ -504,7 +505,9 @@ function apply(next) {
placeUI(next.place)
stopButton.hidden = !(next.view === 'card' && next.card?.kind === 'copying' && next.card.step < 3)
const name = blockFor(next)
- if (name !== shown) showBlock(name, jump)
+ // 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) })
+ else if (name !== shown) showBlock(name, jump)
else { fillBlock(name); resize() }
timeUI()
director.update(next)
diff --git a/app/src/start/whale.js b/app/src/start/whale.js
index c080c26d..8d5ae4b2 100644
--- a/app/src/start/whale.js
+++ b/app/src/start/whale.js
@@ -25,14 +25,22 @@ const CLEAR = ['transform', 'scale', 'translate']
const OUT = 'cubic-bezier(.4,0,.2,1)'
const HOP = 'cubic-bezier(.3,.7,.4,1)'
const PHASES = ['data', 'engine', 'team']
-// The path of arc k of n round the whale: from the top, clockwise, 10 degrees between arcs.
-export function arcPath(k, n) {
+// The path of an arc round the whale from one angle to another, in degrees clockwise from the top.
+export function arcD(from, to) {
const at = (deg) => {
const r = (deg * Math.PI) / 180
return `${(110 + 106 * Math.sin(r)).toFixed(2)} ${(110 - 106 * Math.cos(r)).toFixed(2)}`
}
- const span = 360 / n
- return `M${at(k * span + 5)}A106 106 0 0 1 ${at((k + 1) * span - 5)}`
+ return `M${at(from)}A106 106 0 ${to - from > 180 ? 1 : 0} 1 ${at(to)}`
+}
+// Arc k of n: 10 degrees between arcs.
+export const arcPath = (k, n) => arcD(k * (360 / n) + 5, (k + 1) * (360 / n) - 5)
+// Where each stage's arc runs on a ring of these stages. On a ring of three, the import's arc is a
+// point in the gap after the data folder's, where it grows from.
+function spansOf(list) {
+ const out = { import: [120, 120] }
+ list.forEach((phase, k) => { out[phase] = [k * (360 / list.length) + 5, (k + 1) * (360 / list.length) - 5] })
+ return out
}
// An active station and a state loop each hold at least 400 ms; the margin covers the frame
// on which the change is painted.
@@ -115,11 +123,14 @@ export function createDirector({ start, resume, act, label, announce, onCheck, o
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)
+ // 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
const first = start === 'first'
// The entrance's clock starts once the window is on screen (`begin`, start.js).
let t0 = performance.now()
const entranceMs = resume ? 0 : first ? 560 : 290
- const D = { at: 0, checks: 0, pose: 'enter', loop: '', card: '', slow: 0, bx: 0, by: 0, since: [t0], activeAt: [], loopAt: 0, hop: null, pet: null, handed: false, workReady: first, missed: false, sinking: false,
+ const D = { at: 0, checks: 0, passed: 0, pose: 'enter', loop: '', card: '', slow: 0, bx: 0, by: 0, since: [t0], activeAt: [], loopAt: 0, hop: null, pet: null, handed: false, workReady: first, missed: false, sinking: false,
// Rest on a card: its clock, the lean, the breath, the lively hops; the last glance and press.
clockKind: '', cardAt: 0, lean: false, leanDue: false, leanOff: false, leanMine: -1, restMine: -1, breath: null, hopsStopped: false, legging: false, glanceAt: -Infinity, press: null, nodAt: 0 }
const rnd = Math.random
@@ -172,12 +183,20 @@ export function createDirector({ start, resume, act, label, announce, onCheck, o
setStation(i, 'done')
announce(label('status.sr.done', { phase: label(`status.phase.${phases[i]}`) }))
onCheck?.(i)
+ // Its fill is drawn (.56 s, .12 s with reduced motion) before anything waits on it.
+ setTimeout(() => {
+ D.passed = Math.max(D.passed, i + 1)
+ const due = throughs.filter(([at]) => at < D.passed)
+ throughs = throughs.filter(([at]) => at >= D.passed)
+ for (const [, resolve] of due) resolve()
+ }, instant ? 0 : reduced() ? 120 : 560)
}
+ let throughs = []
let activeTimer = 0
function armActive() {
clearTimeout(activeTimer)
const i = D.at
- if (D.handed || failure() || i > last() || D.checks > i || stationEl(i).dataset.state !== 'pending') return
+ if (D.handed || failure() || i > last() || D.checks > i || stationEl(i).dataset.state !== 'pending' || (holding() && i >= 1)) return
if (i < last() && want.done.includes(phases[i])) return
// The import's arc turns active once the copy runs and the card has flown into it.
if (phases[i] === 'import' && (!copying() || D.flying)) return
@@ -654,6 +673,9 @@ export function createDirector({ start, resume, act, label, announce, onCheck, o
importArc?.style.removeProperty('--f')
D.at = 0
D.checks = 0
+ D.passed = 0
+ D.asked = false
+ D.answered = false
D.failed = undefined
D.since = [performance.now()]
D.activeAt = []
@@ -931,7 +953,7 @@ export function createDirector({ start, resume, act, label, announce, onCheck, o
if (!failure() && ['down', 'lift', 'redo'].includes(D.pose)) await shakeOff()
await runLegs()
if (want.view === 'handoff') return handoff()
- if (copying()) armActive()
+ if (copying() || (['boot', 'moving'].includes(want.view) && !holding())) armActive()
if (failure()) {
if (D.pose === 'redo') D.pose = 'loop'
await goDown()
@@ -958,32 +980,76 @@ export function createDirector({ start, resume, act, label, announce, onCheck, o
})()
}
- // A first start learns that it copies a team once its page is up (main.mjs boot): the ring is
- // drawn again with four arcs, out of sight while the window is not yet shown, else in a fade.
+ // The copy starts (start-window §6): the ring goes from three arcs to four, the import's arc
+ // growing out of the gap after the data folder's while the others make room; it goes back to
+ // three when the copy stops. The stages change at once, the drawing once the card has landed.
function relayout(list) {
+ const gone = phases.filter(phase => !list.includes(phase))
phases = list
for (const st of stations) st.hidden = !list.includes(st.dataset.phase)
clearTimeout(activeTimer)
+ for (const phase of gone) {
+ const st = stations.find(entry => entry.dataset.phase === phase)
+ st.dataset.state = 'pending'
+ st.removeAttribute('aria-current')
+ document.querySelector(`.arc[data-phase="${phase}"]`).dataset.state = 'pending'
+ if (phase === 'import') importArc?.style.removeProperty('--f')
+ }
for (let i = D.checks; i < list.length; i += 1) setStation(i, 'pending')
D.activeAt = D.activeAt.slice(0, D.checks)
- const swap = () => {
- ring.dataset.n = String(list.length)
- list.forEach((phase, k) => { for (const path of arcEl(k).querySelectorAll('path')) path.setAttribute('d', arcPath(k, list.length)) })
+ if (D.failed !== undefined && D.failed >= D.checks) D.failed = undefined
+ if (D.flying) D.layoutDue = true
+ else reshape()
+ }
+ // The arcs' angles as drawn, and the ring's re-layout between them: every frame of the shape
+ // spring draws each arc between its old and new angles, so the arcs stay on the circle.
+ let drawn = spansOf(PHASES)
+ let shaping = 0
+ function paint(spans) {
+ drawn = spans
+ for (const arc of document.querySelectorAll('.arc')) {
+ const [from, to] = spans[arc.dataset.phase]
+ for (const path of arc.querySelectorAll('path')) path.setAttribute('d', arcD(from, Math.max(from + 0.01, to)))
+ arc.style.opacity = to - from < 1 ? String(Math.max(0, to - from)) : ''
}
- if (instant || !D.started || root.hasAttribute('data-held')) { swap(); return }
- const out = play(ring, [{ opacity: 1 }, { opacity: 0 }], { duration: 120, easing: 'ease-in' })
- out.done.then(() => { swap(); out.cancel(); play(ring, [{ opacity: 0 }, { opacity: 1 }], { duration: 220, easing: 'ease-out', fill: 'none' }) })
+ }
+ function reshape() {
+ const target = spansOf(phases)
+ const mine = (shaping += 1)
+ paint(drawn)
+ if (phases.length === 4) ring.dataset.n = '4'
+ const done = () => { if (mine !== shaping) return; paint(target); if (phases.length !== 4) delete ring.dataset.n }
+ if (instant || !D.started || root.hasAttribute('data-held') || reduced()) { done(); return }
+ const from = drawn
+ const curve = spring('shape')
+ // A clock that does nothing but run the spring: its progress is the eased one.
+ const clock = ring.animate([{ opacity: 1 }, { opacity: 1 }], { duration: curve.duration, easing: curve.easing })
+ const frame = () => {
+ if (mine !== shaping) { clock.cancel(); return }
+ const t = clock.playState === 'finished' ? null : clock.effect.getComputedTiming().progress
+ if (t === null) { done(); return }
+ const mix = {}
+ for (const phase of Object.keys(target)) mix[phase] = [0, 1].map(k => from[phase][k] + (target[phase][k] - from[phase][k]) * t)
+ paint(mix)
+ requestAnimationFrame(frame)
+ }
+ requestAnimationFrame(frame)
+ setTimeout(done, curve.duration + 200)
}
let caughtTimer = 0
return {
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 (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()
phases.forEach((phase, k) => { if (done.includes(phase) && !want.done.includes(phase)) D.since[k + 1] = now })
let station = 0
while (station < last() && done.includes(phases[station])) station += 1
+ if (holding()) station = Math.min(station, 1)
if (typeof s.card?.arc === 'number') importArc?.style.setProperty('--f', s.card.arc.toFixed(3))
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
@@ -1006,11 +1072,16 @@ export function createDirector({ start, resume, act, label, announce, onCheck, o
if (level === 2 || previous === 2) { bump(); kick() }
},
nod,
+ // Resolves once arc i is done and drawn full (start.js shows the import card after the first).
+ through(i) {
+ return new Promise((resolve) => { if (D.passed > i) resolve(); else throughs.push([i, resolve]) })
+ },
// The card flies into the import's arc (start.js flyIn()): the arc lights up as it lands.
flight(landed) {
D.flying = true
landed.then(() => {
D.flying = false
+ if (D.layoutDue) { D.layoutDue = false; reshape() }
// Lit as it lands, even when the copy is done by then: it holds HOLD before it fills.
const i = phases.indexOf('import')
if (i >= 0 && D.at === i && stationEl(i).dataset.state === 'pending' && !failure() && !D.handed) {
diff --git a/app/test/main-import.test.mjs b/app/test/main-import.test.mjs
index ece49648..748acba7 100644
--- a/app/test/main-import.test.mjs
+++ b/app/test/main-import.test.mjs
@@ -38,8 +38,8 @@ test('the first start offers the DSH team on the import card, copies it on cards
await import('../src/main.mjs')
await waitFor(() => startState()?.card?.kind === 'import', 'offer the team on the import card')
const offer = startState().card
- // The copy is a stage of its own on the start page's ring.
- assert.deepEqual(startState().phases, ['data', 'import', 'engine', 'team'])
+ // The ring has three arcs while the card asks; the copy brings a fourth (checked below).
+ assert.deepEqual(startState().phases, ['data', 'engine', 'team'])
assert.deepEqual([offer.bots, offer.groups, offer.sessions, offer.names], [2, 0, 2, 'Chief, Writer'])
assert.equal(offer.path, dsh)
assert.equal(existsSync(join(paths.userData, 'locations.json')), false, 'the places wait for the answer')
diff --git a/app/test/start-page.test.mjs b/app/test/start-page.test.mjs
index 174ef95c..ded1a7a0 100644
--- a/app/test/start-page.test.mjs
+++ b/app/test/start-page.test.mjs
@@ -98,8 +98,9 @@ test('the start page draws the progress as a ring of three or four arcs and a cl
assert.match(read('start.css'), /\.ring:not\(\[data-n="4"\]\) \.arc\[data-phase=import\]\{display:none\}/u)
// The director draws the same arcs.
const source = code['whale.js']
- const body = source.match(/^export function arcPath\(k, n\) \{$[\s\S]*?^\}$/mu)[0].replace('export ', '')
- const arcPath = new Function(`${body}\nreturn arcPath`)()
+ const arcD = source.match(/^export function arcD\(from, to\) \{$[\s\S]*?^\}$/mu)[0].replace('export ', '')
+ const arcPathOf = source.match(/^export const arcPath = .*$/mu)[0].replace('export ', '')
+ const arcPath = new Function(`${arcD}\n${arcPathOf}\nreturn arcPath`)()
assert.equal(arcPath(0, 3), arcs[0][2].match(/d="([^"]+)"/u)[1])
assert.equal(arcPath(2, 3), arcs[2][2].match(/d="([^"]+)"/u)[1])
assert.equal(arcPath(1, 4), arcs[3][2].match(/d="([^"]+)"/u)[1])
diff --git a/app/test/start-window.test.mjs b/app/test/start-window.test.mjs
index 758835a1..59c1e03a 100644
--- a/app/test/start-window.test.mjs
+++ b/app/test/start-window.test.mjs
@@ -433,27 +433,36 @@ test('the 180 s question comes on the start\'s clock while the engine is not up'
assert.equal(s.state().view, 'boot')
})
-// A first start that copies a team has a stage of its own for the copy, between the data and the
-// engine (§6). The engine that warmed up while the card waited stops for the copy: its stage is
-// open again until the copied team's engine is up.
-test("an import is a stage of its own, and the engine's stage waits for the copied team's engine", (t) => {
+// The copy is a stage of its own, between the data and the engine (§6), from the moment it runs:
+// the ring has three arcs while the import card asks, keeps the fourth once the copy is done, and
+// goes back to three when the copy stops. The engine that warmed up while the card waited stops
+// for the copy: its stage is open again until the copied team's engine is up.
+test("the copy is a stage of its own, and the engine's stage waits for the copied team's engine", (t) => {
const s = startWindow(t)
s.start.open('first')
- s.start.explain(explainOf())
- assert.deepEqual(s.state().phases, ['data', 'engine', 'team'])
s.start.explain(explainOf({ offered: true }))
- assert.deepEqual(s.state().phases, ['data', 'import', 'engine', 'team'])
+ assert.deepEqual(s.state().phases, ['data', 'engine', 'team'])
s.start.done('data')
- assert.equal(s.state().phase, 'import')
+ s.start.card({ kind: 'import', bots: 4, groups: 0 })
s.start.done('engine')
- assert.deepEqual(s.state().done, ['data', 'engine'])
+ assert.deepEqual(s.state().phases, ['data', 'engine', 'team'], 'three arcs while the card asks')
+ const copying = (step, arc) => ({ kind: 'copying', step, fraction: 0, arc, steps: [{}, {}, {}] })
+ 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')
+ s.start.card(copying(2, 0.15))
s.start.engineDown()
assert.deepEqual(s.state().done, ['data'])
s.start.ready()
assert.notEqual(s.state().view, 'handoff', 'no hand-off while no engine is up')
s.start.done('import')
assert.equal(s.state().phase, 'engine')
+ s.start.card(undefined)
+ assert.equal(s.state().phases.length, 4, 'a done copy keeps its arc')
s.start.done('engine')
assert.deepEqual(s.state().done, ['data', 'import', 'engine'])
s.start.ready()
diff --git a/docs/plans/2026-10-26-start-window.md b/docs/plans/2026-10-26-start-window.md
index 417ac932..64009272 100644
--- a/docs/plans/2026-10-26-start-window.md
+++ b/docs/plans/2026-10-26-start-window.md
@@ -47,7 +47,7 @@
| 部分 | 没有卡片时 | 有卡片时 | 内容 |
|---|---|---|---|
| 标题带 | y 0–40 | 同左 | 空,可以拖动 |
-| 圆环 | 圆心 (360, 255),半径 106 | 圆心 (360, 150),半径约 66 | 三段弧,一段一个阶段;从 DSH 复制团队的首次启动四段(见下面);2 px 的线,圆头 |
+| 圆环 | 圆心 (360, 255),半径 106 | 圆心 (360, 150),半径约 66 | 三段弧,一段一个阶段;从 DSH 复制团队时,复制开始后四段(见下面);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 节列的几种时候有字 |
@@ -61,13 +61,13 @@
- 完成:`--bt-ink-deepseek` 的线顺时针把这一段画满,.56 s。
- 失败:这段线变成 60% 的 `--bt-danger`(第 7 节)。
- 交接:段与段之间的空隙接上,合成一整圈(.3 s),整圈鼓起一次(.5 s,最大 1.035 倍,第 8 节)。
-- 从 DSH 复制团队的首次启动(导入卡,第 6 节)多一个阶段「复制以前的团队」,排在数据文件夹和引擎之间:圆环是四段,各占 90°,段与段之间仍空 10°(每段画出 80°),依次是数据文件夹、复制、引擎、团队。其他启动仍是三段;没有导入的启动多出一段空着的弧只会让人以为少做了一件事。主进程在页面画出来以后才知道要不要导入,所以圆环换成四段时:窗口还没露面就直接换,已经露面就整圈淡出 .12 s、换好再淡入 .22 s。复制这一段:
- - 卡片答〔复制过来〕以后才进行中(问的时候只是没开始),卡片飞进来落地时亮起(第 6 节)。
+- 每次启动都从三段开始,要导入的首次启动也一样。答〔复制过来〕、复制开始以后,多出一个阶段「复制以前的团队」,排在数据文件夹和引擎之间:圆环变成四段,各占 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;没进行中就完成的阶段(一般的首次启动里的数据阶段)不出道具。颜色是 `--bt-ink-deepseek` 和它的淡色,纸和成员的眼睛是 `--bt-card`。道具在水塘里,出卡片时跟着缩小上移;失败、卡片等回答(那段弧不是进行中)和交接时没有。
+- 道具:鲸鱼面前(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;没进行中就完成的阶段(一般的首次启动里的数据阶段)不出道具。颜色是 `--bt-ink-deepseek` 和它的淡色,纸和成员的眼睛是 `--bt-card`。道具在水塘里,出卡片时跟着缩小上移;失败、卡片等回答(那段弧不是进行中)和交接时没有。
- 圆环、水道、水线、鲸鱼的点击区和涟漪是一块,下面叫水塘。没有卡片时,水塘、鲸鱼的话和提示行整组比有卡片时低 45 px,鲸鱼在窗口的视觉中心稍上一点。要出卡片时,整组用 `SPRING_SHAPE` 上移 45 px,水塘在同一个弹簧里以圆心为准缩到 .62 倍、再上移 60 px,圆环落在卡片上面,卡片出现在下面的纸面里;卡片收回后,水塘回到原大,整组回到低处。位置行不动。页面不能滚动(第 11 节)。
- 鲸鱼的话和提示行直接写在 Mica 上。没有卡片时它们在纸面的位置上:纸面空着时点击穿过它。
- 卡片是不透明的 `--bt-card`:1 px `--bt-line` 边,圆角 12,内边距 16 × 20。卡片正文比纸面高时,正文在卡片里滚动,按钮行固定在卡片底部。
@@ -211,15 +211,15 @@
- 找不到数据文件夹(多见于以后的启动):文字和按钮按第 3 节已定的,主按钮在前。〔重试〕后还是找不到:按钮下面出现「还是找不到这个文件夹。」(`--bt-danger`,4 秒后淡出)。鲸鱼的眼睛左右看一遍,不跳。
- 导入(第 4 节)都在纸面里,用同一套变形:
- 导入卡越短越好:只有一行「找到你以前的团队了:4 个 Bot、0 个群聊」和〔复制过来〕(主按钮,拿到焦点)〔先不复制〕,按钮行末尾一个「详细」。「详细」是和失败页一样的折叠区,展开才有:「复制后会多占 4.6 GB,DeepSeek Harness 里的原件不动。」(不到 1 MB 写「不到 1 MB」,不写「0 MB」)、「模型设置:DeepSeek API · DeepSeek-V4-Pro 更换」、两个勾选框、脚注「也可以在 设置 → 通用 → 位置 里复制。」;展开时卡片的边用 `SPRING_SHAPE` 长高,内容晚 70 ms 淡入。找到的名字、段数和会复制什么不在卡上(名字和段数进门后在「复制好了」卡上)。
- - 卡片一出现,引擎就开始预热,没被 DSH 占着时检查对话同时进行,鲸鱼跳两下后停下;预热好了也不画满引擎那一段:复制那一段在它前面,还没做;「打开团队」等回答以后才开始。答〔先不复制〕时鲸鱼点一下头,预热好的引擎接着当正式引擎用,不重启。
+ - 卡片在第一段(数据文件夹)画满以后才出来。卡片一出现,引擎就开始预热,没被 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% 跳到位,最后淡掉。
- - 圆点到位时(.42 s)复制那一段亮起,圆点在它上面淡掉:转为进行中,淡线一下子粗到 5 px 再回到 2 px(.42 s);道具换成搬箱子。然后水塘回到原大,整组回到低处(第 2 节)。
+ - 卡片的内容照常 .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 里的团队不受影响。」〔继续复制〕(主按钮)〔停止复制〕(危险色文字)。鲸鱼停下,复制不停,那一段照样往前画。〔继续复制〕:卡片照样跳回圆环;〔停止复制〕:卡片收回,复制那一段画满,用新的空白团队接着启动。
+ - 停止复制:复制时圆环正下方有一个 28 px 的圆形图标按钮(一个小方块,`--bt-ink-2`,悬停加底色;读屏和悬停提示是「停止复制」),只在复制进行中、没有卡片时有。点它出一张用户自己引出的卡:「停止复制?」「停下后不会留下复制了一半的团队,DeepSeek Harness 里的团队不受影响。」〔继续复制〕(主按钮)〔停止复制〕(危险色文字)。鲸鱼停下,复制不停,那一段照样往前画。〔继续复制〕:卡片照样跳回圆环;〔停止复制〕:卡片收回,圆环缩回三段,用新的空白团队接着启动。
- 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 先三段,答了再变四段:用户看了四段的录屏,说预想的是「一开始是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 811c4731..2e6b6d23 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-<时间>` 暂存文件夹。