From 6fb492fabfaf94551f91e895ff2cdc058ce070cf Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Wed, 30 Sep 2026 16:43:55 +0200 Subject: [PATCH] fix: name assets-only edges by what is built from what Co-Authored-By: Claude Opus 5.5 (1M context) --- .../assets/AssetGraph/edgeDescription.test.ts | 2 +- .../components/assets/AssetGraph/edgeDescription.ts | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/assets/AssetGraph/edgeDescription.test.ts b/frontend/src/lib/components/assets/AssetGraph/edgeDescription.test.ts index 093daf11d0..a0dea60700 100644 --- a/frontend/src/lib/components/assets/AssetGraph/edgeDescription.test.ts +++ b/frontend/src/lib/components/assets/AssetGraph/edgeDescription.test.ts @@ -46,6 +46,6 @@ describe('describeEdge', () => { nameOf, dataOf ) - ).toEqual({ subject: 'raw', phrase: 'feeds', object: 'clean', note: 'Via Clean.' }) + ).toEqual({ subject: 'clean', phrase: 'is built from', object: 'raw', note: 'By Clean.' }) }) }) diff --git a/frontend/src/lib/components/assets/AssetGraph/edgeDescription.ts b/frontend/src/lib/components/assets/AssetGraph/edgeDescription.ts index 7093fb0ade..486bd3dab5 100644 --- a/frontend/src/lib/components/assets/AssetGraph/edgeDescription.ts +++ b/frontend/src/lib/components/assets/AssetGraph/edgeDescription.ts @@ -1,4 +1,5 @@ import { describeSchedule } from '$lib/utils/describeCron' +import { NO_ASSET_NODE_ID } from './assetsOnlyView' /** What a hovered edge says: "`subject` `phrase` `object`", then a note. */ export type EdgeDescription = { subject: string; phrase: string; object?: string; note?: string } @@ -70,7 +71,16 @@ export function describeEdge( } case 'asset-flow': { const via = (e.via ?? []).map(nameOf).join(', ') - return { subject: src, phrase: 'feeds', object: tgt, note: via ? `Via ${via}.` : undefined } + // The scripts that build nothing only read: name them, not the node. + if (e.target === NO_ASSET_NODE_ID) { + return { subject: src, phrase: 'is read by', object: via || tgt } + } + return { + subject: tgt, + phrase: 'is built from', + object: src, + note: via ? `By ${via}.` : undefined + } } case 'dbt-ref': return { subject: tgt, phrase: 'references', object: src, note: 'dbt ref().' }