fix(web): draw the Outliner only where the native workspace has one

The Rendering workspace rendered an Outliner panel whose tree was always
empty. Desktop's Rendering screen holds Properties, Dope Sheet and Image
Editor with no Outliner, and the engine exports Outliner rows for the
active workspace only, so a panel there could never fill. The panel now
follows the native workspace areas: Rendering draws none, every other
workspace keeps its rows.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-12-02 18:23:38 +08:00
parent 2b10cd3197
commit d5f77487d0
4 changed files with 13 additions and 7 deletions

View File

@@ -58,11 +58,13 @@ boundary; the legacy `parity-ledger.json` is historical planning data.
## Known web UI gaps (observed 2026-11-25)
- The Rendering workspace renders an empty Outliner: the same project shows its object rows in
Layout, Modeling and Animation, but the Rendering workspace's outliner area renders zero rows, so
objects cannot be picked from there. Verified against the built bundle with the same project id.
Depth-inspection and row selection from most objects still work in the other workspaces, which is
what the teaching chapters rely on meanwhile.
- The Rendering workspace Outliner gap is closed by desktop parity, and its earlier reading was
incomplete: desktop's Rendering workspace has no Outliner area at all (its native screen holds
Properties, Dope Sheet and Image Editor), so there are no object rows to show there in the first
place, and the web layout now hides the panel instead of drawing one that can never fill. The
engine exports Outliner rows only for the active workspace, so an unconditional panel in a
workspace without a native Outliner could only ever render empty. Layout, Modeling and Animation
still render the panel and its rows; object picking for a render still starts from those.
## Residual evidence gaps

View File

@@ -61,7 +61,7 @@ Rules:
| ID | Description | User-visible impact | Evidence | Category | Priority | State |
| --- | --- | --- | --- | --- | --- | --- |
| MOD-OUTLINER-01 | The armature row was reported missing from the pose-constraint Outliner. It never was: the armature is a child of `ScaledRigParent` and sits one level deeper, exactly as desktop `make_object_parent_hierarchy_collections` builds it. Ten headed reruns failed because the expand loop in `web/tests/fixtures/native-ui-workflow.ts` clicked a label list scanned before earlier replies landed and re-clicked rows the reply had just opened, so the branch never stayed open. | None after the fix; before it the armature branch never settled open, so the row was unreachable from the Outliner. | `docs/web/KNOWN_LIMITATIONS.md` armature bullet; `web/tests/fixtures/native-ui-workflow.ts`; headed rerun of `armature panel operates on the selected bone` | RESIDUAL | P1 | `RESOLVED` |
| MOD-OUTLINER-02 | The Outliner is empty in the Rendering workspace, so objects cannot be picked from there. | Row selection has to be done in another workspace first. | `docs/web/KNOWN_LIMITATIONS.md` Rendering workspace bullet | RESIDUAL | P2 | `OPEN` |
| MOD-OUTLINER-02 | The Rendering workspace appeared to render an empty Outliner. It has no native Outliner area to fill: desktop's Rendering screen holds Properties, Dope Sheet and Image Editor, the engine exports Outliner rows only for the active workspace, and the web layout drew the panel unconditionally. The panel now follows the native workspace areas, so Rendering draws no Outliner and other workspaces keep theirs. | None; object picking for a render starts from a workspace that has an Outliner, as on desktop. | `docs/web/KNOWN_LIMITATIONS.md` Rendering workspace bullet; `web/app/src/app/App.tsx` outliner area; probe snapshot of all eleven workspaces before and after switching to Rendering (panel count 1 → 0) | RESIDUAL | P2 | `RESOLVED` |
| MOD-PROPERTIES-01 | The armature panel case could not run because its first step selects the armature row. Same cause as MOD-OUTLINER-01. | None after the fix. | `web/tests/e2e/armature-editor-coverage-ui-production.spec.ts` | RESIDUAL | P1 | `RESOLVED` |
| MOD-PROPERTIES-02 | `setSceneViewLayerAOVs` and `setSceneViewLayerLightgroups` carry a revision field that the Worker never compares. | Two tabs can overwrite each other's AOV and lightgroup edits without a conflict. | `web/protocol/web-engine-revisions.ts`, `web/tests/unit/web-engine-revisions.test.mjs` | RESIDUAL | P2 | `OPEN` |
| MOD-NLA-01 | `setNLAStack` carries a revision field that the Worker never compares. | A stale NLA stack submission is accepted instead of rejected. | `web/protocol/web-engine-revisions.ts` | RESIDUAL | P3 | `OPEN` |

View File

