fix(webui): sp13 review, a drawer closed before its instances read answers keeps no answer for the next open: the answer is dropped when no pending drawer is left to repaint, so a later open reads again instead of showing a state from minutes before; test closes the drawer while its read is held, lets the read say nothing runs, reopens and sees the agent working (#1873, lane sp13-org-page-fit)

This commit was merged in pull request #1977.
This commit is contained in:
jason.woltje committed 2026-11-15 12:54:28 -06:00
1 parent 6ad1d33dd1
commit 68df55130e
2 files changed
+30 -3

No files matched your search

+6 -1
View File
@@ -1167,7 +1167,12 @@
]);
await Promise.race([ir.p, opts.page ?? ir.p]);
const pending = !ir.done;
if (pending) ir.p.then(() => { if (document.querySelector(`#bus-view [data-ws-drawer="${CSS.escape(id)}"][data-drawer-pending]`)) document.dispatchEvent(new CustomEvent('mosaic-workspace-render')); });
// A drawer closed before the read answered asks for no repaint, and its answer is not kept for a
// later open.
if (pending) ir.p.then(() => {
if (document.querySelector(`#bus-view [data-ws-drawer="${CSS.escape(id)}"][data-drawer-pending]`)) document.dispatchEvent(new CustomEvent('mosaic-workspace-render'));
else if (drawerInst === ir) drawerInst = null;
});
else if (drawerInst === ir) drawerInst = null;
const instRead = pending ? null : ir.value;
const o = orgsOf(body), orgName = o.name(org);