From 693166186e0831a9a48755aa43dae1e9db5b7121 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 05:19:40 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Standardize=20CLI=20r?= =?UTF-8?q?esult=20feedback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Standardized the CLI result feedback across demo scripts to provide a more cohesive and professional user experience. Key improvements include: - **CLI Branding:** Applied consistent `bold blue` styling to result panels and summary tables. - **Visual Hierarchy:** Moved emojis to panel titles and added a success indicator to the table footer for better scanability. - **Observability:** Added `task_run_name` to fetching tasks to improve traceability in the Prefect dashboard. - **Clarity:** Set explicit title styles for summary tables to ensure high contrast and readability. Co-authored-by: ruh-al-tarikh <203426218+ruh-al-tarikh@users.noreply.github.com> --- .Jules/palette.md | 4 ++++ 01_getting_started.py | 13 +++++++------ 02_logging.py | 13 +++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.Jules/palette.md b/.Jules/palette.md index 14e2c33..d14c0c7 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -39,3 +39,7 @@ ## 2026-04-15 - [Prefect Traceability & Terminal Scanability] **Learning:** In orchestration-based scaffolds, providing human-readable names and dynamic run names (e.g., `process-{customer_id}`) for tasks significantly improves the observability and debugging experience in the dashboard. Highlighting key numeric metrics in the CLI using consistent secondary colors (like `bold cyan`) helps users quickly parse execution outcomes. **Action:** Always provide descriptive `name` parameters for flows and tasks, use variable interpolation in `task_run_name` for mapped tasks, and use consistent highlighting for numeric values in terminal output. + +## 2026-04-16 - [Cohesive Branding in CLI and Dashboards] +**Learning:** For tool-sets with both a CLI and a web-based dashboard (like Prefect), maintaining a consistent "brand" (e.g., specific color schemes like 'bold blue' and emoji usage) across both interfaces creates a more unified and professional user experience. Standardizing the "Result" panel and task naming conventions makes the entire system feel like a single, cohesive product. +**Action:** Apply consistent branding (colors, titles, emojis) to both terminal output and dashboard metadata to ensure a unified user experience across all interfaces. diff --git a/01_getting_started.py b/01_getting_started.py index efa2653..b4d9aff 100644 --- a/01_getting_started.py +++ b/01_getting_started.py @@ -11,7 +11,7 @@ console = Console() -@task(name="Fetch Customer Data") +@task(name="Fetch Customer Data", task_run_name="fetch-customer-data") def get_customer_ids() -> list[str]: """Fetch customer IDs from a database or API.""" # Use sorted and zero-padded IDs for better terminal alignment @@ -74,6 +74,7 @@ def main(): # Display results in a clean table for better readability table = Table( title="Processing Summary", + title_style="bold blue", show_header=True, header_style="bold blue", show_footer=True, @@ -83,8 +84,8 @@ def main(): table.add_column( "Status", style="green", - footer=f"{len(results)} Processed", - footer_style="bold", + footer=f"{len(results)} Processed ✅", + footer_style="bold blue", ) # Use zip to map results back to their original IDs more reliably @@ -96,9 +97,9 @@ def main(): console.print( Panel.fit( - f"[bold green]✨ Successfully processed [bold cyan]{len(results)}[/bold cyan] customers in [bold cyan]{duration:.2f}s[/bold cyan]![/bold green]", - title="Result", - border_style="green", + f"[bold green]Successfully processed [bold cyan]{len(results)}[/bold cyan] customers in [bold cyan]{duration:.2f}s[/bold cyan]![/bold green]", + title="✨ Result", + border_style="bold blue", ) ) diff --git a/02_logging.py b/02_logging.py index dd8b880..63ab2df 100644 --- a/02_logging.py +++ b/02_logging.py @@ -12,7 +12,7 @@ console = Console() -@task(name="Fetch Customer Data") +@task(name="Fetch Customer Data", task_run_name="fetch-customer-data") def get_customer_ids() -> list[str]: """Fetch customer IDs from a database or API.""" # Use sorted and zero-padded IDs for better terminal alignment @@ -83,6 +83,7 @@ def main(): # Display results in a clean table for better readability table = Table( title="Processing Summary", + title_style="bold blue", show_header=True, header_style="bold blue", show_footer=True, @@ -92,8 +93,8 @@ def main(): table.add_column( "Status", style="green", - footer=f"{len(results)} Processed", - footer_style="bold", + footer=f"{len(results)} Processed ✅", + footer_style="bold blue", ) # Use zip to map results back to their original IDs more reliably @@ -105,9 +106,9 @@ def main(): console.print( Panel.fit( - f"[bold green]✨ Successfully processed [bold cyan]{len(results)}[/bold cyan] customers with detailed logging in [bold cyan]{duration:.2f}s[/bold cyan]![/bold green]", - title="Result", - border_style="green", + f"[bold green]Successfully processed [bold cyan]{len(results)}[/bold cyan] customers with detailed logging in [bold cyan]{duration:.2f}s[/bold cyan]![/bold green]", + title="📊 Result", + border_style="bold blue", ) )