@@ -35,6 +35,7 @@ for (const required of [
"Automatic viewport page-fault feedback",
"The armature headed regression is resolved, and its earlier diagnosis was wrong",
"the armature object was never missing from the Outliner",
"The Rendering workspace Outliner gap is closed by desktop parity",
"Revision-conflict handling is per command in the engine Worker",
"`setSceneViewLayerAOVs`, `setSceneViewLayerLightgroups`, `setNLAStack` and",
"fcurve or keyframe counts, so no count assertion is made",

View File

@@ -11411,7 +11411,10 @@ else:
<WasmTextEditor key={`${projectIdRef.current}:${textEditorEpoch}`} snapshot={snapshot} onCommand={applyEditCommand} projectBusy={projectActionLocked} canEditDraft={()=>!projectActionMutexRef.current.owner} onDraftChanged={dirty=>{if(dirty)textDraftAreas.current.add('web-tools-text');else textDraftAreas.current.delete('web-tools-text');textDraftDirty.current=textDraftAreas.current.size>0;}} onNativeRun={localOnly?undefined:(name,source)=>void runNativeWorkflow({kind:'PYTHON',context:nativeContext(),python:{source,textName:name,console:false}})} onPythonRun={pythonSession?(name,source)=>pythonSession.run(source,name,false):undefined} pythonBusy={pythonState?.status==='running'||pythonState?.status==='stopping'}/>
</Area><Area className="console-area" editor="Python Console">{pythonSession?<WasmPythonConsole session={pythonSession} enabled={Boolean(snapshot)&&!headerPending}/>:<NativeSessionPanel key={projectIdRef.current} client={webClientRef.current} context={nativeContext()} onApplied={applyNativeScene}/>}</Area><Area className="info-area" editor="Info"><WorkspaceEditorSurface editor="Info" snapshot={snapshot} engineStatus={engineStatus} onOpen={() => fileInputRef.current?.click()} onSearch={() => dispatchUI({ type: "toggleOperatorSearch", open: true })} /></Area><Area className="secondary-outliner-area" editor="Outliner"><Outliner key={`${projectIdRef.current}:${userActionSequenceRef.current}`} snapshot={snapshot} onToggleExpand={toggleOutlinerExpand} onTreeSelect={selectOutlinerRow} onSetDisplayMode={setOutlinerDisplayMode} onSetFilter={setOutlinerFilter} onSetSyncSelect={setOutlinerSyncSelect} onSetRestriction={setOutlinerRestriction} onSetRestrictColumns={setOutlinerRestrictColumns}onRemap={(command, feedback) => applyEditCommand(command, undefined, feedback)} onReparent={(ids, parentId, keepTransform) => void applyEditCommand({ type: 'setParents', objectIds: ids, parentId, keepTransform })} onMoveToCollection={(ids, collectionId, keepExistingLinks) => { for (const id of ids) void applyEditCommand({ type: 'moveObjectToCollection', objectId: id, collectionId, keepExistingLinks }); }} onMoveCollection={(collectionId, parentCollectionId) => void applyEditCommand(coreSceneCommands.moveCollection(collectionId, parentCollectionId))} onSelect={selectObject} onRefresh={refreshOutliner} onSelectAll={selectAllOutliner} onToggleVisibility={(id, visible) => void applyEditCommand({ type: "setObjectVisibility", objectId: id, visible })} onDeleteObject={(id, hierarchy) => void applyEditCommand({ type: "deleteObject", objectId: id, hierarchy })} onDeleteCollection={(collectionId, hierarchy) => void applyEditCommand({ type: "deleteCollection", collectionId, hierarchy })} onSelectBox={(firstRowId,lastRowId,mode,id)=>setOutlinerSelectBox(firstRowId,lastRowId,mode,id)} onIdOperation={(firstRowId,operation,id,colorTag)=>setOutlinerIdOperation(firstRowId,operation,id,colorTag)} onRelocate={(rowId,id)=>requestOutlinerRelocate(rowId,id)} onLibOperation={(rowId,operation,id)=>setOutlinerLibOperation(rowId,operation,id)} onSceneOperation={(rowId,operation,id)=>setOutlinerSceneOperation(rowId,operation,id)} onLibraryRelocate={(rowId,id)=>requestOutlinerLibraryRelocate(rowId,id)} onLiboverrideTroubleshoot={(rowId,operation,id)=>setOutlinerLiboverrideTroubleshoot(rowId,operation,id)} onSetLibOverrideViewMode={(mode,id)=>setOutlinerLibOverrideViewMode(mode,id)} onSetIdTypeFilter={(use,idType,id)=>setOutlinerIdTypeFilter(use,idType,id)} onSetActiveKeyingset={(name,id)=>setOutlinerActiveKeyingset(name,id)} onViewOperation={(operation,id)=>setOutlinerViewOperation(operation,id)} onEditOperation={(operation,id)=>setOutlinerEditOperation(operation,id)} onScrollPage={(up,id)=>setOutlinerScrollPage(up,id)} onRestrictOperation={(operation,id)=>setOutlinerRestrictOperation(operation,id)} onModeToggle={(rowId,extend,id)=>setOutlinerModeToggle(rowId,extend,id)} /></Area></ScriptingContainer> : null}
<Area className="viewport-area" editor="3D Viewport"><ViewportPlaceholder snapshot={preview?.snapshot ?? snapshot} geometryBuffers={preview?.geometryBuffers ?? geometryBuffers} nonMeshGeometryBuffers={preview?.nonMeshGeometryBuffers ?? nonMeshGeometryBuffers} textureAssets={gpuTextureAssets} volumeProject={volumeProject} lodLevels={preview ? null : lodLevels} selectedObjectIds={selectedObjectIds} editMode={uiState.context.mode === "Edit"} meshSelection={meshSelection} greasePencilSelectionRevision={greasePencilSelection?.revision ?? 0} cameraPose={objectCameraId ? objectCameraPose(snapshot, objectCameraId) : undefined} cameraLocked={Boolean(cameraLocks["viewport-area"])} showViewName={webPreferences.interface.showViewName} viewportPreferences={{ gizmoSize: webPreferences.viewport.gizmoSize, gizmoSizeNavigate: webPreferences.viewport.gizmoSizeNavigate, miniAxis: webPreferences.viewport.miniAxis, defaultShading: webPreferences.viewport.defaultShading, orbitSensitivity: webPreferences.navigation.orbitSensitivity, zoomSensitivity: webPreferences.navigation.zoomSensitivity, invertZoom: webPreferences.navigation.invertZoom }} onCameraWrite={handleCameraWrite} onCameraLockChange={(locked)=>setCameraLocks(current=>({...current,"viewport-area":locked}))} onSelect={selectObject} onBoxSelect={selectObjectsInBox} onElementBoxSelect={selectMeshElementsInBox} onElementSelect={selectMeshElement} onGreasePencilPointSelect={selectGreasePencilPoint} onGreasePencilMarqueeSelect={selectGreasePencilMarquee} onTransform={transformActive} transformSettings={viewportTransformSettings} elementGizmo={elementGizmoFrame} onGizmoDrag={onGizmoDrag}onSetObjectTransform={(objectId, translation, rotationEuler, scale) => void applyEditCommand({ type: "setObjectTransform", objectId, translation, rotationEuler, scale })} onDiagnostic={recordDiagnostic} mode={uiState.context.mode} onMeshEdit={runMeshEdit} onMeshSelectionMode={setMeshSelectionMode} onSelectAllMeshElements={selectAllMeshElements} onAddPrimitive={(primitive) => void applyEditCommand(coreSceneCommands.createPrimitive(primitive))} onFocusSculptProperties={() => focusProperty('[data-testid="sculpt-editor"]')} onVoxelRemesh={(voxelSize) => void invokeNativeOperator('object.voxel_remesh', { voxel_size: voxelSize })} /></Area>
<Area className="outliner-area" editor="Outliner"><Outliner key={`${projectIdRef.current}:${userActionSequenceRef.current}`} snapshot={snapshot} onToggleExpand={toggleOutlinerExpand} onTreeSelect={selectOutlinerRow} onSetDisplayMode={setOutlinerDisplayMode} onSetFilter={setOutlinerFilter} onSetSyncSelect={setOutlinerSyncSelect} onSetRestriction={setOutlinerRestriction} onSetRestrictColumns={setOutlinerRestrictColumns}onRemap={(command, feedback) => applyEditCommand(command, undefined, feedback)} onReparent={(ids, parentId, keepTransform) => void applyEditCommand({ type: 'setParents', objectIds: ids, parentId, keepTransform })} onMoveToCollection={(ids, collectionId, keepExistingLinks) => { for (const id of ids) void applyEditCommand({ type: 'moveObjectToCollection', objectId: id, collectionId, keepExistingLinks }); }} onMoveCollection={(collectionId, parentCollectionId) => void applyEditCommand(coreSceneCommands.moveCollection(collectionId, parentCollectionId))} onSelect={selectObject} onRefresh={refreshOutliner} onSelectAll={selectAllOutliner} onToggleVisibility={(id, visible) => void applyEditCommand({ type: "setObjectVisibility", objectId: id, visible })} onDeleteObject={(id, hierarchy) => void applyEditCommand({ type: "deleteObject", objectId: id, hierarchy })} onDeleteCollection={(collectionId, hierarchy) => void applyEditCommand({ type: "deleteCollection", collectionId, hierarchy })} onSelectBox={(firstRowId,lastRowId,mode,id)=>setOutlinerSelectBox(firstRowId,lastRowId,mode,id)} onIdOperation={(firstRowId,operation,id,colorTag)=>setOutlinerIdOperation(firstRowId,operation,id,colorTag)} onRelocate={(rowId,id)=>requestOutlinerRelocate(rowId,id)} onLibOperation={(rowId,operation,id)=>setOutlinerLibOperation(rowId,operation,id)} onSceneOperation={(rowId,operation,id)=>setOutlinerSceneOperation(rowId,operation,id)} onLibraryRelocate={(rowId,id)=>requestOutlinerLibraryRelocate(rowId,id)} onLiboverrideTroubleshoot={(rowId,operation,id)=>setOutlinerLiboverrideTroubleshoot(rowId,operation,id)} onSetLibOverrideViewMode={(mode,id)=>setOutlinerLibOverrideViewMode(mode,id)} onSetIdTypeFilter={(use,idType,id)=>setOutlinerIdTypeFilter(use,idType,id)} onSetActiveKeyingset={(name,id)=>setOutlinerActiveKeyingset(name,id)} onViewOperation={(operation,id)=>setOutlinerViewOperation(operation,id)} onEditOperation={(operation,id)=>setOutlinerEditOperation(operation,id)} onScrollPage={(up,id)=>setOutlinerScrollPage(up,id)} onRestrictOperation={(operation,id)=>setOutlinerRestrictOperation(operation,id)} onModeToggle={(rowId,extend,id)=>setOutlinerModeToggle(rowId,extend,id)} /></Area>
{/* Desktop's Rendering workspace has no Outliner area (its native screen
holds Properties, Dope Sheet and Image Editor), so the web layout
hides the panel there instead of drawing a tree it can never fill. */}
{!nativeWorkspace || nativeWorkspace.areas.some(item => item.editor === 'OUTLINER') ? <Area className="outliner-area" editor="Outliner"><Outliner key={`${projectIdRef.current}:${userActionSequenceRef.current}`} snapshot={snapshot} onToggleExpand={toggleOutlinerExpand} onTreeSelect={selectOutlinerRow} onSetDisplayMode={setOutlinerDisplayMode} onSetFilter={setOutlinerFilter} onSetSyncSelect={setOutlinerSyncSelect} onSetRestriction={setOutlinerRestriction} onSetRestrictColumns={setOutlinerRestrictColumns}onRemap={(command, feedback) => applyEditCommand(command, undefined, feedback)} onReparent={(ids, parentId, keepTransform) => void applyEditCommand({ type: 'setParents', objectIds: ids, parentId, keepTransform })} onMoveToCollection={(ids, collectionId, keepExistingLinks) => { for (const id of ids) void applyEditCommand({ type: 'moveObjectToCollection', objectId: id, collectionId, keepExistingLinks }); }} onMoveCollection={(collectionId, parentCollectionId) => void applyEditCommand(coreSceneCommands.moveCollection(collectionId, parentCollectionId))} onSelect={selectObject} onRefresh={refreshOutliner} onSelectAll={selectAllOutliner} onToggleVisibility={(id, visible) => void applyEditCommand({ type: "setObjectVisibility", objectId: id, visible })} onDeleteObject={(id, hierarchy) => void applyEditCommand({ type: "deleteObject", objectId: id, hierarchy })} onDeleteCollection={(collectionId, hierarchy) => void applyEditCommand({ type: "deleteCollection", collectionId, hierarchy })} onSelectBox={(firstRowId,lastRowId,mode,id)=>setOutlinerSelectBox(firstRowId,lastRowId,mode,id)} onIdOperation={(firstRowId,operation,id,colorTag)=>setOutlinerIdOperation(firstRowId,operation,id,colorTag)} onRelocate={(rowId,id)=>requestOutlinerRelocate(rowId,id)} onLibOperation={(rowId,operation,id)=>setOutlinerLibOperation(rowId,operation,id)} onSceneOperation={(rowId,operation,id)=>setOutlinerSceneOperation(rowId,operation,id)} onLibraryRelocate={(rowId,id)=>requestOutlinerLibraryRelocate(rowId,id)} onLiboverrideTroubleshoot={(rowId,operation,id)=>setOutlinerLiboverrideTroubleshoot(rowId,operation,id)} onSetLibOverrideViewMode={(mode,id)=>setOutlinerLibOverrideViewMode(mode,id)} onSetIdTypeFilter={(use,idType,id)=>setOutlinerIdTypeFilter(use,idType,id)} onSetActiveKeyingset={(name,id)=>setOutlinerActiveKeyingset(name,id)} onViewOperation={(operation,id)=>setOutlinerViewOperation(operation,id)} onEditOperation={(operation,id)=>setOutlinerEditOperation(operation,id)} onScrollPage={(up,id)=>setOutlinerScrollPage(up,id)} onRestrictOperation={(operation,id)=>setOutlinerRestrictOperation(operation,id)} onModeToggle={(rowId,extend,id)=>setOutlinerModeToggle(rowId,extend,id)} /></Area> : null}
<Area className="properties-area" editor="Properties"><Properties key={mainReplacementEpoch} onSoftBodyCacheOperation={localOnly ? queueSoftBodyCache : undefined} onFluidCacheOperation={localOnly ? (objectId, operation) => queueLocalDesktopOperator("fluid." + operation, {}, true, objectId, "OBJECT") : undefined} pointCacheBusy={headerBusy || Boolean(localInvokePending) || localInvokeActive || nativeModalActive || projectActionLocked} onPointCacheOperation={localOnly ? operation => queueLocalDesktopOperator(operation === "BAKE_ALL" ? "ptcache.bake_all" : "ptcache.free_bake_all", operation === "BAKE_ALL" ? { bake: true } : {}, true) : undefined} selectedEdgeIndices={meshSelection.mode === "EDGE" ? [...meshSelection.indices] : []} nonMeshGeometryBuffers={nonMeshGeometryBuffers} client={webClientRef.current} snapshot={snapshot} uiMode={uiState.context.mode} onSetMode={(mode) => dispatchUI({type:'setMode', mode})} editorWorkflow={editorWorkflow} onExecutePython={executePythonAndApply} objectCameraId={objectCameraId} onObjectCameraChange={setObjectCameraId} onSimulatePhysics={simulatePhysicsRange} physicsSimulationRange={snapshot?.scenes[0]?.renderSettings ? { start: snapshot.scenes[0].renderSettings.frameStart, end: snapshot.scenes[0].renderSettings.frameEnd } : undefined} onImportSequencerMedia={importSequencerMedia} onRestoreSequencerMedia={restoreSequencerMedia} selectedFaceIndices={meshSelection.mode === "FACE" ? [...meshSelection.indices] : []} selectedVertexIndices={meshSelection.mode === "VERT" ? [...meshSelection.indices] : []} greasePencilSelection={greasePencilSelection} onGreasePencilCanvasPointSelect={(point, mode, baseSelectionRevision) => { commitGreasePencilSelection("CANVAS_2D", mode === "ADD" ? "TOGGLE" : mode, [point], baseSelectionRevision, point); }} onCommand={(command) => applyEditCommand(command)} onImportImage={(file) => void importImage(file)} onImportVFont={(file) => void importVFont(file)} onRequestAsset={(assetId) => { const client = webClientRef.current; if (!client) return; void client.requestAsset(assetId).then((asset) => setEngineStatus(`Asset: ${asset.assetId} (${asset.status})`)).catch((error: unknown) => setEngineStatus(recordDiagnostic("ENGINE", "PBR_ASSET_INVALID", error, { assetId }))); }} onAppendLibraryObject={async (source, request) => {
const client = webClientRef.current; if (!client) return; const appendProjectId = projectIdRef.current; const isCurrent = () => client === webClientRef.current && appendProjectId === projectIdRef.current;
try { const result = await client.appendLibraryObject(source, request); if (!isCurrent()) return; const logicalRevision = Math.max(projectRevisionRef.current + 1, result.snapshot.revision); projectRevisionRef.current = logicalRevision; const ownsRevision = () => isCurrent() && projectRevisionRef.current === logicalRevision; setSnapshot(result.snapshot); setSelectedObjectIds(selectionFromSnapshot(result.snapshot)); setGeometryBuffers(result.geometryBuffers); setNonMeshGeometryBuffers(result.nonMeshGeometryBuffers ?? []); setFrame(result.snapshot.frame.current); setPreview(null); setLodLevels(null); setDirtyState(current => { const accepted = acceptMainTransaction(current, logicalRevision); return accepted.ok ? accepted.state : current; });