Skip to content

Commit c97a917

Browse files
committed
style: improve UI layout and add descriptive annotations to components
Refactored layout styles for desktop and mobile views, including flexbox adjustments, spacing, and responsive behavior. Enhanced ExplanationPanel with detailed step descriptions. Added reliability features and "what it does" explanations to flow components. Updated DAG visualization and event stream sections for better usability and clarity.
1 parent 26238c3 commit c97a917

File tree

3 files changed

+310
-103
lines changed

3 files changed

+310
-103
lines changed

apps/demo/src/lib/components/DAGVisualization.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@
314314
outline-offset: 2px !important;
315315
box-shadow: 0 0 20px rgba(88, 166, 255, 0.4) !important;
316316
cursor: pointer !important;
317+
opacity: 1 !important; /* Ensure selected nodes are never dimmed */
317318
}
318319
319320
@keyframes pulse {

apps/demo/src/lib/components/ExplanationPanel.svelte

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@
4545
displayName: 'Article Processing Flow',
4646
description:
4747
'This flow processes web articles by fetching content, generating summaries and keywords, then publishing the results.',
48+
whatItDoes:
49+
'Demonstrates parallel execution, automatic retries, and dependency management—all core pgflow features.',
50+
reliabilityFeatures: [
51+
{
52+
setting: 'maxAttempts: 3',
53+
explanation: 'Automatically retries failed steps up to 3 times before giving up'
54+
},
55+
{
56+
setting: 'timeout: 60',
57+
explanation: 'Tasks become visible for retry after 60 seconds if worker crashes'
58+
}
59+
],
4860
inputType: `{
4961
url: string
5062
}`,
@@ -57,6 +69,7 @@
5769
{
5870
name: string;
5971
displayName: string;
72+
whatItDoes: string;
6073
dependsOn: string[];
6174
dependents: string[];
6275
inputType: string;
@@ -66,6 +79,7 @@
6679
fetch_article: {
6780
name: 'fetch_article',
6881
displayName: 'Fetch Article',
82+
whatItDoes: 'Fetches article content from the provided URL using r.jina.ai. Returns both the article text and title for downstream processing.',
6983
dependsOn: [],
7084
dependents: ['summarize', 'extract_keywords'],
7185
inputType: `{
@@ -81,6 +95,7 @@
8195
summarize: {
8296
name: 'summarize',
8397
displayName: 'Summarize',
98+
whatItDoes: 'Uses an LLM (Groq) to generate a concise summary of the article content. Runs in parallel with keyword extraction for efficiency.',
8499
dependsOn: ['fetch_article'],
85100
dependents: ['publish'],
86101
inputType: `{
@@ -94,6 +109,7 @@
94109
extract_keywords: {
95110
name: 'extract_keywords',
96111
displayName: 'Extract Keywords',
112+
whatItDoes: 'Uses an LLM (Groq) to extract key terms and topics from the article. Runs in parallel with summarization for efficiency.',
97113
dependsOn: ['fetch_article'],
98114
dependents: ['publish'],
99115
inputType: `{
@@ -106,6 +122,7 @@
106122
publish: {
107123
name: 'publish',
108124
displayName: 'Publish',
125+
whatItDoes: 'Combines the summary and keywords and publishes the processed article. In this demo, generates a mock article ID—in production, this would save to a database.',
109126
dependsOn: ['summarize', 'extract_keywords'],
110127
dependents: [],
111128
inputType: `{
@@ -254,6 +271,13 @@
254271
</CardHeader>
255272
<CardContent class="explanation-content text-sm pb-4 space-y-3">
256273
{#if currentStepInfo}
274+
<!-- What it does (full-width, top) -->
275+
<div class="bg-accent/30 rounded-lg p-3 border border-accent">
276+
<p class="text-foreground leading-relaxed">
277+
{currentStepInfo.whatItDoes}
278+
</p>
279+
</div>
280+
257281
<!-- Step-level view: 2-column layout: Dependencies | Inputs/Returns -->
258282
<div class="grid grid-cols-2 gap-4">
259283
<!-- Left Column: Dependencies -->
@@ -333,10 +357,25 @@
333357
{:else}
334358
<!-- Flow-level view -->
335359
<div class="space-y-3">
336-
<!-- Description -->
360+
<!-- What it does (highlighted) -->
361+
<div class="bg-accent/30 rounded-lg p-3 border border-accent">
362+
<p class="text-foreground leading-relaxed mb-2">{flowInfo.description}</p>
363+
<p class="text-muted-foreground text-sm">{flowInfo.whatItDoes}</p>
364+
</div>
365+
366+
<!-- Reliability Features -->
337367
<div>
338-
<div class="font-semibold text-muted-foreground mb-1.5 text-sm">Description</div>
339-
<p class="text-foreground leading-relaxed">{flowInfo.description}</p>
368+
<div class="font-semibold text-muted-foreground mb-1.5 text-sm flex items-center gap-2">
369+
<span>🛡️</span> Reliability Configuration
370+
</div>
371+
<div class="space-y-2">
372+
{#each flowInfo.reliabilityFeatures as feature}
373+
<div class="bg-secondary/50 rounded p-2.5">
374+
<code class="text-xs font-mono text-primary">{feature.setting}</code>
375+
<p class="text-xs text-muted-foreground mt-1">{feature.explanation}</p>
376+
</div>
377+
{/each}
378+
</div>
340379
</div>
341380

342381
<!-- Flow Input -->

0 commit comments

Comments
 (0)