fix(M02): 저장 직후 지우기가 409 로 거절되던 흠 — 저장 뒤 좌측 목록 다시 읽음 · 지우기 전에도 최신 판으로

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0148XFUpPfpiuTjxF1EK9c95
This commit is contained in:
2026-09-25 13:03:01 +09:00
co-authored by Claude Sonnet 5
parent acca7d1fb6
commit 2aa4c80577
3 changed files with 4 additions and 2 deletions
@@ -55,7 +55,7 @@ export function canEdit(layer: Layer, isAdmin: boolean): boolean {
return layer === "project" || layer === "personal" || (layer === "system" && isAdmin);
}
export function createMain(isAdmin: boolean): MainHandle {
export function createMain(isAdmin: boolean, onSaved?: () => void): MainHandle {
const title = el("h2", { className: "m02-main__title", text: L("M02_PickTemplate") });
const reload = createButton({ label: L("M02_Reload"), variant: "ghost" });
const save = createButton({ label: L("M02_Save"), variant: "filled" });
@@ -168,6 +168,7 @@ export function createMain(isAdmin: boolean): MainHandle {
loaded = doc;
showNotice([]);
showToast(L("M02_Saved"), "success");
onSaved?.(); // 좌측 목록의 판을 새 판으로
} catch (error) {
if (error instanceof StaleError) {
const again = createButton({ label: L("M02_Reload"), variant: "ghost" });