From 89c1d3bb04c8a5246ea562f8bf4465563b722130 Mon Sep 17 00:00:00 2001 From: Emma Hoggan Date: Thu, 25 Jun 2026 15:44:57 -0600 Subject: [PATCH 1/2] Add owner field to studio report type and CLI rendering Updates the StudioReport type to include an owner object (id, name, email) and renders it in the human-readable output for report info and list commands (DXAPT-466). Co-authored-by: Cursor --- src/commands/studio/reports.test.ts | 6 ++++++ src/commands/studio/reports.ts | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/commands/studio/reports.test.ts b/src/commands/studio/reports.test.ts index 1fef455..b71858e 100644 --- a/src/commands/studio/reports.test.ts +++ b/src/commands/studio/reports.test.ts @@ -74,6 +74,11 @@ describe("studio reports command", () => { markdown_notes: null, view_access_type: "everyone", edit_access_type: "specific_users", + owner: { + id: "usr_abc", + name: "Alice Example", + email: "alice@example.com", + }, url: "https://app.example.com/datacloud/studio/reports/abc123", tiles: [ { @@ -395,6 +400,7 @@ describe("studio reports command", () => { expect(output).toContain( "https://app.example.com/datacloud/studio/reports/abc123", ); + expect(output).toContain("Alice Example (alice@example.com)"); expect(output).toContain("### Tiles"); expect(output).toContain("Weekly deploys (line)"); expect(output).not.toContain("Weekly deploys (line, tile_line)"); diff --git a/src/commands/studio/reports.ts b/src/commands/studio/reports.ts index ba66717..7dc5d78 100644 --- a/src/commands/studio/reports.ts +++ b/src/commands/studio/reports.ts @@ -315,6 +315,12 @@ type StudioReportTile = { chart_config: Record; }; +type StudioReportOwner = { + id: string; + name: string; + email: string; +}; + type StudioReport = { id: string; name: string | null; @@ -322,6 +328,7 @@ type StudioReport = { markdown_notes: string | null; view_access_type: string; edit_access_type: string; + owner: StudioReportOwner | null; url: string; tiles: StudioReportTile[]; created_at: string; @@ -498,6 +505,7 @@ function renderStudioReport(report: StudioReport): ui.Block[] { [ ui.dli("URL", ui.link(report.url)), ui.dli("Description", formatOptionalText(report.description)), + ui.dli("Owner", formatOwner(report.owner)), ui.dli("View access", formatViewAccessType(report.view_access_type)), ui.dli("Edit access", formatEditAccessType(report.edit_access_type)), ui.dli("Tiles", report.tiles.length.toString()), @@ -642,6 +650,11 @@ function formatOptionalText(value: string | null): string { return value && value.trim().length > 0 ? value : ui.dim("(None)"); } +function formatOwner(owner: StudioReportOwner | null): string { + if (!owner) return ui.dim("(None)"); + return `${owner.name} (${owner.email})`; +} + function formatViewAccessType(value: string): string { switch (value) { case "owner_and_direct_url_only": From 4fc15ef186ec4c0d74445d56c0c023f934a687f7 Mon Sep 17 00:00:00 2001 From: Emma Hoggan Date: Thu, 25 Jun 2026 17:56:49 -0600 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c2d966..7291339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Updated + +Augment `dx studio reports` commands to return owner field where relevant. + ## 0.5.2 - 2026-06-17 ### Added