Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const lineageNodeBaseProps = {
hasParents: true,
hasChildren: true,
showContent: true,
wholeModelImpact: true,
newCllExperience: true,
};

// =============================================================================
Expand Down Expand Up @@ -166,7 +166,7 @@ const baseNodeViewArgs: Partial<NodeViewProps<NodeViewNodeData>> = {
SchemaView: StubSchemaView,
NodeSqlView: StubNodeSqlView,
ResourceTypeTag,
wholeModelImpact: true,
newCllExperience: true,
};

/** Brown title chip + brown left stripe for a whole-model-changed model. */
Expand Down
2 changes: 0 additions & 2 deletions js/packages/ui/src/api/flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ export interface RecceServerFlags {
disable_cll_cache: boolean;
impact_at_startup: boolean;
new_cll_experience: boolean;
/** Whole-model impact highlighting. Implies new_cll_experience. */
whole_model_impact: boolean;
/**
* Inline paired-distribution profiles in the schema view (DRC-3390 Stage B).
* When false (the default), Stage C's hook short-circuits and no
Expand Down
2 changes: 0 additions & 2 deletions js/packages/ui/src/components/lineage/GraphNodeOss.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ function GraphNodeComponent(nodeProps: GraphNodeProps) {
cll,
impactedNodeIds,
newCllExperience,
wholeModelImpact,
} = lineageViewCtx;
const isImpacted = newCllExperience ? impactedNodeIds.has(id) : false;
const { isWholeModelChanged, isWholeModelImpacted } = pickWholeModelFlags(
Expand Down Expand Up @@ -365,7 +364,6 @@ function GraphNodeComponent(nodeProps: GraphNodeProps) {
isImpacted={isImpacted}
isWholeModelChanged={isWholeModelChanged}
isWholeModelImpacted={isWholeModelImpacted}
wholeModelImpact={wholeModelImpact}
// Interactive props
interactive={interactive}
selectMode={nodeSelectMode}
Expand Down
38 changes: 12 additions & 26 deletions js/packages/ui/src/components/lineage/LineageViewOss.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,11 @@ export const MINIMAP_NODE_THRESHOLD = 500;
function computeImpactedSets(
lineageGraph: LineageGraph,
cll: ColumnLineageData,
wholeModelImpact = false,
): {
nodeIds: Set<string>;
columnIds: Set<string>;
wholeModelImpactedNodeIds?: Set<string>;
wholeModelChangedNodeIds?: Set<string>;
wholeModelImpactedNodeIds: Set<string>;
wholeModelChangedNodeIds: Set<string>;
} {
const columnIds = computeImpactedColumns(cll);
const nodeIds = new Set<string>();
Expand All @@ -162,17 +161,14 @@ function computeImpactedSets(
nodeIds.add(nodeId);
}
}
if (wholeModelImpact) {
const { wholeModelImpactedNodeIds, wholeModelChangedNodeIds } =
computeWholeModelImpact(lineageGraph, cll);
return {
nodeIds,
columnIds,
wholeModelImpactedNodeIds,
wholeModelChangedNodeIds,
};
}
return { nodeIds, columnIds };
const { wholeModelImpactedNodeIds, wholeModelChangedNodeIds } =
computeWholeModelImpact(lineageGraph, cll);
return {
nodeIds,
columnIds,
wholeModelImpactedNodeIds,
wholeModelChangedNodeIds,
};
}

/**
Expand Down Expand Up @@ -282,7 +278,6 @@ export function PrivateLineageView(

const { data: serverFlags } = useRecceServerFlag();
const newCllExperience = serverFlags?.new_cll_experience ?? false;
const wholeModelImpact = serverFlags?.whole_model_impact ?? false;
const { runId, showRunId, closeRunResult, runAction, isRunResultOpen } =
useRecceActionContext();
const { run } = useRun(runId);
Expand Down Expand Up @@ -639,11 +634,7 @@ export function PrivateLineageView(
// Compute impacted sets once; thread into ancestry to avoid redundant DFS.
const impacted =
newCllExperience && cll
? computeImpactedSets(
lineageGraph,
cll,
serverFlags?.whole_model_impact ?? false,
)
? computeImpactedSets(lineageGraph, cll)
: undefined;

const [nodes, edges, nodeColumnSetMap] = await toReactFlow(lineageGraph, {
Expand Down Expand Up @@ -971,11 +962,7 @@ export function PrivateLineageView(

const impacted =
newCllExperience && cll
? computeImpactedSets(
lineageGraph,
cll,
serverFlags?.whole_model_impact ?? false,
)
? computeImpactedSets(lineageGraph, cll)
: undefined;

const [newNodes, newEdges, newNodeColumnSetMap] = await toReactFlow(
Expand Down Expand Up @@ -1253,7 +1240,6 @@ export function PrivateLineageView(
},
changeAnalysisMode,
newCllExperience,
wholeModelImpact,
setChangeAnalysisMode,
getNodeAction: (nodeId: string) => {
return multiNodeAction.actionState.actions[nodeId];
Expand Down
8 changes: 4 additions & 4 deletions js/packages/ui/src/components/lineage/NodeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ export interface NodeViewProps<
isWholeModelChanged?: boolean;
/** This model is downstream of a whole-model change — paints the amber title chip + amber left stripe. Precedence is enforced internally: `isWholeModelChanged` outranks this flag. */
isWholeModelImpacted?: boolean;
/** Whether the `--whole-model-impact` server flag is on. When false, no whole-model UI renders (no title chip, no left stripe). */
wholeModelImpact?: boolean;
/** Whether the new CLL experience (`new_cll_experience` server flag) is on. When false, no whole-model UI renders (no title chip, no left stripe). */
newCllExperience?: boolean;
/** This model is downstream of any breaking change. Only feeds the title-row hover tooltip (column-impacted kind) — no visual chip in NodeView. */
isImpacted?: boolean;
}
Expand Down Expand Up @@ -599,7 +599,7 @@ export function NodeView<TNode extends NodeViewNodeData>({
isActionAvailable = defaultIsActionAvailable,
isWholeModelChanged = false,
isWholeModelImpacted = false,
wholeModelImpact = false,
newCllExperience = false,
isImpacted = false,
rowCountDisplay,
}: NodeViewProps<TNode>) {
Expand Down Expand Up @@ -639,7 +639,7 @@ export function NodeView<TNode extends NodeViewNodeData>({
// MUI colorSchemes setup — useThemeColors() is the correct accessor.
const { isDark } = useThemeColors();
const treatmentInputs = {
wholeModelImpact,
newCllExperience,
isWholeModelChanged,
isWholeModelImpacted,
isImpacted,
Expand Down
2 changes: 1 addition & 1 deletion js/packages/ui/src/components/lineage/NodeViewOss.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export function NodeViewOss({
featureToggles={featureToggles}
isWholeModelChanged={wholeModelFlags.isWholeModelChanged}
isWholeModelImpacted={wholeModelFlags.isWholeModelImpacted}
wholeModelImpact={lineageViewCtx?.wholeModelImpact ?? false}
newCllExperience={lineageViewCtx?.newCllExperience ?? false}
isImpacted={impactedNodeIds?.has(node.id) ?? false}
modelDetail={(() => {
if (!modelDetail) return undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ describe("LineageNode", () => {
["breaking", "Model-Wide Change"],
["non_breaking", "Additive Change"],
["partial_breaking", "Column Change"],
])("shows %s category text label when wholeModelImpact is false", (category, label) => {
])("shows %s category text label when newCllExperience is false", (category, label) => {
const props = createMockNodeProps(
{ showChangeAnalysis: true, changeCategory: category },
{ label: "test" },
Expand All @@ -439,12 +439,12 @@ describe("LineageNode", () => {
"breaking",
"non_breaking",
"partial_breaking",
])("suppresses %s category text label when wholeModelImpact is true (badge carries the signal)", (category) => {
])("suppresses %s category text label when newCllExperience is true (badge carries the signal)", (category) => {
const props = createMockNodeProps(
{
showChangeAnalysis: true,
changeCategory: category,
wholeModelImpact: true,
newCllExperience: true,
},
{ label: "test" },
);
Expand Down Expand Up @@ -701,7 +701,7 @@ describe("LineageNode", () => {
it("renders no graph badge for whole-model-changed (signalled by other surfaces)", () => {
const props = createMockNodeProps({
isWholeModelChanged: true,
wholeModelImpact: true,
newCllExperience: true,
});
const { container } = render(<LineageNode {...props} />);
expect(
Expand All @@ -712,18 +712,18 @@ describe("LineageNode", () => {
it("renders no graph badge for whole-model-impacted (signalled by other surfaces)", () => {
const props = createMockNodeProps({
isWholeModelImpacted: true,
wholeModelImpact: true,
newCllExperience: true,
});
const { container } = render(<LineageNode {...props} />);
expect(
container.querySelectorAll('[data-testid$="-badge"]'),
).toHaveLength(0);
});

it("renders the additive badge for non_breaking when wholeModelImpact is on", () => {
it("renders the additive badge for non_breaking when newCllExperience is on", () => {
const props = createMockNodeProps({
changeCategory: "non_breaking",
wholeModelImpact: true,
newCllExperience: true,
});
render(<LineageNode {...props} />);
const badge = screen.getByTestId("whole-model-additive-badge");
Expand All @@ -734,29 +734,29 @@ describe("LineageNode", () => {
it("renders no badge when neither flag is set and category is not additive", () => {
const props = createMockNodeProps({
changeCategory: "breaking",
wholeModelImpact: true,
newCllExperience: true,
});
const { container } = render(<LineageNode {...props} />);
expect(
container.querySelectorAll('[data-testid$="-badge"]'),
).toHaveLength(0);
});

it("renders the column-changed badge for partial_breaking when wholeModelImpact is on", () => {
it("renders the column-changed badge for partial_breaking when newCllExperience is on", () => {
const props = createMockNodeProps({
changeCategory: "partial_breaking",
wholeModelImpact: true,
newCllExperience: true,
});
render(<LineageNode {...props} />);
const badge = screen.getByTestId("column-changed-badge");
expect(badge).toBeInTheDocument();
expect(badge.textContent).toBe("COLUMN");
});

it("renders the column-impacted badge for isImpacted nodes without own change when wholeModelImpact is on", () => {
it("renders the column-impacted badge for isImpacted nodes without own change when newCllExperience is on", () => {
const props = createMockNodeProps({
isImpacted: true,
wholeModelImpact: true,
newCllExperience: true,
});
render(<LineageNode {...props} />);
const badge = screen.getByTestId("column-impacted-badge");
Expand All @@ -768,7 +768,7 @@ describe("LineageNode", () => {
const props = createMockNodeProps({
isWholeModelImpacted: true,
changeCategory: "partial_breaking",
wholeModelImpact: true,
newCllExperience: true,
});
render(<LineageNode {...props} />);
// Whole-model-impacted resolution wins over column-changed, but
Expand All @@ -786,7 +786,7 @@ describe("LineageNode", () => {
const props = createMockNodeProps({
isImpacted: true,
changeCategory: "partial_breaking",
wholeModelImpact: true,
newCllExperience: true,
});
render(<LineageNode {...props} />);
expect(screen.getByTestId("column-changed-badge")).toBeInTheDocument();
Expand All @@ -795,7 +795,7 @@ describe("LineageNode", () => {
).not.toBeInTheDocument();
});

it("renders no badge when wholeModelImpact is off, even if flags are set", () => {
it("renders no badge when newCllExperience is off, even if flags are set", () => {
const props = createMockNodeProps({
isWholeModelChanged: true,
isWholeModelImpacted: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ describe("NodeView", () => {
// never renders a graph badge of any kind. The structural badge check
// (`[data-testid$="-badge"]` returns 0) catches a regression that
// re-introduces a badge surface under any naming.
test("renders the changed title chip (no inline badge) when isWholeModelChanged is true and wholeModelImpact is on", () => {
test("renders the changed title chip (no inline badge) when isWholeModelChanged is true and newCllExperience is on", () => {
const { container } = render(
<NodeView
node={createNode("model")}
onCloseNode={vi.fn()}
isSingleEnv={false}
isWholeModelChanged
wholeModelImpact
newCllExperience
/>,
);
expect(
Expand All @@ -181,14 +181,14 @@ describe("NodeView", () => {
).toHaveLength(0);
});

test("renders the impacted title chip (no inline badge) when isWholeModelImpacted is true and wholeModelImpact is on", () => {
test("renders the impacted title chip (no inline badge) when isWholeModelImpacted is true and newCllExperience is on", () => {
const { container } = render(
<NodeView
node={createNode("model")}
onCloseNode={vi.fn()}
isSingleEnv={false}
isWholeModelImpacted
wholeModelImpact
newCllExperience
/>,
);
expect(
Expand All @@ -207,7 +207,7 @@ describe("NodeView", () => {
isSingleEnv={false}
isWholeModelChanged
isWholeModelImpacted
wholeModelImpact
newCllExperience
/>,
);
expect(
Expand All @@ -227,7 +227,7 @@ describe("NodeView", () => {
node={createNode("model")}
onCloseNode={vi.fn()}
isSingleEnv={false}
wholeModelImpact
newCllExperience
/>,
);
expect(
Expand All @@ -251,7 +251,7 @@ describe("NodeView", () => {
}}
onCloseNode={vi.fn()}
isSingleEnv={false}
wholeModelImpact
newCllExperience
/>,
);
expect(
Expand All @@ -262,7 +262,7 @@ describe("NodeView", () => {
).toHaveLength(0);
});

test("renders no whole-model surfaces when wholeModelImpact is off, even if flags are set", () => {
test("renders no whole-model surfaces when newCllExperience is off, even if flags are set", () => {
const { container } = render(
<NodeView
node={createNode("model")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface WholeModelImpactSets {
/**
* BFS the lineage graph downstream from every node whose CLL
* `change_category === "breaking"`. Cheap — runs only when the
* `whole_model_impact` server flag is on.
* `new_cll_experience` server flag is on.
*/
export function computeWholeModelImpact(
lineageGraph: LineageGraph,
Expand Down
Loading
Loading