|
45 | 45 | displayName: 'Article Processing Flow', |
46 | 46 | description: |
47 | 47 | '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 | + ], |
48 | 60 | inputType: `{ |
49 | 61 | url: string |
50 | 62 | }`, |
|
57 | 69 | { |
58 | 70 | name: string; |
59 | 71 | displayName: string; |
| 72 | + whatItDoes: string; |
60 | 73 | dependsOn: string[]; |
61 | 74 | dependents: string[]; |
62 | 75 | inputType: string; |
|
66 | 79 | fetch_article: { |
67 | 80 | name: 'fetch_article', |
68 | 81 | 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.', |
69 | 83 | dependsOn: [], |
70 | 84 | dependents: ['summarize', 'extract_keywords'], |
71 | 85 | inputType: `{ |
|
81 | 95 | summarize: { |
82 | 96 | name: 'summarize', |
83 | 97 | 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.', |
84 | 99 | dependsOn: ['fetch_article'], |
85 | 100 | dependents: ['publish'], |
86 | 101 | inputType: `{ |
|
94 | 109 | extract_keywords: { |
95 | 110 | name: 'extract_keywords', |
96 | 111 | 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.', |
97 | 113 | dependsOn: ['fetch_article'], |
98 | 114 | dependents: ['publish'], |
99 | 115 | inputType: `{ |
|
106 | 122 | publish: { |
107 | 123 | name: 'publish', |
108 | 124 | 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.', |
109 | 126 | dependsOn: ['summarize', 'extract_keywords'], |
110 | 127 | dependents: [], |
111 | 128 | inputType: `{ |
|
254 | 271 | </CardHeader> |
255 | 272 | <CardContent class="explanation-content text-sm pb-4 space-y-3"> |
256 | 273 | {#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 | + |
257 | 281 | <!-- Step-level view: 2-column layout: Dependencies | Inputs/Returns --> |
258 | 282 | <div class="grid grid-cols-2 gap-4"> |
259 | 283 | <!-- Left Column: Dependencies --> |
|
333 | 357 | {:else} |
334 | 358 | <!-- Flow-level view --> |
335 | 359 | <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 --> |
337 | 367 | <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> |
340 | 379 | </div> |
341 | 380 |
|
342 | 381 | <!-- Flow Input --> |
|
0 commit comments