diff --git a/.Jules/palette.md b/.Jules/palette.md index 575c8ef..f1823ff 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -17,6 +17,10 @@ ## 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 - [Realistic Mock Data for CLI Clarity] +**Learning:** In terminal-based demos, using `random.choices` for small mock data sets can lead to duplicate entries, which can confuse users or make the summary tables look broken. +**Action:** Use `random.sample` instead of `random.choices` when generating mock data for tutorial scripts to ensure uniqueness and maintain a professional appearance in terminal output. ## 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 df95831..439e49b 100644 --- a/01_getting_started.py +++ b/01_getting_started.py @@ -15,6 +15,8 @@ def get_customer_ids() -> list[str]: """Fetch customer IDs from a database or API.""" # Use sorted and zero-padded IDs for better terminal alignment + # Using random.sample ensures unique IDs for a more realistic demo + ids = [f"customer-{n:02d}" for n in random.sample(range(100), k=5)] # Use random.sample to ensure unique customer IDs in the demo ids = [f"customer-{n:02d}" for n in random.sample(range(100), k=5)] # Add a brief pause to make the fetching state visible in the UI diff --git a/02_logging.py b/02_logging.py index 4c7539f..83fb2c9 100644 --- a/02_logging.py +++ b/02_logging.py @@ -16,6 +16,8 @@ def get_customer_ids() -> list[str]: """Fetch customer IDs from a database or API.""" # Use sorted and zero-padded IDs for better terminal alignment + # Using random.sample ensures unique IDs for a more realistic demo + ids = [f"customer-{n:02d}" for n in random.sample(range(100), k=5)] # Use random.sample to ensure unique customer IDs in the demo ids = [f"customer-{n:02d}" for n in random.sample(range(100), k=5)] # Add a brief pause to make the fetching state visible in the UI