feat(workbench): dock task and chart workspaces
Generic Container CI/CD / test-build-publish (push) Successful in 1m13s
Frontend CI/CD / build-test-publish-and-deploy (push) Successful in 1m14s

This commit is contained in:
2026-11-12 11:42:25 +08:00
parent 33f0b90a7d
commit 7a304a91a8
27 changed files with 766 additions and 201 deletions
@@ -92,13 +92,15 @@ async function waitForChart(
const panel = document.querySelector<HTMLElement>(`[data-presentation-scope="${scope}"]`);
// A deliberate collapse defers rendering, rather than failing a valid command.
if (panel?.dataset.investigationCollapsed === "true") return;
const mapHidden = Boolean(panel?.closest('[aria-hidden="true"]'));
const element = [
...(panel?.querySelectorAll<HTMLElement>("[data-investigation-chart]") ?? [])
].find(
(item) => item.dataset.investigationChart === chartId && !item.closest('[aria-hidden="true"]')
(item) => item.dataset.investigationChart === chartId && (mapHidden || !item.closest('[aria-hidden="true"]'))
);
if (element && element.getBoundingClientRect().height > 0) {
const viewport = panel?.querySelector<HTMLElement>("[data-investigation-content]");
if (element && (mapHidden || element.getBoundingClientRect().height > 0)) {
// A focused workspace deliberately hides the map's inline chart copy.
const viewport = mapHidden ? null : panel?.querySelector<HTMLElement>("[data-investigation-content]");
if (viewport) {
const plot = element.querySelector("svg[role=img]") ?? element;
const overflow =
@@ -298,18 +300,19 @@ export function useInvestigationPresentation(options: Options) {
update: apply,
rendering: () => store.selectedId === null,
cameraAllowed: () => !cameraPausedRef.current,
waitForChart: (chartId, nextSignal) =>
waitForChart(
waitForChart: (chartId, nextSignal) => {
requestChartWindow(origin);
return waitForChart(
chartId,
nextSignal,
valuesRef.current.scope ?? "investigation",
() => store.selectedId === null
),
);
},
frame
})
);
signal.throwIfAborted();
if (command.action === "open_chart") requestChartWindow(origin);
if (historyId !== null) store.finish(historyId, "completed", undefined, actionSnapshot, pendingEntry);
publish();
setActivity((current) =>