Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@
## 2026-04-04 - [Consistent Visual Hierarchy and Accessibility in CLI]
**Learning:** Using 'bold blue' for all structural components (Panels, Rules, and instructional text) creates a strong, consistent visual hierarchy and improves accessibility by ensuring sufficient contrast. Applying `footer_style="bold"` in `rich.table.Table` definitions instead of inline markup maintains cleaner code and consistent visual weight for summary data.
**Action:** Standardize on `bold blue` for CLI structural elements and use explicit `footer_style` properties in tables to ensure high-contrast, professional-grade terminal interfaces.

## 2026-04-05 - [Prefect UI Observability & Result Polish]
**Learning:** Enhancing the Prefect dashboard experience via explicit `name` and `task_run_name` (with variable interpolation) metadata significantly improves observability and creates a more professional developer experience. Additionally, standardizing result visual cues (like '✨' or 'πŸ“Š' prefixes and success emojis in table footers) provides consistent psychological closure for workflow execution.
**Action:** Use descriptive Prefect metadata for all flows and tasks, and ensure final terminal results use consistent iconography and high-contrast styling.
12 changes: 6 additions & 6 deletions 01_getting_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
console = Console()


@task
@task(name="Fetch Customer IDs")
def get_customer_ids() -> list[str]:
"""Fetch customer IDs from a database or API."""
# Use sorted and zero-padded IDs for better terminal alignment
Expand All @@ -20,15 +20,15 @@ def get_customer_ids() -> list[str]:
return sorted(ids)


@task
@task(name="Process Customer", task_run_name="Process {customer_id}")
def process_customer(customer_id: str) -> str:
"""Process a single customer."""
# Add a brief pause to make the processing state visible in the UI
time.sleep(0.1)
return f"Processed {customer_id}"


@flow(log_prints=True)
@flow(name="Getting Started Flow", log_prints=True)
def main():
"""
### πŸš€ Getting Started with Prefect
Expand Down Expand Up @@ -83,7 +83,7 @@ def main():
table.add_column(
"Status",
style="green",
footer=f"{len(results)} Processed",
footer=f"βœ… {len(results)} Processed",
footer_style="bold",
)

Expand All @@ -97,8 +97,8 @@ def main():
console.print(
Panel.fit(
f"[bold green]✨ Successfully processed {len(results)} customers in {duration:.2f}s![/bold green]",
title="Result",
border_style="green",
title="✨ Workflow Results",
border_style="bold blue",
)
)

Expand Down
12 changes: 6 additions & 6 deletions 02_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
console = Console()


@task
@task(name="Fetch Customer IDs")
def get_customer_ids() -> list[str]:
"""Fetch customer IDs from a database or API."""
# Use sorted and zero-padded IDs for better terminal alignment
Expand All @@ -21,7 +21,7 @@ def get_customer_ids() -> list[str]:
return sorted(ids)


@task
@task(name="Process Customer", task_run_name="Process {customer_id}")
def process_customer(customer_id: str) -> str:
"""Process a single customer."""
logger = get_run_logger()
Expand All @@ -32,7 +32,7 @@ def process_customer(customer_id: str) -> str:
return f"Processed {customer_id}"


@flow(log_prints=True)
@flow(name="Logging Demo Flow", log_prints=True)
def main():
"""
### πŸ“Š Logging with Prefect
Expand Down Expand Up @@ -92,7 +92,7 @@ def main():
table.add_column(
"Status",
style="green",
footer=f"{len(results)} Processed",
footer=f"βœ… {len(results)} Processed",
footer_style="bold",
)

Expand All @@ -106,8 +106,8 @@ def main():
console.print(
Panel.fit(
f"[bold green]✨ Successfully processed {len(results)} customers with detailed logging in {duration:.2f}s![/bold green]",
title="Result",
border_style="green",
title="πŸ“Š Workflow Results",
border_style="bold blue",
)
)

Expand Down
Loading