Skip to content

Fix: The begin operator of the agent created from the template does not display a pattern. - #18367

Merged
wangq8 merged 2 commits into
infiniflow:mainfrom
cike8899:fix-agent-saving
Aug 17, 2026
Merged

wangq8 merged 2 commits into
infiniflow:mainfrom
cike8899:fix-agent-saving

Conversation

@cike8899

Copy link
Copy Markdown
Contributor

Summary

Fix: The begin operator of the agent created from the template does not display a pattern.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 17, 2026
@cike8899
cike8899 requested a review from wangq8 August 17, 2026 07:22
@cike8899
cike8899 marked this pull request as draft August 17, 2026 07:22
@cike8899
cike8899 marked this pull request as ready for review August 17, 2026 07:22
@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d30aa4a3-4285-4c14-92c4-7cae567a0553

📥 Commits

Reviewing files that changed from the base of the PR and between 3e38b6c and 5f4e851.

📒 Files selected for processing (3)
  • agent/templates/deep_research.json
  • agent/templates/user_interaction.json
  • agent/templates/your_starter_dataset_chatbot.json

Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

Three workflow templates now enable conversational prologues on their Begin nodes. The deep research template also reformats metadata and preserves its avatar data.

Changes

Workflow template updates

Layer / File(s) Summary
Deep research metadata formatting
agent/templates/deep_research.json
The workflow metadata is reformatted. The canvas_types array remains Recommended and Agent. Existing avatar data is preserved.
Conversational Begin configuration
agent/templates/deep_research.json, agent/templates/user_interaction.json, agent/templates/your_starter_dataset_chatbot.json
Each Begin node now enables the prologue and uses conversational mode.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 5f4e8

This localized template update is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Poem

A rabbit checks the Begin node bright,
Prologue hops into conversational light.
Metadata lines stand neat and clear,
The avatar stays safely near.
Three templates now greet with cheer.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the fix for the begin operator in template-created agents.
Description check ✅ Passed The description includes the required Summary section and clearly states the issue that this PR fixes.

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.

@wangq8 wangq8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the fix. The begin node is rendered by web/src/pages/agent/canvas/node/begin-node.tsx, which reads the mode badge from data.form?.mode. When data.form is absent, mode is undefined and no pattern is displayed — which matches the reported bug.

Adding data.form: { enablePrologue: true, mode: "conversational" } to the begin node fixes it, and is consistent with the other templates (e.g. trip_planner.json, web_search_assistant.json). The payload is valid against BeginFormSchema (mode is required and provided; enablePrologue/prologue are optional).

Two minor nits (non-blocking):

  1. deep_research.json lost its trailing newline (\ No newline at end of file) and was reformatted alongside the fix — fine, but it makes the diff larger than necessary.
  2. enablePrologue: true is set without a prologue string, so useGetBeginNodePrologue will return undefined (no prologue message). Harmless, but consider either adding a prologue value or dropping enablePrologue for clarity.

@wangq8 wangq8 added the ci Continue Integration label Aug 17, 2026
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.65%. Comparing base (554fb11) to head (5f4e851).
⚠️ Report is 23 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18367      +/-   ##
==========================================
- Coverage   94.56%   90.65%   -3.91%     
==========================================
  Files          10       10              
  Lines         717      717              
  Branches      118      118              
==========================================
- Hits          678      650      -28     
- Misses         25       39      +14     
- Partials       14       28      +14     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wangq8
wangq8 merged commit e3d46ef into infiniflow:main Aug 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants