refactor(canvas): review fixes for the busy flag, the comparison note and the bundle size check

- busyReason had no reader: the chat engine sets isBusy through the store's
  generic set, like every other flag.
- The isSameDocument comment says the two "same document" rules disagree
  in both directions, so neither is a subset of the other.
- The import boundary test bundles minified with one pako (the MCP core
  resolves its own copy) and caps the canvas core at 160 KB (134 KB now).
This commit is contained in:
dayuan.jiang
2026-10-11 20:56:07 +09:00
parent 48c7e43521
commit 6e375fb963
4 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -729,7 +729,7 @@ export function ChatEngineProvider({
// Canvas components (version cards, the compare dialog, "ask AI") read
// the busy flag from the canvas store
useEffect(() => {
useCanvasStore.getState().setBusy(isBusy ? "chat" : null)
useCanvasStore.getState().set({ isBusy })
}, [isBusy])
// The page goes (another language mounts a new one): the answer stops,
// so it cannot reach the next page's canvas