practice UI: the dock, the transcript cards, layered-Esc discard
- PracticeDock (components/practice-dock.tsx): the active problem replaces the composer — statement (markdown+LaTeX) above, the 'Your thinking' composer-twin below with the two submit lanes (Nudge = thinking without a commit; Commit = answer commit; ⌘/Ctrl+Enter commits). Dictation claims the thinking field. - Transcript cards (practice-cards.tsx + the artifact registry): the problem card (compact-expandable statement — the commitment NEVER renders), the conclude card (outcome + verdict + reveal; the dismissal synthesis is one muted line), and the user-side thinking register cards (Your thinking / Your solution). - view.ts: the problem pose joins the placeholder fork (the ack never flips the part); practice-thinking markers project as data parts; problem-dismissed markers project nothing. - chat.tsx: activeProblemOf drives the dock branch (question > problem > composer), the esc layering gains the problem rung (below question, above turn) with its discard confirm + the silent marker route; the thinking submissions POST through the session's optimistic appends.
This commit is contained in:
@@ -12,7 +12,7 @@ import { escAbortTarget } from "../components/chat.tsx";
|
||||
* pure) is the defense. Priority = stacking order.
|
||||
*/
|
||||
describe("escAbortTarget (the layered-Esc ruling)", () => {
|
||||
const none = { abortAsk: false, mermaidFocus: false, planOpen: false, setupOpen: false, pending: false, busy: false };
|
||||
const none = { abortAsk: false, mermaidFocus: false, planOpen: false, setupOpen: false, pending: false, problem: false, busy: false };
|
||||
|
||||
it("no overlays: the 2026-10-02 chain stands (question before turn)", () => {
|
||||
assert.equal(escAbortTarget({ ...none, pending: true }), "question");
|
||||
@@ -21,6 +21,12 @@ describe("escAbortTarget (the layered-Esc ruling)", () => {
|
||||
assert.equal(escAbortTarget({ ...none, pending: true, busy: true }), "question", "a pending question outranks the turn");
|
||||
});
|
||||
|
||||
it("an active practice problem sits between question and turn (2026-10-04)", () => {
|
||||
assert.equal(escAbortTarget({ ...none, problem: true }), "problem");
|
||||
assert.equal(escAbortTarget({ ...none, problem: true, busy: true }), "problem", "the problem card outranks the turn abort");
|
||||
assert.equal(escAbortTarget({ ...none, planOpen: true, problem: true }), "plan", "an open popup still outranks the problem");
|
||||
});
|
||||
|
||||
it("an open overlay claims Esc over a pending question — the owner's report", () => {
|
||||
for (const overlay of ["mermaidFocus", "planOpen", "setupOpen"] as const) {
|
||||
const target = escAbortTarget({ ...none, [overlay]: true, pending: true });
|
||||
|
||||
Reference in New Issue
Block a user