From 6ff9c02ae523c85e01e95d44f0e2c741c3557fd7 Mon Sep 17 00:00:00 2001 From: John Mitsch Date: Mon, 8 Jun 2026 16:37:27 -0400 Subject: [PATCH] Tidy `qn endpoint list` columns (DX-5621) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Short list: rename MULTI → MULTICHAIN, render as boolean (✓/✗). Drop the dedicated/shared column from the default view; move it to `--wide` as DEDICATED with boolean rendering. Final short shape: `ID, NAME, LABEL, STATUS, CHAIN/NETWORK, MULTICHAIN`; `--wide` adds `HTTP, WSS, DEDICATED`. Also gitignore docs/agents/ and CLAUDE.local.md. Snapshots updated. --- .gitignore | 4 ++++ src/commands/endpoint/render.rs | 15 +++++---------- tests/output_snapshots.rs | 11 +++-------- ..._empty_endpoints_list_renders_header_only.snap | 2 +- ...__endpoints_list_with_pagination_snapshot.snap | 6 +++--- 5 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 36c0dc3..03f57a6 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,7 @@ # Logs *.log +docs/agents/ + +# Local Claude notes (gitignored per-repo configuration) +CLAUDE.local.md diff --git a/src/commands/endpoint/render.rs b/src/commands/endpoint/render.rs index ed0b76d..e001e0c 100644 --- a/src/commands/endpoint/render.rs +++ b/src/commands/endpoint/render.rs @@ -13,7 +13,7 @@ use quicknode_sdk::admin::{ }; use serde::Serialize; -use crate::output::{new_table, opt_cell, set_header_bold, write_table, Render}; +use crate::output::{bool_cell, new_table, opt_cell, set_header_bold, write_table, Render}; #[derive(Serialize)] pub struct EndpointsView(pub GetEndpointsResponse); @@ -51,11 +51,10 @@ impl Render for EndpointsView { "LABEL", "STATUS", "CHAIN/NETWORK", - "TYPE", - "MULTI", + "MULTICHAIN", ]; if ctx.wide { - headers.extend(["HTTP", "WSS"]); + headers.extend(["HTTP", "WSS", "DEDICATED"]); } set_header_bold(&mut t, ctx, headers); for e in &self.0.data { @@ -65,16 +64,12 @@ impl Render for EndpointsView { opt_cell(&e.label), Cell::new(&e.status), Cell::new(format!("{}/{}", e.chain, e.network)), - Cell::new(if e.is_dedicated { - "dedicated" - } else { - "shared" - }), - Cell::new(if e.is_multichain { "yes" } else { "no" }), + bool_cell(Some(e.is_multichain)), ]; if ctx.wide { row.push(Cell::new(&e.http_url)); row.push(opt_cell(&e.wss_url)); + row.push(bool_cell(Some(e.is_dedicated))); } t.add_row(row); } diff --git a/tests/output_snapshots.rs b/tests/output_snapshots.rs index d2d4709..dd4f2f7 100644 --- a/tests/output_snapshots.rs +++ b/tests/output_snapshots.rs @@ -28,12 +28,12 @@ struct EndpointsView(GetEndpointsResponse); impl Render for EndpointsView { fn render_table(&self, w: &mut dyn std::io::Write, ctx: &OutputCtx) -> std::io::Result<()> { use comfy_table::Cell; - use qn::output::{new_table, opt_cell, set_header_bold, write_table}; + use qn::output::{bool_cell, new_table, opt_cell, set_header_bold, write_table}; let mut t = new_table(ctx); set_header_bold( &mut t, ctx, - vec!["ID", "LABEL", "STATUS", "CHAIN/NETWORK", "TYPE", "MULTI"], + vec!["ID", "LABEL", "STATUS", "CHAIN/NETWORK", "MULTICHAIN"], ); for e in &self.0.data { t.add_row(vec![ @@ -41,12 +41,7 @@ impl Render for EndpointsView { opt_cell(&e.label), Cell::new(&e.status), Cell::new(format!("{}/{}", e.chain, e.network)), - Cell::new(if e.is_dedicated { - "dedicated" - } else { - "shared" - }), - Cell::new(if e.is_multichain { "yes" } else { "no" }), + bool_cell(Some(e.is_multichain)), ]); } write_table(w, &t)?; diff --git a/tests/snapshots/output_snapshots__empty_endpoints_list_renders_header_only.snap b/tests/snapshots/output_snapshots__empty_endpoints_list_renders_header_only.snap index 26b9f0e..dd6753f 100644 --- a/tests/snapshots/output_snapshots__empty_endpoints_list_renders_header_only.snap +++ b/tests/snapshots/output_snapshots__empty_endpoints_list_renders_header_only.snap @@ -2,4 +2,4 @@ source: tests/output_snapshots.rs expression: out --- -ID LABEL STATUS CHAIN/NETWORK TYPE MULTI +ID LABEL STATUS CHAIN/NETWORK MULTICHAIN diff --git a/tests/snapshots/output_snapshots__endpoints_list_with_pagination_snapshot.snap b/tests/snapshots/output_snapshots__endpoints_list_with_pagination_snapshot.snap index 9ab9926..0b65360 100644 --- a/tests/snapshots/output_snapshots__endpoints_list_with_pagination_snapshot.snap +++ b/tests/snapshots/output_snapshots__endpoints_list_with_pagination_snapshot.snap @@ -2,7 +2,7 @@ source: tests/output_snapshots.rs expression: out --- -ID LABEL STATUS CHAIN/NETWORK TYPE MULTI -ep-1 production active ethereum/mainnet shared yes -ep-2 — paused solana/mainnet dedicated no +ID LABEL STATUS CHAIN/NETWORK MULTICHAIN +ep-1 production active ethereum/mainnet ✓ +ep-2 — paused solana/mainnet ✗ showing 1–2 of 2