Skip to content

fix: console flow#1439

Merged
sergiofilhowz merged 4 commits intomainfrom
fix/console-flow
Apr 8, 2026
Merged

fix: console flow#1439
sergiofilhowz merged 4 commits intomainfrom
fix/console-flow

Conversation

@sergiofilhowz
Copy link
Copy Markdown
Contributor

@sergiofilhowz sergiofilhowz commented Apr 8, 2026

  1. use-flow-state.ts -- Changed the NODE_TYPES key from "queue" to "durable:subscriber" so ReactFlow maps durable subscriber steps to QueueFlowNode instead of rendering default white boxes.

  2. flows.ts -- Normalized external trigger field names when building triggersByFunction. HTTP triggers now map api_path to path (with leading / restored) and http_method to method. Cron and event/durable:subscriber triggers also get their fields normalized (expression, topic).

  3. base-node.tsx -- Replaced the {children && ...} guard with Children.toArray(children).length > 0, which correctly filters out null/false children and avoids rendering an empty padded content box.

Summary by CodeRabbit

  • Improvements
    • More reliable flow trigger normalization so trigger configs (HTTP, cron, event/queue, subscriber) display consistently across engines.
    • Flow diagram rendering avoids empty child wrappers, improving layout stability and performance.
    • Broader node type recognition to accept additional type aliases (including API and durable subscriber variants).

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
iii-website Ready Ready Preview, Comment Apr 8, 2026 8:19pm
motia-docs Ready Ready Preview, Comment Apr 8, 2026 8:19pm

Request Review

andersonleal
andersonleal previously approved these changes Apr 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 62be0a56-a36e-4cd0-9d8a-974de87d43f6

📥 Commits

Reviewing files that changed from the base of the PR and between 2a3103a and 1ef328b.

📒 Files selected for processing (2)
  • console/packages/console-frontend/src/api/flows/flows.ts
  • console/packages/console-frontend/src/components/flow/use-flow-state.ts
✅ Files skipped from review due to trivial changes (1)
  • console/packages/console-frontend/src/api/flows/flows.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • console/packages/console-frontend/src/components/flow/use-flow-state.ts

📝 Walkthrough

Walkthrough

The PR normalizes trigger configs when building flows, adjusts child rendering to only render when children array length > 0, and extends node-type mappings with additional aliases (including api and durable:subscriber).

Changes

Cohort / File(s) Summary
Trigger Normalization
console/packages/console-frontend/src/api/flows/flows.ts
Builds triggersByFunction using a normalized trigger object that includes type and maps engine-specific keys to standard metadata: api_pathpath (ensuring leading /), http_methodmethod (fallback to existing), expressionexpression for cron, and topic for event/queue/durable:subscriber.
Node Rendering & Type Mapping
console/packages/console-frontend/src/components/flow/nodes/base-node.tsx, console/packages/console-frontend/src/components/flow/use-flow-state.ts
BaseNode now checks Children.toArray(children).length > 0 before rendering the children wrapper. NODE_TYPES gains aliases: adds apiApiFlowNode, quotes/clarifies queue, and adds 'durable:subscriber'QueueFlowNode.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through configs, neat and spry,
Mapping paths that once ran awry.
Children counted, nodes renamed with care—
A soft thump: flows tidy, running fair.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'fix: console flow' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes (trigger field normalization, node type mapping, children rendering logic). Use a more specific title that captures the main change, such as 'fix: normalize trigger config fields and add durable:subscriber node type support' or similar.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/console-flow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sergiofilhowz sergiofilhowz merged commit f39b82c into main Apr 8, 2026
26 checks passed
@sergiofilhowz sergiofilhowz deleted the fix/console-flow branch April 8, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants