fix(M01): 계산 멈춤에도 수량 칸 날식 · 까닭 날글 안 찍음 — 마지막 조각 · 빈칸 · 까닭 걸러냄 (PLAN 6장 셋째 줄)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT
This commit is contained in:
2026-09-24 14:35:19 +09:00
co-authored by Claude Sonnet 5
parent 5e9df81cbd
commit 209654f311
5 changed files with 35 additions and 9 deletions
@@ -59,6 +59,8 @@ interface Opened extends Draft {
reasons: string[];
lines: CalcLine[] | null;
text: TextAnswer | null;
/** 마지막으로 잘 받은 읽는 식 — 멈춘 뒤에도 수량 칸 조각을 이걸로 */
lastText?: TextAnswer;
ownHost: HTMLElement;
values: Record<string, string>;
}
@@ -170,6 +172,7 @@ export async function mountM01LogicLab(
values: current.values,
onText: (text) => {
current.text = text;
if (text.ok) current.lastText = text;
drawEditor(); // [계산] 전 미리보기 응답도 왼쪽 이름 식 칸에 바로 비치게 — onLines 와 같은 자리
},
onLines: (lines) => {
@@ -202,6 +205,7 @@ export async function mountM01LogicLab(
prices: current.prices,
lines: current.lines,
text: current.text,
lastText: current.lastText,
values: current.values,
ownHost: current.ownHost,
onChange: touch,