From 6d432a99cf188a398e360e1f008421de70674a38 Mon Sep 17 00:00:00 2001 From: Kevin Longe <273747162+kvlonge@users.noreply.github.com> Date: Fri, 13 Nov 2026 14:40:48 +0000 Subject: [PATCH 1/3] feat(ui): checks per node in the catalog, build status by folder, and no owner field The catalog read now counts each node's checks by their newest results, so the catalog lists a Checks column on a live server. Overview's build status groups the nodes SQLBuild builds by top-level folder, and the catalog filters by the same folders. Models declare no owner, so the always-empty Owner fields, filters and lineage card field are gone. --- clients/typescript/src/schema.d.ts | 10 ++++++ .../src/warehouse_history/main/mod.rs | 1 + .../main/read_node_check_counts.rs | 34 +++++++++++++++++++ .../_helpers/catalog_nodes.rs | 6 ++-- .../person_reads/list_person_catalog_nodes.rs | 16 +++++++-- .../src/warehouse_metadata/models.rs | 12 +++++++ .../tests/api/test_checks.rs | 30 ++++++++++++++++ ui/src/lib/api/http-catalog.test.ts | 4 +-- ui/src/lib/api/http-catalog.ts | 8 ++--- ui/src/lib/api/http-overview.test.ts | 27 ++++++++++++--- ui/src/lib/api/http-overview.ts | 27 ++++++++++++--- ui/src/lib/api/mock/build-fixtures.ts | 18 ---------- ui/src/lib/api/mock/build-sql.ts | 2 -- ui/src/lib/api/mock/build.ts | 19 ++--------- ui/src/lib/api/types/build.ts | 2 -- .../lib/components/lineage/asset-node.svelte | 4 --- ui/src/lib/lineage/catalog-graph.ts | 4 ++- ui/src/lib/lineage/job-graph.test.ts | 2 +- ui/src/lib/lineage/node-fields.svelte.ts | 3 -- ui/src/lib/mock/scale-graph.ts | 4 +-- ui/src/routes/+page.svelte | 8 ++--- ui/src/routes/catalog/+page.svelte | 22 ++++-------- ui/src/routes/catalog/[name]/node-view.svelte | 2 +- .../routes/catalog/[name]/overview-tab.svelte | 1 - ui/src/routes/jobs/[name]/job-view.svelte | 1 - ui/src/routes/lineage/+page.svelte | 8 +---- 26 files changed, 176 insertions(+), 99 deletions(-) create mode 100644 crates/sqlbuild-orchestration/src/warehouse_history/main/read_node_check_counts.rs diff --git a/clients/typescript/src/schema.d.ts b/clients/typescript/src/schema.d.ts index ff3e5842bc..47426b258b 100644 --- a/clients/typescript/src/schema.d.ts +++ b/clients/typescript/src/schema.d.ts @@ -1439,6 +1439,14 @@ export interface components { run_id: string; version_hash: string; }; + /** @description Checks without a result yet are not known to the server, so they are not counted. */ + CatalogNodeChecks: { + /** @description Failed or errored. */ + failing: number; + passing: number; + total: number; + warning: number; + }; /** @description `success`, `warn` or `failed`; `run_id` is the scheduler run, null for a newer build outside the scheduler. */ CatalogNodeOutcome: { /** Format: date-time */ @@ -1449,6 +1457,8 @@ export interface components { }; /** @description A current snapshot node's declared metadata and latest build, without SQL, source or config. */ CatalogNodeRecord: { + /** @description The checks on the node by their newest result. */ + checks: components["schemas"]["CatalogNodeChecks"]; column_count?: number | null; /** @description The current definition differs from the one `last_build` recorded; false when either is unknown. */ definition_changed: boolean; diff --git a/crates/sqlbuild-orchestration/src/warehouse_history/main/mod.rs b/crates/sqlbuild-orchestration/src/warehouse_history/main/mod.rs index 0f0a8efe59..324d32e1ea 100644 --- a/crates/sqlbuild-orchestration/src/warehouse_history/main/mod.rs +++ b/crates/sqlbuild-orchestration/src/warehouse_history/main/mod.rs @@ -1,3 +1,4 @@ +pub mod read_node_check_counts; pub mod read_person_check; pub mod read_person_check_evidence; pub mod read_person_check_sql; diff --git a/crates/sqlbuild-orchestration/src/warehouse_history/main/read_node_check_counts.rs b/crates/sqlbuild-orchestration/src/warehouse_history/main/read_node_check_counts.rs new file mode 100644 index 0000000000..97edfaa46e --- /dev/null +++ b/crates/sqlbuild-orchestration/src/warehouse_history/main/read_node_check_counts.rs @@ -0,0 +1,34 @@ +//! Each node's check counts from every check's newest result, keyed `kind:name` like the node keys. + +use std::collections::HashMap; + +use uuid::Uuid; + +use crate::store::errors::ControlError; +use crate::store::models::ControlTransaction; +use crate::warehouse_history::_helpers::checks::latest_results; +use crate::warehouse_metadata::models::CatalogNodeChecks; + +pub(crate) async fn read_node_check_counts( + transaction: ControlTransaction, + (location_id, target): (Uuid, &str), +) -> Result<(ControlTransaction, HashMap), ControlError> { + let (transaction, latest) = latest_results(transaction, (location_id, target)).await?; + let mut counts: HashMap = HashMap::new(); + for row in latest { + let record = row.record; + let (Some(kind), Some(name)) = (record.attached_target_kind, record.attached_target_name) + else { + continue; + }; + let checks = counts.entry(format!("{kind}:{name}")).or_default(); + checks.total += 1; + match record.outcome.as_str() { + "pass" => checks.passing += 1, + "warn" => checks.warning += 1, + "fail" | "error" => checks.failing += 1, + _ => {} + } + } + Ok((transaction, counts)) +} diff --git a/crates/sqlbuild-orchestration/src/warehouse_metadata/_helpers/catalog_nodes.rs b/crates/sqlbuild-orchestration/src/warehouse_metadata/_helpers/catalog_nodes.rs index 1b56663fec..922be872a5 100644 --- a/crates/sqlbuild-orchestration/src/warehouse_metadata/_helpers/catalog_nodes.rs +++ b/crates/sqlbuild-orchestration/src/warehouse_metadata/_helpers/catalog_nodes.rs @@ -17,8 +17,8 @@ use crate::warehouse_metadata::constants::{ LINEAGE_DEFINITION_BATCH, OUTCOME_FAILURE_WINDOW, OUTCOME_RECENT_RUNS, }; use crate::warehouse_metadata::models::{ - CatalogNodeBuild, CatalogNodeOutcome, CatalogNodeRecord, CatalogRelation, ColumnLineageEdge, - LineageColumn, LineageNodeColumns, + CatalogNodeBuild, CatalogNodeChecks, CatalogNodeOutcome, CatalogNodeRecord, CatalogRelation, + ColumnLineageEdge, LineageColumn, LineageNodeColumns, }; /// A declared value from the definition itself, its schema entry or its config, in that order. @@ -70,6 +70,7 @@ pub(crate) fn catalog_node( Option, bool, ), + checks: CatalogNodeChecks, ) -> CatalogNodeRecord { let definition = &node.definition; CatalogNodeRecord { @@ -95,6 +96,7 @@ pub(crate) fn catalog_node( last_build, last_outcome, definition_changed, + checks, snapshot_id, } } diff --git a/crates/sqlbuild-orchestration/src/warehouse_metadata/main/person_reads/list_person_catalog_nodes.rs b/crates/sqlbuild-orchestration/src/warehouse_metadata/main/person_reads/list_person_catalog_nodes.rs index 4187567da1..28eb6a962d 100644 --- a/crates/sqlbuild-orchestration/src/warehouse_metadata/main/person_reads/list_person_catalog_nodes.rs +++ b/crates/sqlbuild-orchestration/src/warehouse_metadata/main/person_reads/list_person_catalog_nodes.rs @@ -1,4 +1,4 @@ -//! A person lists the current nodes with view on all of them; builds are batched indexed seeks, attempts one bounded read. +//! A person lists the current nodes with view on all of them; builds are batched indexed seeks, attempts and check results one read each. use uuid::Uuid; @@ -9,6 +9,7 @@ use crate::snapshots::main::read_snapshot_nodes::read_snapshot_nodes; use crate::store::errors::ControlError; use crate::store::main::{begin::begin, commit::commit}; use crate::store::models::{ControlStore, TransactionMode}; +use crate::warehouse_history::main::read_node_check_counts::read_node_check_counts; use crate::warehouse_metadata::_helpers::catalog_nodes::{ catalog_node, last_outcome, latest_attempts, }; @@ -49,6 +50,8 @@ pub async fn list_person_catalog_nodes( let (transaction, found) = latest_fingerprints(transaction, (location_id, target, &queries)).await?; let (transaction, mut attempts) = latest_attempts(transaction, (location_id, target)).await?; + let (transaction, mut checks) = + read_node_check_counts(transaction, (location_id, target)).await?; let mut builds: Vec> = vec![None; nodes.len()]; let mut changed: Vec = vec![false; nodes.len()]; for (position, build) in positions.iter().zip(found) { @@ -67,7 +70,16 @@ pub async fn list_person_catalog_nodes( .zip(builds.into_iter().zip(changed)) .map(|((key, node), (build, changed))| { let outcome = last_outcome(attempts.remove(key.as_str()), build.as_ref()); - catalog_node((key, node), snapshot.snapshot_id, (build, outcome, changed)) + let node_checks = checks + .remove(key.as_str()) + .or_else(|| checks.remove(&format!("{}:{key}", node.kind))) + .unwrap_or_default(); + catalog_node( + (key, node), + snapshot.snapshot_id, + (build, outcome, changed), + node_checks, + ) }) .collect(); commit(transaction).await?; diff --git a/crates/sqlbuild-orchestration/src/warehouse_metadata/models.rs b/crates/sqlbuild-orchestration/src/warehouse_metadata/models.rs index 6484f195e3..feb5fa1814 100644 --- a/crates/sqlbuild-orchestration/src/warehouse_metadata/models.rs +++ b/crates/sqlbuild-orchestration/src/warehouse_metadata/models.rs @@ -882,9 +882,21 @@ pub struct CatalogNodeRecord { pub last_outcome: Option, /// The current definition differs from the one `last_build` recorded; false when either is unknown. pub definition_changed: bool, + /// The checks on the node by their newest result. + pub checks: CatalogNodeChecks, pub snapshot_id: Uuid, } +/// Checks without a result yet are not known to the server, so they are not counted. +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize, utoipa::ToSchema)] +pub struct CatalogNodeChecks { + pub total: usize, + pub passing: usize, + pub warning: usize, + /// Failed or errored. + pub failing: usize, +} + /// `success`, `warn` or `failed`; `run_id` is the scheduler run, null for a newer build outside the scheduler. #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, utoipa::ToSchema)] pub struct CatalogNodeOutcome { diff --git a/crates/sqlbuild-orchestration/tests/api/test_checks.rs b/crates/sqlbuild-orchestration/tests/api/test_checks.rs index 2c1c86bbc8..3fd541528c 100644 --- a/crates/sqlbuild-orchestration/tests/api/test_checks.rs +++ b/crates/sqlbuild-orchestration/tests/api/test_checks.rs @@ -101,6 +101,36 @@ fn given_checks_sharing_an_audit_name_when_people_read_them_then_binding_keys_an ], "one entry per binding key, each its newest result" ); + let (status, nodes) = get( + &client, + (&api.url, &viewer), + &format!("/api/control/locations/{location}/targets/development/nodes"), + ) + .await; + assert_eq!(status, StatusCode::OK); + let checks_of = |key: &str| { + nodes + .as_array() + .expect("nodes") + .iter() + .find(|node| node["node_key"] == key) + .map(|node| node["checks"].clone()) + .unwrap_or_else(|| panic!("{key} listed")) + }; + assert_eq!( + checks_of("orders"), + json!({"total": 1, "passing": 1, "warning": 0, "failing": 0}), + "a node counts each check by its newest result" + ); + assert_eq!( + checks_of("customers"), + json!({"total": 1, "passing": 0, "warning": 0, "failing": 1}), + "an errored check is failing" + ); + assert_eq!( + checks_of("products"), + json!({"total": 0, "passing": 0, "warning": 0, "failing": 0}) + ); for disclosed in ["SELECT", "private@example.com"] { assert!( !list.to_string().contains(disclosed), diff --git a/ui/src/lib/api/http-catalog.test.ts b/ui/src/lib/api/http-catalog.test.ts index c1b1b75592..34d8f57aa3 100644 --- a/ui/src/lib/api/http-catalog.test.ts +++ b/ui/src/lib/api/http-catalog.test.ts @@ -7,7 +7,7 @@ type W = components['schemas']; function node(key: string, extra: Partial = {}): W['CatalogNodeRecord'] { const [kind, name] = key.split(':'); - return { node_key: key, kind, name, tags: [], dependencies: [], definition_changed: false, snapshot_id: '01a1b000-0000-7000-8000-000000000001', ...extra }; + return { node_key: key, kind, name, tags: [], dependencies: [], definition_changed: false, checks: { total: 0, passing: 0, warning: 0, failing: 0 }, snapshot_id: '01a1b000-0000-7000-8000-000000000001', ...extra }; } describe('catalog node mapping', () => { @@ -52,7 +52,7 @@ describe('catalog node mapping', () => { ]); expect(orders.lastBuild).toEqual({ fingerprintRunId: 'sqb-run-1', runId: null, jobKey: null, builtAt: '2026-11-07T06:00:00Z', fingerprint: 'v1' }); expect([orders.description, orders.tags, orders.columnCount, orders.relation]).toEqual(['One row per order', ['marts'], 4, { database: null, schema: 'main', name: 'orders' }]); - expect([orders.stale, orders.checks, orders.lastOutcome, orders.group, orders.owner]).toEqual([[], null, null, null, []]); + expect([orders.stale, orders.lastOutcome, orders.group]).toEqual([[], null, null]); }); it('marks a changed definition, and a built table older than the data upstream of it, even through a view, as stale', () => { diff --git a/ui/src/lib/api/http-catalog.ts b/ui/src/lib/api/http-catalog.ts index 54cccd81cc..93e4c7df0c 100644 --- a/ui/src/lib/api/http-catalog.ts +++ b/ui/src/lib/api/http-catalog.ts @@ -16,8 +16,8 @@ function kindOf(wire: Wire['CatalogNodeRecord']): NodeKind | null { /** * One node of the current snapshot. The server reports declared metadata, the newest fingerprint, - * the newest decisive outcome and whether the definition changed since that fingerprint, not - * check counts, owners or groups, so those stay null or empty and the pages hide them. The + * the newest decisive outcome, whether the definition changed since that fingerprint, and its + * checks by their newest results. It reports no groups, so pages group by folder instead. The * fingerprint's run is a `sqb` run, not a scheduler run. Staleness from upstream builds needs the * whole listing, so `toCatalogNodes` adds it. */ @@ -31,7 +31,6 @@ export function toCatalogNode(wire: Wire['CatalogNodeRecord']): CatalogNode | nu materialization: kind === 'source' || kind === 'seed' ? null : (wire.materialization ?? null), group: null, tags: wire.tags, - owner: [], description: wire.description ?? '', path: wire.path ?? '', upstream: wire.dependencies, @@ -46,7 +45,8 @@ export function toCatalogNode(wire: Wire['CatalogNodeRecord']): CatalogNode | nu ? [{ reason: 'changed', change: 'definition', detail: 'The definition changed since it was last built here.', since: wire.last_build.observed_at }] : [], sourceFreshness: null, - checks: null + // A recording from an older server, such as the static demo's, has no counts: unknown, not zero. + checks: wire.checks ?? null }; } diff --git a/ui/src/lib/api/http-overview.test.ts b/ui/src/lib/api/http-overview.test.ts index 1983125206..83f0766e05 100644 --- a/ui/src/lib/api/http-overview.test.ts +++ b/ui/src/lib/api/http-overview.test.ts @@ -9,7 +9,9 @@ function run(id: string, status: Run['status'], queuedHoursAgo: number, endedHou return { id, status, parentRunId, jobKey, narrowing, window: null, kind: jobKey ? 'job' : 'adhoc', statusReason: null, queuedAt: hoursAgo(queuedHoursAgo), startedAt: hoursAgo(queuedHoursAgo), endedAt: endedHoursAgo === null ? null : hoursAgo(endedHoursAgo) } as Run; } -const node = (key: string, kind: CatalogNode['kind'], stale: StaleReason['reason'][] = []) => ({ key, kind, stale: stale.map((reason) => ({ reason })) }) as CatalogNode; +const node = (key: string, kind: CatalogNode['kind'], path: string, stale: StaleReason['reason'][] = [], extra: Partial = {}) => + ({ key, kind, path, group: null, lastOutcome: null, lastBuild: null, stale: stale.map((reason) => ({ reason })), ...extra }) as CatalogNode; +const built = { lastBuild: { builtAt: hoursAgo(1) } } as Partial; const check = (id: string, outcome: string | null) => ({ id, latest: outcome ? { outcome } : null }) as unknown as Check; const change = (publishedHoursAgo: number, nodes: [NodeChange['op'], string][]) => ({ snapshotId: `s-${publishedHoursAgo}`, publishedAt: hoursAgo(publishedHoursAgo), nodes: nodes.map(([op, key]) => ({ key, op })) }) as SnapshotChange; @@ -39,13 +41,28 @@ describe('overview from live reads', () => { const overview = overviewOf({ runs, checks: [check('a', 'pass'), check('b', 'fail'), check('c', 'error'), check('d', 'warn'), check('e', null)], - nodes: [node('model:orders', 'table', ['changed', 'behind']), node('model:totals', 'view'), node('model:events', 'incremental', ['behind']), node('source:raw', 'source'), node('seed:regions', 'seed')], + nodes: [ + node('model:orders', 'table', 'models/marts/core/orders.sql', ['changed', 'behind'], built), + node('model:totals', 'view', 'models/marts/totals.sql', [], built), + node('model:returns', 'table', 'models/marts/returns.sql', [], { ...built, lastOutcome: 'failed' }), + node('model:events', 'incremental', 'models/staging/events.sql', ['behind'], built), + node('source:raw', 'source', 'models/staging/sources.yml'), + node('seed:regions', 'seed', 'seeds/regions.csv') + ], changes: [change(1, [['added', 'model:orders'], ['added', 'seed:regions'], ['removed', 'model:old']]), change(24 * 8, [['added', 'model:totals']])], events: [event('scheduler', true), event('cleared', false)], acknowledgements: new Map([['orders-new', { by: 'ada', at: hoursAgo(1) }]]), now }); + it('counts the nodes it builds by top-level folder, leaving sources out', () => { + expect(overview.groups).toEqual([ + { group: 'marts', total: 3, current: 1, changed: 1, behind: 1, failed: 1 }, + { group: 'seeds', total: 1, current: 0, changed: 0, behind: 0, failed: 0 }, + { group: 'staging', total: 1, current: 0, changed: 0, behind: 1, failed: 0 } + ]); + }); + it('counts top-level runs queued in the last 24 hours', () => { expect(overview.metrics.runs24h).toEqual({ total: 13, success: 2, warn: 1, partial: 1, failed: 6, active: 2 }); }); @@ -65,7 +82,7 @@ describe('overview from live reads', () => { }); it('counts models and this week’s model changes only', () => { - expect(overview.metrics.models).toEqual({ total: 3, addedThisWeek: 1, removedThisWeek: 1 }); + expect(overview.metrics.models).toEqual({ total: 4, addedThisWeek: 1, removedThisWeek: 1 }); }); it('counts check outcomes, with errors as failing', () => { @@ -82,6 +99,8 @@ describe('overview from live reads', () => { }); it('leaves parts without a server read empty instead of zero', () => { - expect([overview.metrics.cost, overview.groups]).toEqual([null, null]); + expect(overview.metrics.cost).toBeNull(); + const unknown = overviewOf({ runs: [], checks: [], nodes: [{ ...node('model:a', 'table', 'models/a.sql'), stale: null }], changes: [], events: [], acknowledgements: new Map(), now }); + expect(unknown.groups).toBeNull(); }); }); diff --git a/ui/src/lib/api/http-overview.ts b/ui/src/lib/api/http-overview.ts index dc98e58dd9..477e8177b8 100644 --- a/ui/src/lib/api/http-overview.ts +++ b/ui/src/lib/api/http-overview.ts @@ -1,5 +1,6 @@ +import { topFolder } from '$lib/lineage/catalog-graph'; import { checkCountsOf } from './http-catalog'; -import type { Acknowledgement, AttentionItem, AttentionRun, CatalogNode, Check, Overview, PlatformEvent, Run, SnapshotChange } from './types'; +import type { Acknowledgement, AttentionItem, AttentionRun, CatalogNode, Check, GroupStatus, Overview, PlatformEvent, Run, SnapshotChange } from './types'; const DAY = 24 * 60 * 60 * 1000; const MODEL_KINDS = new Set(['view', 'table', 'incremental']); @@ -41,10 +42,28 @@ export function problemRunsOf(topLevel: Run[], now: number): Run[] { const attentionRun = ({ id, jobKey, kind, status, statusReason, nodeCounts, startedAt, endedAt }: Run): AttentionRun => ({ id, jobKey, kind, status, statusReason, nodeCounts, startedAt, endedAt }); +/** Build state per top-level folder, for the nodes SQLBuild builds; a node can be both changed and behind. */ +export function groupStatusOf(nodes: CatalogNode[]): GroupStatus[] { + const groups = new Map(); + for (const n of nodes) { + if (n.kind === 'source') continue; + const group = topFolder(n); + const g = groups.get(group) ?? { group, total: 0, current: 0, changed: 0, behind: 0, failed: 0 }; + const stale = n.stale ?? []; + g.total += 1; + if (n.lastOutcome === 'failed') g.failed += 1; + if (stale.some((s) => s.reason !== 'behind')) g.changed += 1; + if (stale.some((s) => s.reason === 'behind')) g.behind += 1; + if (!stale.length && n.lastOutcome !== 'failed' && n.lastBuild) g.current += 1; + groups.set(group, g); + } + return [...groups.values()].sort((a, b) => a.group.localeCompare(b.group)); +} + /** * The overview from reads the person already has. Staleness comes from the catalog listing, which - * does not check source freshness, so late sources stay unknown. The server has no cost or group - * read yet, so group status is null and cost is left out; the page hides them. + * does not check source freshness, so late sources stay unknown. Groups are top-level folders, and + * group status is null when the server reports no build state. There is no cost read, so the page hides cost. */ export function overviewOf({ runs, checks, nodes, changes, events, acknowledgements, now }: OverviewInputs): Overview { const acknowledged = (r: Run) => acknowledgements.get(r.id) ?? null; @@ -85,7 +104,7 @@ export function overviewOf({ runs, checks, nodes, changes, events, acknowledgeme cost: null }, attention, - groups: null, + groups: nodes.some((n) => n.stale !== null) ? groupStatusOf(nodes) : null, recentChanges: changes.slice(0, RECENT_CHANGES), latestRun: latest ? { id: latest.id, status: latest.status, endedAt: latest.endedAt } : null }; diff --git a/ui/src/lib/api/mock/build-fixtures.ts b/ui/src/lib/api/mock/build-fixtures.ts index 05af694663..ea290431ca 100644 --- a/ui/src/lib/api/mock/build-fixtures.ts +++ b/ui/src/lib/api/mock/build-fixtures.ts @@ -30,7 +30,6 @@ export type ColumnSpec = { name: string; type: string; description: string; audi export type NodeSpec = { materialization: string | null; - owner: string[]; description: string; schema: string | null; columns: ColumnSpec[]; @@ -47,56 +46,48 @@ const c = (name: string, type: string, description: string, audits: string[] = [ export const NODE_SPECS: Record = { raw__customers: { materialization: null, - owner: ['platform'], description: 'Customer records replicated from the shop database.', schema: 'RAW', columns: [c('id', 'bigint', 'Customer ID'), c('first_name', 'varchar', 'Given name'), c('last_name', 'varchar', 'Family name'), c('email', 'varchar', 'Contact email'), c('created_at', 'timestamp', 'Sign-up time (UTC)')] }, raw__payments: { materialization: null, - owner: ['platform'], description: 'Payment events replicated from the payments service.', schema: 'RAW', columns: [c('id', 'bigint', 'Payment ID'), c('order_id', 'bigint', 'Order paid for'), c('payment_method', 'varchar', 'card | cash | voucher', ['accepted_values']), c('amount_cents', 'integer', 'Amount in cents'), c('status', 'varchar', 'success | failed'), c('created_at', 'timestamp', 'Payment time (UTC)')] }, raw__orders: { materialization: 'loader · delete_insert', - owner: ['ingest'], description: 'Partner order files, loaded incrementally by the order loader.', schema: 'RAW', columns: [c('id', 'bigint', 'Order ID'), c('user_id', 'bigint', 'Customer ID'), c('order_date', 'timestamp', 'Order time (UTC)'), c('status', 'varchar', 'Order status'), c('total_cents', 'integer', 'Order total in cents'), c('_loaded_at', 'timestamp', 'Load time')] }, country_codes: { materialization: 'seed', - owner: ['analytics'], description: 'ISO country codes and sales regions.', schema: 'STAGING', columns: [c('code', 'varchar', 'ISO 3166 alpha-2 code', ['unique']), c('name', 'varchar', 'Country name'), c('region', 'varchar', 'Sales region')] }, stg_customers: { materialization: 'view', - owner: ['analytics'], description: 'Cleaned customers from the raw replica.', schema: 'STAGING', columns: [c('customer_id', 'bigint', 'Customer ID', ['not_null'], 'id AS customer_id'), c('first_name', 'varchar', 'Given name'), c('last_name', 'varchar', 'Family name'), c('email_domain', 'varchar', 'Domain of the contact email', [], "split_part(email, '@', 2) AS email_domain"), c('country_code', 'varchar', 'ISO country code', [], "'GB' AS country_code"), c('first_order_at', 'timestamp', 'Sign-up time (UTC)', [], 'created_at AS first_order_at')] }, stg_orders: { materialization: 'view', - owner: ['analytics'], description: 'Cleaned orders from the order loader.', schema: 'STAGING', columns: [c('order_id', 'bigint', 'Order ID', ['not_null'], 'id AS order_id'), c('customer_id', 'bigint', 'Customer ID', [], 'user_id AS customer_id'), c('order_status', 'varchar', 'completed | pending | cancelled', ['accepted_values'], 'status AS order_status'), c('total_cents', 'integer', 'Order total in cents'), c('ordered_at', 'timestamp', 'Order time (UTC)', [], 'order_date AS ordered_at')] }, stg_payments: { materialization: 'view', - owner: ['analytics'], description: 'Cleaned payments from the payments replica.', schema: 'STAGING', columns: [c('payment_id', 'bigint', 'Payment ID', ['not_null'], 'id AS payment_id'), c('order_id', 'bigint', 'Order paid for'), c('payment_method', 'varchar', 'card | cash | voucher'), c('amount_cents', 'integer', 'Amount in cents'), c('status', 'varchar', 'success | failed')] }, fact_orders: { materialization: 'table', - owner: ['analytics', 'finance-data'], description: 'One row per order with payment and customer attributes.', schema: 'MARTS', columns: [ @@ -111,7 +102,6 @@ export const NODE_SPECS: Record = { }, dim_customers: { materialization: 'table', - owner: ['analytics'], description: 'Customer dimension with first and last order and lifetime value.', schema: 'MARTS', from: '__ref("stg_customers")\nLEFT JOIN __ref("fact_orders") USING (customer_id)\nLEFT JOIN __ref("country_codes") ON country_code = code', @@ -128,7 +118,6 @@ export const NODE_SPECS: Record = { }, daily_revenue: { materialization: 'table', - owner: ['finance-data'], description: 'Daily revenue from completed orders.', schema: 'MARTS', where: "order_status = 'completed'", @@ -137,14 +126,12 @@ export const NODE_SPECS: Record = { }, customer_status: { materialization: 'incremental · merge', - owner: ['growth'], description: 'Active or lapsed status per customer, merged on change.', schema: 'MARTS', columns: [c('customer_id', 'bigint', 'Customer ID'), c('status', 'varchar', 'active | lapsed', ['not_null'], "CASE WHEN last_order_at > now() - INTERVAL 90 DAY THEN 'active' ELSE 'lapsed' END AS status"), c('status_changed_at', 'timestamp', 'When the status last changed', [], 'last_order_at AS status_changed_at')] }, hourly_order_activity: { materialization: 'incremental · microbatch', - owner: ['analytics'], description: 'Orders and revenue per hour, built in hourly microbatches.', schema: 'ANALYTICS', groupBy: true, @@ -153,7 +140,6 @@ export const NODE_SPECS: Record = { }, hourly_activity_ctx: { materialization: 'incremental · microbatch', - owner: ['analytics'], description: 'Hourly activity with the day’s revenue for context.', schema: 'ANALYTICS', from: `__ref("hourly_order_activity")\nJOIN __ref("daily_revenue") ON date_trunc('day', activity_hour) = revenue_date`, @@ -162,7 +148,6 @@ export const NODE_SPECS: Record = { }, daily_activity_rollup: { materialization: 'incremental · microbatch', - owner: ['analytics'], description: 'Daily rollup of hourly activity with the peak hour.', schema: 'ANALYTICS', groupBy: true, @@ -171,21 +156,18 @@ export const NODE_SPECS: Record = { }, revenue_report: { materialization: 'table', - owner: ['finance-data'], description: 'Revenue report for the finance dashboard.', schema: 'REPORTING', columns: [c('revenue_date', 'date', 'Order date'), c('total_revenue', 'decimal(18,2)', 'Revenue in dollars', [], 'cents_to_dollars(total_revenue_cents) AS total_revenue'), c('order_count', 'bigint', 'Completed orders'), c('avg_order_value', 'decimal(18,2)', 'Average order value in dollars', [], 'cents_to_dollars(total_revenue_cents / nullif(order_count, 0)) AS avg_order_value')] }, activity_report: { materialization: 'view', - owner: ['analytics'], description: 'Hourly activity for the operations dashboard.', schema: 'REPORTING', columns: [c('activity_hour', 'timestamp', 'Hour (UTC)'), c('order_count', 'bigint', 'Orders in the hour'), c('share_of_day', 'double', 'Share of the day’s revenue, in percent', [], 'pct(share_of_day) AS share_of_day')] }, export_revenue_csv: { materialization: null, - owner: ['finance-data'], description: 'Exports the revenue report as CSV to the finance file drop.', schema: null, columns: [] diff --git a/ui/src/lib/api/mock/build-sql.ts b/ui/src/lib/api/mock/build-sql.ts index 299a3c01e7..a870983f36 100644 --- a/ui/src/lib/api/mock/build-sql.ts +++ b/ui/src/lib/api/mock/build-sql.ts @@ -7,7 +7,6 @@ import { NODE_SPECS, type NodeSpec } from './build-fixtures'; const FACT_ORDERS_SQL = `MODEL ( materialized table, unique_key order_id, - owner [analytics, finance-data], tags [finance, core], description "One row per order with payment and customer attributes." ); @@ -48,7 +47,6 @@ function header(spec: NodeSpec, sn: SnapshotNode): string { const lines = [`materialized ${materialized}`]; if (strategy) lines.push(`strategy ${strategy}`); if (spec.microbatch) lines.push(`cursor ${spec.microbatch.cursorColumn}`, `batch_size ${spec.microbatch.batchSize}`); - if (spec.owner.length) lines.push(`owner [${spec.owner.join(', ')}]`); if (sn.tags.length) lines.push(`tags [${sn.tags.join(', ')}]`); lines.push(`description "${spec.description}"`); return `MODEL (\n ${lines.join(',\n ')}\n);`; diff --git a/ui/src/lib/api/mock/build.ts b/ui/src/lib/api/mock/build.ts index 53e8714d98..278da0c8bc 100644 --- a/ui/src/lib/api/mock/build.ts +++ b/ui/src/lib/api/mock/build.ts @@ -4,7 +4,7 @@ // (synced fingerprints), compared against the snapshot change feed. import { ApiError } from '../client'; -import { problemRunsOf } from '../http-overview'; +import { groupStatusOf, problemRunsOf } from '../http-overview'; import type { AttentionItem, BuiltDefinition, @@ -20,7 +20,6 @@ import type { CheckOutcome, ColumnLineage, CostChange, - GroupStatus, MicrobatchCoverage, NodeBuild, NodeOutcome, @@ -257,19 +256,6 @@ export class MockBuild { } const cost = this.#hasCost(scope) ? recent.reduce((s, r) => s + (r.cost?.value ?? 0), 0) : null; - const groups = new Map(); - for (const n of nodes) { - if (n.kind === 'source') continue; - const group = n.group ?? ''; - const g = groups.get(group) ?? { group, total: 0, current: 0, changed: 0, behind: 0, failed: 0 }; - g.total += 1; - if (n.lastOutcome === 'failed') g.failed += 1; - const stale = n.stale ?? []; - if (stale.some((s) => s.reason !== 'behind')) g.changed += 1; - if (stale.some((s) => s.reason === 'behind')) g.behind += 1; - if (!stale.length && n.lastOutcome !== 'failed' && n.lastBuild) g.current += 1; - groups.set(group, g); - } const latest = runs.find((r) => r.endedAt); return this.#ctx.reply({ metrics: { @@ -292,7 +278,7 @@ export class MockBuild { cost: cost === null ? null : { last24h: round(cost), baseline: round(cost * 0.78), baselineDays: 7, unit: 'credits' } }, attention, - groups: [...groups.values()], + groups: groupStatusOf(nodes), recentChanges: this.#changes(scope).slice(0, 4), latestRun: latest ? { id: latest.id, status: latest.status, endedAt: latest.endedAt } : null }); @@ -408,7 +394,6 @@ export class MockBuild { materialization: spec?.materialization ?? null, group: sn.group, tags: [...sn.tags], - owner: [...(spec?.owner ?? [])], description: spec?.description ?? '', path: sn.path, upstream: [...sn.upstream], diff --git a/ui/src/lib/api/types/build.ts b/ui/src/lib/api/types/build.ts index 0a1380de75..5f9e8024d7 100644 --- a/ui/src/lib/api/types/build.ts +++ b/ui/src/lib/api/types/build.ts @@ -59,8 +59,6 @@ export type CatalogNode = { /** Null when the server does not report groups. */ group: string | null; tags: string[]; - /** Declared `owner`, or the project default. */ - owner: string[]; description: string; path: string; upstream: string[]; diff --git a/ui/src/lib/components/lineage/asset-node.svelte b/ui/src/lib/components/lineage/asset-node.svelte index 4954794647..fff66c582a 100644 --- a/ui/src/lib/components/lineage/asset-node.svelte +++ b/ui/src/lib/components/lineage/asset-node.svelte @@ -12,7 +12,6 @@ GitMerge, Repeat, Columns3, - User, Workflow, type Icon as IconType } from '@lucide/svelte'; @@ -36,7 +35,6 @@ /** When the node was last built, or a source last loaded. */ lastBuiltAt?: string; description?: string; - owner?: string[]; tags?: string[]; columnCount?: number; }; @@ -88,7 +86,6 @@ const hasDetail = $derived( !!( (f.description && d.description) || - (f.owner && d.owner?.length) || (f.tags && d.tags?.length) || (f.columns && d.columnCount != null) ) @@ -107,7 +104,6 @@ {#if hasDetail}
{#if f.description && d.description}

{d.description}

{/if} - {#if f.owner && d.owner?.length} {d.owner.join(', ')}{/if} {#if f.columns && d.columnCount != null} {d.columnCount} columns{/if} {#if f.tags && d.tags?.length}{d.tags.join(', ')}{/if}
diff --git a/ui/src/lib/lineage/catalog-graph.ts b/ui/src/lib/lineage/catalog-graph.ts index a6117bac33..3a72c0417e 100644 --- a/ui/src/lib/lineage/catalog-graph.ts +++ b/ui/src/lib/lineage/catalog-graph.ts @@ -44,7 +44,6 @@ export function cardData(node: CatalogNode): Record { icon: nodeIconKey(node), lastBuiltAt: node.kind === 'source' ? (node.sourceFreshness?.loadedAt ?? undefined) : node.lastBuild?.builtAt, description: node.description || undefined, - owner: node.owner, tags: node.tags, columnCount: node.columnCount || undefined, ...checksBadge(node) @@ -73,6 +72,9 @@ export function folderOf(node: CatalogNode): string { return slash > 0 ? path.slice(0, slash) : node.kind === 'seed' ? 'seeds' : 'models'; } +/** The outermost folder around a node, such as `marts`, which the catalog filters and Overview counts by. */ +export const topFolder = (node: CatalogNode): string => folderOf(node).split('/')[0]; + export type GroupCard = { group: string; count: number; ok: number; stale: number; failed: number; dimmed?: boolean }; const groupId = (group: string) => `group:${group}`; diff --git a/ui/src/lib/lineage/job-graph.test.ts b/ui/src/lib/lineage/job-graph.test.ts index 50c2d1dd20..eac4067156 100644 --- a/ui/src/lib/lineage/job-graph.test.ts +++ b/ui/src/lib/lineage/job-graph.test.ts @@ -3,7 +3,7 @@ import type { Node } from '@xyflow/svelte'; import type { CatalogNode } from '$lib/api'; import { boxId, jobGraph, layoutJobGraph } from './job-graph'; -const node = (key: string, upstream: string[] = []) => ({ key, kind: 'table', upstream, owner: [], tags: [], stale: null, checks: null }) as unknown as CatalogNode; +const node = (key: string, upstream: string[] = []) => ({ key, kind: 'table', upstream, tags: [], stale: null, checks: null }) as unknown as CatalogNode; const measured = (nodes: Node[]) => nodes.map((n) => (n.type === 'job' ? n : { ...n, measured: { width: 236, height: 61 } })); // staging builds raw → stg; orders reads stg; reports waits for orders only through `after`. diff --git a/ui/src/lib/lineage/node-fields.svelte.ts b/ui/src/lib/lineage/node-fields.svelte.ts index 456435439f..3e9cbb9555 100644 --- a/ui/src/lib/lineage/node-fields.svelte.ts +++ b/ui/src/lib/lineage/node-fields.svelte.ts @@ -8,7 +8,6 @@ export type NodeFieldKey = | 'checks' | 'lastBuilt' | 'description' - | 'owner' | 'tags' | 'columns'; @@ -20,7 +19,6 @@ export const NODE_FIELDS: NodeField[] = [ { key: 'checks', label: 'Checks' }, { key: 'lastBuilt', label: 'Last built' }, { key: 'description', label: 'Description' }, - { key: 'owner', label: 'Owner' }, { key: 'tags', label: 'Tags' }, { key: 'columns', label: 'Column count' } ]; @@ -31,7 +29,6 @@ const DEFAULTS: Record = { checks: true, lastBuilt: true, description: false, - owner: false, tags: false, columns: false }; diff --git a/ui/src/lib/mock/scale-graph.ts b/ui/src/lib/mock/scale-graph.ts index 946c995cae..0d1a9f3599 100644 --- a/ui/src/lib/mock/scale-graph.ts +++ b/ui/src/lib/mock/scale-graph.ts @@ -3,7 +3,7 @@ import type { Edge, Node } from '@xyflow/svelte'; // Synthetic warehouse-shaped lineage for scale testing (?models=N on /lineage). // Deterministic: the same N always produces the same graph. Models carry the // same fields as the catalog-backed lineage cards (kind, icon, checks, stale, -// owner, tags, ...) so the real cards render in full. +// tags, ...) so the real cards render in full. const LAYERS = ['raw', 'stg', 'int', 'int', 'fct', 'dim', 'mart', 'rpt'] as const; // share of models per layer (sums to 1) @@ -14,7 +14,6 @@ const DOMAIN_NAMES = [ 'loyalty', 'marketing', 'finance', 'pricing', 'reviews', 'support', 'ops', 'forecasting', 'logistics', 'events', 'web', 'mobile', 'franchise', 'quality', 'audit' ]; -const OWNERS = ['analytics', 'finance-data', 'growth', 'platform', 'ops']; const TAGS = ['core', 'finance', 'pii', 'daily', 'hourly', 'reporting']; export const domainName = (i: number) => @@ -105,7 +104,6 @@ export function scaleGraph(total: number): { nodes: Node[]; edges: Edge[] } { ? {} : { columnCount: 3 + Math.floor(rand() * 20), - owner: rand() < 0.6 ? [pick(OWNERS)] : undefined, tags: rand() < 0.4 ? [pick(TAGS)] : undefined, description: rand() < 0.5 ? `${layer} model for ${domainName(domain)}.` : undefined }) diff --git a/ui/src/routes/+page.svelte b/ui/src/routes/+page.svelte index 3b22c1aacf..32124d2847 100644 --- a/ui/src/routes/+page.svelte +++ b/ui/src/routes/+page.svelte @@ -76,7 +76,7 @@ const costChange = $derived(m?.cost && m.cost.baseline ? Math.round(((m.cost.last24h - m.cost.baseline) / m.cost.baseline) * 100) : null); const groups = $derived(data?.groups ?? []); // Parts without a server read stay hidden rather than showing zeros, and wait for the read so they don't appear and vanish. - const showGroups = $derived(!!data && data.groups !== null); + const showGroups = $derived(!!data?.groups?.length); const showTimeline = $derived(app.client.supports('timeline')); const canAcknowledge = $derived(app.client.supports('acknowledgeRun')); @@ -224,11 +224,11 @@
{#if showGroups}
-

Build status by group

Current, stale and failed nodes · {app.location?.name}
+

Build status by folder

Current, stale and failed nodes in each top-level folder
Open catalog →
-
GroupCurrentChangedBehindFailed
+
FolderCurrentChangedBehindFailed
{#each groups as g (g.group)} {g.group} @@ -321,7 +321,7 @@ .health-facts { display: flex; gap: 20px; margin-left: 44px; color: var(--muted-foreground); font: 12px var(--font-sans); } .health-facts span { display: flex; align-items: center; gap: 6px; } .health-facts b { color: var(--foreground); font-weight: 500; } - .health-head > a, .panel-heading > a { margin-left: auto; color: var(--primary); font: 500 12.5px var(--font-sans); } + .health-head > a, .panel-heading > a { margin-left: auto; color: var(--primary); font: 500 12.5px var(--font-sans); white-space: nowrap; } .metric-strip { display: grid; min-height: 98px; grid-template-columns: repeat(var(--metrics), minmax(0, 1fr)); overflow: hidden; } .metric { min-width: 0; padding: 15px 16px 14px; border-right: 1px solid var(--border); } .metric:last-child { border-right: 0; } diff --git a/ui/src/routes/catalog/+page.svelte b/ui/src/routes/catalog/+page.svelte index 6642f99e63..557adda935 100644 --- a/ui/src/routes/catalog/+page.svelte +++ b/ui/src/routes/catalog/+page.svelte @@ -14,6 +14,7 @@ import GatedButton from '$lib/components/operate/gated-button.svelte'; import StaleBadges from '$lib/components/build-area/stale-badges.svelte'; import { planHref } from '$lib/run/command'; + import { topFolder } from '$lib/lineage/catalog-graph'; import { app } from '$lib/state/app.svelte'; import { createResource } from '$lib/state/resource.svelte'; import { formatAgo, formatStamp } from '$lib/format/time'; @@ -28,7 +29,6 @@ const params = page.url.searchParams; let query = $state(params.get('q') ?? ''); let kindFilter = $state<'all' | NodeKind>((NODE_KINDS as string[]).includes(params.get('kind') ?? '') ? (params.get('kind') as NodeKind) : 'all'); - let ownerFilter = $state(params.get('owner') ?? ''); let groupFilter = $state(params.get('group') ?? ''); let statusFilter = $state(params.get('stale') ? 'stale' : ''); @@ -41,8 +41,7 @@ (f === 'warn' && n.lastOutcome === 'warn'); const kinds = $derived(NODE_KINDS.filter((k) => all.some((n) => n.kind === k))); - const owners = $derived([...new Set(all.flatMap((n) => n.owner))].sort()); - const groups = $derived([...new Set(all.flatMap((n) => (n.group === null ? [] : [n.group])))]); + const groups = $derived([...new Set(all.map(topFolder))].sort()); /** Outcome and staleness come together; a server that reports neither leaves them unknown. */ const showBuildState = $derived(all.some((n) => n.stale !== null)); const showChecks = $derived(all.some((n) => n.checks !== null)); @@ -53,15 +52,14 @@ all.filter((n) => { if (kindFilter !== 'all' && n.kind !== kindFilter) return false; // A filter whose control is hidden, for example from a shared link, never narrows the list. - if (owners.length && ownerFilter && !n.owner.includes(ownerFilter)) return false; - if (groups.length && groupFilter && n.group !== groupFilter) return false; + if (groups.length > 1 && groupFilter && topFolder(n) !== groupFilter) return false; if (showBuildState && !matchesStatus(n, statusFilter)) return false; const q = query.trim().toLowerCase(); - return !q || [n.key, n.description, kindLine(n), ...n.tags, ...n.owner].some((s) => s.toLowerCase().includes(q)); + return !q || [n.key, n.description, kindLine(n), ...n.tags].some((s) => s.toLowerCase().includes(q)); }) ); - const columns = $derived(3 + (owners.length ? 1 : 0) + (showBuildState ? 2 : 0) + (showChecks ? 1 : 0)); + const columns = $derived(3 + (showBuildState ? 2 : 0) + (showChecks ? 1 : 0)); const counts = $derived({ failed: all.filter((n) => n.lastOutcome === 'failed').length, warn: all.filter((n) => n.lastOutcome === 'warn').length, @@ -105,8 +103,7 @@ options={[{ value: 'all' as const, label: 'All', count: all.length }, ...kinds.map((k) => ({ value: k, label: nodeKindPlural[k], count: all.filter((n) => n.kind === k).length }))]} /> {#if showBuildState} ({ ...o, count: all.filter((n) => matchesStatus(n, o.value)).length }))} />{/if} - {#if owners.length} ({ value: o, label: o, count: all.filter((n) => n.owner.includes(o)).length }))} />{/if} - {#if groups.length} ({ value: g, label: g, count: all.filter((n) => n.group === g).length }))} />{/if} + {#if groups.length > 1} ({ value: g, label: g, count: all.filter((n) => topFolder(n) === g).length }))} />{/if} {/snippet} @@ -116,7 +113,6 @@ Name Kind - {#if owners.length}Owner{/if} {#if showBuildState}Last outcomeStale{/if} {#if showChecks}Checks{/if} Last built @@ -136,12 +132,6 @@
{kindLine(n)}{#if n.group}
{n.group}
{/if} - {#if owners.length} - - {#if n.owner.length}
{#each n.owner as o (o)}{o}{/each}
- {:else}—{/if} - - {/if} {#if showBuildState} {#if n.kind === 'source'} diff --git a/ui/src/routes/catalog/[name]/node-view.svelte b/ui/src/routes/catalog/[name]/node-view.svelte index e1804e0d46..19f2e3198b 100644 --- a/ui/src/routes/catalog/[name]/node-view.svelte +++ b/ui/src/routes/catalog/[name]/node-view.svelte @@ -110,7 +110,7 @@
{#if n}
- {kindLine(n)}{#if n.group}{n.group}{/if}{#if n.owner.length}{n.owner.join(', ')}{/if} + {kindLine(n)}{#if n.group}{n.group}{/if} {#if n.kind === 'source'}{n.sourceFreshness?.loadedAt ? `Loaded ${formatAgo(n.sourceFreshness.loadedAt, app.now)}` : 'No freshness data'} {:else}{n.lastBuild ? `Last built ${formatAgo(n.lastBuild.builtAt, app.now)}` : 'Never built'}{/if}
diff --git a/ui/src/routes/catalog/[name]/overview-tab.svelte b/ui/src/routes/catalog/[name]/overview-tab.svelte index 2a63d18439..dd55793799 100644 --- a/ui/src/routes/catalog/[name]/overview-tab.svelte +++ b/ui/src/routes/catalog/[name]/overview-tab.svelte @@ -126,7 +126,6 @@
Kind
{kindLine(node)}
{#if unique}
Unique key
{unique}
{/if} {#if node.group}
Group
{node.group}
{/if} -
Owner
{node.owner.join(', ') || '—'}
Path
{node.path}
Relation
{relationName(node.relation)}
{#if node.lastBuild}
Build version
{node.lastBuild.fingerprint.slice(0, 12)}
{/if} diff --git a/ui/src/routes/jobs/[name]/job-view.svelte b/ui/src/routes/jobs/[name]/job-view.svelte index c17941c24a..a5778e7eb0 100644 --- a/ui/src/routes/jobs/[name]/job-view.svelte +++ b/ui/src/routes/jobs/[name]/job-view.svelte @@ -166,7 +166,6 @@
{#if n.lastOutcome || n.lastBuild}
Last build
{n.lastOutcome ? nodeOutcomeLabel[n.lastOutcome] : 'Built'}{n.lastBuild ? ` · ${formatAgo(n.lastBuild.builtAt, app.now)}` : ''}
{/if} {#if n.relation}
Writes
{[n.relation.database, n.relation.schema, n.relation.name].filter(Boolean).join('.')}
{/if} - {#if n.owner.length}
Owner
{n.owner.join(', ')}
{/if} {#if n.path}
Defined in
{n.path}
{/if}
{:else if pickedNodes.length > 1} diff --git a/ui/src/routes/lineage/+page.svelte b/ui/src/routes/lineage/+page.svelte index 648d7082d0..32a15af65f 100644 --- a/ui/src/routes/lineage/+page.svelte +++ b/ui/src/routes/lineage/+page.svelte @@ -313,9 +313,8 @@ // ---- toolbar filters: non-matching nodes are dimmed ---- let kindFilter = $state(''); let groupFilter = $state(''); - let ownerFilter = $state(''); let statusFilter = $state<'' | 'stale' | 'changed' | 'behind' | 'failed'>(''); - const filterActive = $derived(!!(kindFilter || groupFilter || ownerFilter || statusFilter)); + const filterActive = $derived(!!(kindFilter || groupFilter || statusFilter)); function matchesFilter(n: Node): boolean { if (n.type === 'folder') return catalogNodes.some((c) => `${folderOf(c)}/`.startsWith(`${n.data.group}/`) && matchesCatalog(c)); const c = catalogByKey.get(n.id); @@ -324,7 +323,6 @@ function matchesCatalog(c: CatalogNode): boolean { if (kindFilter && c.kind !== kindFilter) return false; if (groupFilter && c.group !== groupFilter) return false; - if (ownerFilter && !c.owner.includes(ownerFilter)) return false; return matchesFilterStatus(c, statusFilter); } function matchesFilterStatus(c: CatalogNode, f: typeof statusFilter): boolean { @@ -337,7 +335,6 @@ const catalogNodes = $derived(catalog.data ?? []); const kindOptions = $derived(NODE_KINDS.filter((k) => catalogNodes.some((n) => n.kind === k)).map((k) => ({ value: k, label: nodeKindPlural[k], count: catalogNodes.filter((n) => n.kind === k).length }))); const groupOptions = $derived([...new Set(catalogNodes.flatMap((n) => (n.group === null ? [] : [n.group])))].map((g) => ({ value: g, label: g, count: catalogNodes.filter((n) => n.group === g).length }))); - const ownerOptions = $derived([...new Set(catalogNodes.flatMap((n) => n.owner))].sort().map((o) => ({ value: o, label: o, count: catalogNodes.filter((n) => n.owner.includes(o)).length }))); const statusOptions = [ { value: 'stale' as const, label: 'Stale' }, { value: 'changed' as const, label: 'Stale · changed' }, @@ -590,7 +587,6 @@
{#if groupOptions.length}{/if} - {#if ownerOptions.length}{/if} ({ ...o, count: catalogNodes.filter((c) => matchesFilterStatus(c, o.value)).length }))} />
{/if} @@ -735,7 +731,6 @@ {primary?.data.kind} {#if primary?.data.group}{primary.data.group}{/if} - {#if (primary?.data.owner as string[] | undefined)?.length}{(primary?.data.owner as string[]).join(', ')}{/if} {/if} @@ -898,7 +893,6 @@
Kind
{kindLine(d)}
Unique key
{sqlOutline.config.find((c) => c.key === 'unique_key')?.value ?? '—'}
Group
{d.group ?? '—'}
-
Owner
{d.owner.join(', ') || '—'}
Tags
{d.tags.join(', ') || '—'}
Build version
{d.lastBuild?.fingerprint.slice(0, 12) ?? '—'}
From 212618fdbebb684c968f0cfe7099400d14fab380 Mon Sep 17 00:00:00 2001 From: Kevin Longe <273747162+kvlonge@users.noreply.github.com> Date: Fri, 13 Nov 2026 14:47:34 +0000 Subject: [PATCH 2/3] fix(ui): show a short sqb run id on Maintenance --- ui/src/routes/maintenance/+page.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/src/routes/maintenance/+page.svelte b/ui/src/routes/maintenance/+page.svelte index d6f962f5fa..600edd76dd 100644 --- a/ui/src/routes/maintenance/+page.svelte +++ b/ui/src/routes/maintenance/+page.svelte @@ -10,6 +10,7 @@ import type { OldNameView } from '$lib/api'; import { formatAgo, formatIn, formatStamp } from '$lib/format/time'; import { formatRelation } from '$lib/platform/labels'; + import { shortRunId } from '$lib/build-area/labels'; import { decisionLabel, migrationKind, @@ -112,7 +113,7 @@
{formatRelation(m.destination)}
{decisionLabel[m.decision]} - {m.runId.replace(/^run-/, '')} + {shortRunId(m.runId.replace(/^run-/, ''))} {:else} @@ -191,7 +192,7 @@ {#if j.originalQualifiedName}{j.originalQualifiedName}{:else}Temporary build table{/if} {j.archiveQualifiedName} - {j.runId.replace(/^run-/, '')} + {shortRunId(j.runId.replace(/^run-/, ''))} {:else} From a5d5595fe1e82a1db9a6aaa0473cec7b40aa94dc Mon Sep 17 00:00:00 2001 From: Kevin Longe <273747162+kvlonge@users.noreply.github.com> Date: Fri, 13 Nov 2026 16:10:49 +0000 Subject: [PATCH 3/3] fix(ui): keep job names readable in the runs list --- ui/src/routes/runs/run-list.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/src/routes/runs/run-list.svelte b/ui/src/routes/runs/run-list.svelte index 20ac839658..7390a76dd5 100644 --- a/ui/src/routes/runs/run-list.svelte +++ b/ui/src/routes/runs/run-list.svelte @@ -55,10 +55,10 @@ - + - - + + @@ -178,6 +178,7 @@ overflow: auto; } .runs { + min-width: 1000px; table-layout: fixed; } .runs thead th { @@ -272,6 +273,7 @@ background: var(--sb-hover); } .what .chip + .chip { + flex-shrink: 0; color: var(--muted-foreground); font-size: 11.5px; }