diff --git a/.Jules/palette.md b/.Jules/palette.md index 74d0394..75953c9 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -17,3 +17,6 @@ ## 2026-04-01 - [CLI Onboarding & Information Density] **Learning:** For terminal-based workflow scaffolds, rendering the flow's docstring as a 'Prefect Workflow Guide' using `rich.Markdown` inside a `rich.Panel` provides immediate, high-quality context to the user. Additionally, adding footers to summary tables (e.g., total items processed) improves information density and allows users to verify outcomes at a glance. **Action:** Incorporate a Markdown-rendered welcome panel at the start of main entry points and include summary footers in result tables to enhance clarity and professional feel. +## 2026-04-02 - [Execution Feedback & Visual Hierarchy] +**Learning:** For CLI-based onboarding, providing immediate feedback on execution duration via `time.perf_counter()` and using titled `rich.Rule` components significantly improves the professional feel and clarity of the workflow completion state. +**Action:** Incorporate high-resolution execution timing in final result panels and add descriptive titles to terminal rules to better guide users through multi-step onboarding processes. diff --git a/01_getting_started.py b/01_getting_started.py index 8f31d36..a9bcdce 100644 --- a/01_getting_started.py +++ b/01_getting_started.py @@ -34,6 +34,7 @@ def main(): This flow demonstrates how to map a task over a list of inputs. It fetches a list of customer IDs and processes each one individually. """ + start_time = time.perf_counter() # Display the flow's purpose for a guided onboarding experience if main.__doc__: console.print( @@ -60,7 +61,10 @@ def main(): # Explicitly wait for results to avoid AttributeErrors on futures results = [f.result() for f in futures] + duration = time.perf_counter() - start_time + # Display results in a clean table for better readability + console.print() table = Table( title="Processing Summary", show_header=True, @@ -81,13 +85,13 @@ def main(): console.print( Panel.fit( - f"[bold green]✨ Successfully processed {len(results)} customers![/bold green]", + f"[bold green]✨ Successfully processed {len(results)} customers in {duration:.2f}s![/bold green]", title="Result", border_style="green", ) ) - console.print(Rule(style="blue")) + console.print(Rule("Next Step", style="blue")) console.print( "[bold blue]➡️ Next Step:[/bold blue] Try running [cyan]python 02_logging.py[/cyan] to learn about logging in Prefect!" ) diff --git a/02_logging.py b/02_logging.py index 3d14d66..f5e6ab6 100644 --- a/02_logging.py +++ b/02_logging.py @@ -43,6 +43,7 @@ def main(): - Use the Prefect logger for structured logging in tasks. - Map tasks across a list of inputs. """ + start_time = time.perf_counter() # Display the flow's purpose for a guided onboarding experience if main.__doc__: console.print( @@ -69,7 +70,10 @@ def main(): # Explicitly wait for results to avoid AttributeErrors on futures results = [f.result() for f in futures] + duration = time.perf_counter() - start_time + # Display results in a clean table for better readability + console.print() table = Table( title="Processing Summary", show_header=True, @@ -90,13 +94,13 @@ def main(): console.print( Panel.fit( - f"[bold green]✨ Successfully processed {len(results)} customers with detailed logging![/bold green]", + f"[bold green]✨ Successfully processed {len(results)} customers with detailed logging in {duration:.2f}s![/bold green]", title="Result", border_style="green", ) ) - console.print(Rule(style="blue")) + console.print(Rule("Finishing Up", style="blue")) console.print( "[bold blue]🎉 You've completed the Quickstart! Check out the [cyan]README.md[/cyan] for more features.[/bold blue]" )