Skip to content

Refactor: better to use component display name - #20431

Merged
yuzhichang merged 3 commits into
infiniflow:mainfrom
wangq8:refactor/better-display-name
Sep 30, 2026
Merged

yuzhichang merged 3 commits into
infiniflow:mainfrom
wangq8:refactor/better-display-name

Conversation

@wangq8

@wangq8 wangq8 commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Before:
image
After:
image

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: d4e44dc5-adf7-4607-971f-b1ba95a8c9a8

📥 Commits

Reviewing files that changed from the base of the PR and between 6966329 and 19cde9b.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: bff05c5e-6403-494d-b955-0180c5ca86a0

📥 Commits

Reviewing files that changed from the base of the PR and between 8767071 and 6966329.

📒 Files selected for processing (9)
  • internal/agent/canvas/canvas.go
  • internal/agent/canvas/decode.go
  • internal/agent/canvas/decode_history_test.go
  • internal/agent/canvas/loop_subgraph.go
  • internal/agent/canvas/node_body.go
  • internal/agent/canvas/node_body_fraction_test.go
  • internal/agent/canvas/node_body_override_params_test.go
  • internal/agent/canvas/node_body_timeout_test.go
  • internal/agent/canvas/scheduler.go

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The canvas decoder now stores graph node display names as runtime metadata. Workflow construction passes those names to component invocation handling, which uses them in errors and falls back to the component ID when the name is blank.

Changes

Canvas display names

Layer / File(s) Summary
Decode graph node display names
internal/agent/canvas/canvas.go, internal/agent/canvas/decode.go, internal/agent/canvas/decode_history_test.go
CanvasComponent gains a non-serialized DisplayName. DecodeFromDSL populates it from nonblank graph node names. A test checks the decoded value.
Pass display names to invocation errors
internal/agent/canvas/node_body.go, internal/agent/canvas/scheduler.go, internal/agent/canvas/loop_subgraph.go, internal/agent/canvas/node_body_*_test.go
Workflow builders pass DisplayName into component-body construction. Invocation errors use the trimmed display name or fall back to the component ID. Tests cover the fallback and display-name cases.

Priority: ⬇️ Low

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

Change: Feature

Suggested reviewers: yuzhichang, harry-hz-zhang

Merge Risk: ⚪ Minimal · up to 69663

Invocation errors now show readable node names while retaining component IDs when names are blank. No actionable merge-blocking risk is identified; the change is mergeable subject to normal checks.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 69663

The new names affect component error messages, not component selection, permissions, or execution identity. No material security risk was found in the changed flow.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated reach of the new label is diagnostic text for component invocation failures in ordinary and loop workflows. The inspected propagation does not expand component execution or data-store authority.

Trust Boundaries and Controls

  • observed — Graph-authored names enter diagnostic strings but are not used to select factories, credentials, execution options, or database handles. The component invocation continues to receive the existing context, options, database handle, and input map.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 58.82% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description contains before-and-after images but does not include the required Summary section or written background and purpose. Add a "### Summary" section that briefly explains the change, including that decoded component display names are used in invocation errors while node paths continue to use component IDs.
✅ Passed checks (3 passed)
Check name Status Explanation
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 main change: using the component display name in errors. The wording is slightly awkward but remains specific and relevant.

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

A rabbit reads the node’s new name,
Then hops through graphs along the same.
If errors stir along the way,
The name appears, or IDs stay.
Soft paws test each path with care,
And leave neat traces everywhere.

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

@wangq8
wangq8 requested a review from yuzhichang September 30, 2026 03:55
@wangq8 wangq8 changed the title Refactor: better component display name Refactor: better to use component display name Sep 30, 2026
@wangq8 wangq8 added the ci Continue Integration label Sep 30, 2026
@yuzhichang
yuzhichang merged commit 69ff9a9 into infiniflow:main Sep 30, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants