fix(polygon): unify dataset review workflow

This commit is contained in:
DCCONSTRUCTIONS
2026-07-25 19:54:22 +03:00
parent e97573e221
commit 13c35ff446
15 changed files with 568 additions and 509 deletions
+14 -12
View File
@@ -150,7 +150,7 @@ function mergeViewerSettings(
export default function App() {
const runtime = useMissionRuntime();
const { selection } = useDevicePluginHost();
const polygonRunRoute = useMemo(
const polygonDatasetRoute = useMemo(
() => resolvePolygonRunRoute(typeof window === "undefined" ? "" : window.location.search),
[],
);
@@ -160,7 +160,7 @@ export default function App() {
});
const [activeRoot, setActiveRoot] = useState<RootId | null>(
polygonRunRoute.active ? "polygon" : null,
polygonDatasetRoute.active ? "polygon" : null,
);
const [sourceUrl, setSourceUrl] = useState("");
const [recordedReplay, setRecordedReplay] = useState<ObservationSessionReplayLaunch | null>(null);
@@ -194,7 +194,7 @@ export default function App() {
const replayActiveRef = useRef(false);
const sceneSettingsCommitterActiveRef = useRef(true);
const sceneSettingsCommitterRef = useRef<LatestAsyncCommitter<SceneSettings> | null>(null);
const polygonRunRouteOpenedRef = useRef(false);
const polygonDatasetRouteOpenedRef = useRef(false);
const currentRoot = rootById(activeRoot);
const visibleRoots = roots;
@@ -214,10 +214,10 @@ export default function App() {
replayActiveRef.current = replayActive;
useEffect(() => {
if (!polygonRunRoute.active || polygonRunRouteOpenedRef.current) return;
polygonRunRouteOpenedRef.current = true;
workspace.openView("polygon-run");
}, [polygonRunRoute.active, workspace]);
if (!polygonDatasetRoute.active || polygonDatasetRouteOpenedRef.current) return;
polygonDatasetRouteOpenedRef.current = true;
workspace.openView("polygon-datasets");
}, [polygonDatasetRoute.active, workspace]);
if (!sceneSettingsCommitterRef.current) {
sceneSettingsCommitterRef.current = createLatestAsyncCommitter<SceneSettings>({
@@ -415,7 +415,7 @@ export default function App() {
const selectRoot = (rootId: RootId) => {
setActiveRoot(rootId);
if (rootId === "polygon") {
workspace.openView("polygon-run");
workspace.openView("polygon-datasets");
workspace.openNavigation();
return;
}
@@ -694,7 +694,12 @@ export default function App() {
<span className="nodedc-admin-panel__nav-icon" aria-hidden="true">
<Icon name="activity" />
</span>
<span>{rootWorkspaces.length} рабочих поверхностей</span>
<span>
{rootWorkspaces.length}{" "}
{rootWorkspaces.length === 1
? "рабочая поверхность"
: "рабочих поверхностей"}
</span>
</>
}
/>
@@ -740,8 +745,6 @@ export default function App() {
</span>
) : null}
</div>
) : activeDefinition.kind === "polygon-run" ? (
<StatusBadge tone="accent">Virtual only</StatusBadge>
) : activeDefinition.kind === "polygon-datasets" ? (
<StatusBadge tone="neutral">Offline evaluation</StatusBadge>
) : (
@@ -772,7 +775,6 @@ export default function App() {
livePerceptionLayers={livePerceptionLayers}
onLivePerceptionLayersChange={changeLivePerceptionLayers}
observationLayout={observationLayout}
polygonRunRoute={polygonRunRoute}
deviceLabel={selection?.model.displayName ?? null}
spatialControls={selection?.SpatialControlsView
? {