dock: the practice fold morphs like teaching — every docked variant carries its fold state
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.
This commit is contained in:
+6
-1
@@ -24,6 +24,7 @@ import { artifactRenderers } from "@/components/artifacts";
|
||||
import { SubagentSteerCard } from "@/components/artifacts/steer-card";
|
||||
import { Composer } from "@/components/composer";
|
||||
import { useEnterSubmits } from "@/components/enter-submits";
|
||||
import { dockStateKey } from "@/components/dock-state-key";
|
||||
import { QueuedSteersBody, type QueuedSteerLine } from "@/components/queued-steers";
|
||||
import { DictationBar, joinDictation, useDictation } from "@/components/dictation";
|
||||
import { JobsContext } from "@/components/jobs-context";
|
||||
@@ -2108,7 +2109,11 @@ function DockOverlay({
|
||||
{ duration: 160, easing: "cubic-bezier(0.2, 0.8, 0.2, 1)" },
|
||||
);
|
||||
}, [expanded]);
|
||||
const stateKey = `${mode}:${pending ? expanded : "-"}`;
|
||||
// The height-morph key (components/dock-state-key.ts): the expanded
|
||||
// term (the fold) belongs to EVERY docked variant — question AND
|
||||
// practice (owner fix, 2026-10-06). Typing growth keeps the key and
|
||||
// never animates; the fold/unfold morphs like teaching always has.
|
||||
const stateKey = dockStateKey(mode, !!pending || !!practice, expanded);
|
||||
const prevRef = useRef<{ key: string; height: number } | null>(null);
|
||||
useIsoLayoutEffect(() => {
|
||||
const el = shellRef.current;
|
||||
|
||||
Reference in New Issue
Block a user