Define governed View projection contract

This commit is contained in:
2026-07-31 17:52:57 +02:00
parent cf01545806
commit 5ee85d07d6
5 changed files with 194 additions and 43 deletions
+4 -2
View File
@@ -84,11 +84,13 @@ export function isViewSurfaceVisible(
surfaceId: string | null | undefined,
catalogue: PlatformViewSurface[]
): boolean {
if (!surfaceId || !projection?.activeViewId) return true;
const projectionActive =
projection?.projectionActive ?? Boolean(projection?.activeViewId);
if (!surfaceId || !projectionActive) return true;
const byId = new Map(catalogue.map((surface) => [surface.id, surface]));
const surface = byId.get(surfaceId);
if (!surface) return true;
const visible = new Set(projection.visibleSurfaceIds);
const visible = new Set(projection?.visibleSurfaceIds ?? []);
let current: PlatformViewSurface | undefined = surface;
const visited = new Set<string>();
while (current) {
+1
View File
@@ -410,6 +410,7 @@ export type EffectiveViewProjection = {
activeRevisionId: string | null;
activeViewName: string | null;
visibleSurfaceIds: string[];
projectionActive?: boolean;
locked: boolean;
availableViews: EffectiveViewOption[];
provenance: Array<{