Owner report 2026-10-06: practice sessions 'open and close instantly'
while teaching morphs. Live instrumented run (Element.prototype.animate
wrapped, three transitions recorded) proved the pose/conclude morphs
fire identically in practice (54px↔327.5px, 120ms, same easing) — the
asymmetry was the FOLD: the shell's height-morph key read
`mode:${pending ? expanded : "-"}` and pending (the question's tool
call) is null in practice, so a practice dock's bar↔form toggle never
changed the key — no height morph, instant jump, only the 160ms content
fade. The ternary predates practice sessions (aeef28d, August); the
remembered Oct-5 fix (ec8315b) added the fade only. Round 16's pause
flow raised fold exposure until the seam surfaced.
Fix: dockStateKey(mode, docked, expanded) — components/dock-state-key.ts
— widened to !!pending || !!practice (the fold machine's own ownership
rule). Typing growth keeps the key (never animates); the fold rides the
exact branch teaching has used for months. Pinned in
tests/dock-state-key.test.ts.
19 lines
950 B
TypeScript
19 lines
950 B
TypeScript
/**
|
|
* The dock shell's variant key (the WAAPI height-morph trigger,
|
|
* components/chat.tsx DockOverlay). Whenever this string CHANGES between
|
|
* renders, the shell morphs its height (120ms) and re-reserves the
|
|
* transcript tail; when it stays the same, height changes are measured
|
|
* only (typing growth never animates).
|
|
*
|
|
* The expanded term (the fold: full form ↔ slim bar) belongs to EVERY
|
|
* docked variant — question AND practice. For two months it keyed on
|
|
* `pending` (the question's tool call) alone, which is null in practice
|
|
* sessions: the practice dock folded and re-expanded with an INSTANT
|
|
* height jump while teaching morphed (owner report 2026-10-06, "opens
|
|
* and closes instantly"). The fold machine itself already treats
|
|
* practice as a dock owner; this key now agrees.
|
|
*/
|
|
export function dockStateKey(mode: string, docked: boolean, expanded: boolean): string {
|
|
return docked ? `${mode}:${expanded}` : `${mode}:-`;
|
|
}
|