Skip to content

feat: chatsdk card node#334

Merged
Tecvan-fe merged 2 commits into
mainfrom
release/20260326-7d4161
Mar 26, 2026
Merged

feat: chatsdk card node#334
Tecvan-fe merged 2 commits into
mainfrom
release/20260326-7d4161

Conversation

@tomasyu985

@tomasyu985 tomasyu985 commented Mar 26, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Q&A nodes in the taro version now display correctly.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


yangyu.1 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Mar 26, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR documents a bug fix for the Taro version of chatsdk not outputting Q&A nodes, bumps the package version to 0.1.11-alpha.7d4161, and standardizes the ChatflowNodeData interface by converting PascalCase property names (Title, Options) to camelCase (title, options).

Changes

Cohort / File(s) Summary
Changeset Documentation
common/changes/@coze/chat-sdk/fix-chatsdk_card_2026-03-26-06-47.json
Added changelog entry documenting a bug fix for Taro chatsdk not outputting Q&A nodes.
Version Update
packages/chat-sdk/package.json
Updated package version from 0.1.11-beta.19 to 0.1.11-alpha.7d4161.
Property Naming Standardization
packages/chat-sdk/src/libs/ui-kit/message/components/chatflow-node/index.tsx
Converted ChatflowNodeData interface properties from PascalCase to camelCase: Titletitle, Optionsoptions. Updated SwitchNode component to reference new property names.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • DingGao-Devin
  • jackshen310

Poem

🐰 A hop, a skip, the SDK's renewed,
With camelCase grace, the naming's improved,
Q&A nodes now answer the call,
This Taro fix makes chatflow all!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: chatsdk card node' is directly related to the main change—updating Q&A/card node rendering in the chat SDK by changing field naming from PascalCase to camelCase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 release/20260326-7d4161

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/chat-sdk/src/libs/ui-kit/message/components/chatflow-node/index.tsx (1)

108-114: ⚠️ Potential issue | 🟡 Minor

Inconsistent disabled state check.

Line 109 checks disabled (prop) but line 93 defines realDisabled = disabled || hasSend. After the first click, hasSend becomes true, but subsequent clicks only check disabled, allowing the handler logic to proceed (though setHasSend(true) is idempotent).

For consistency with the InputNode component (line 71) and the visual disabled state, use realDisabled:

Proposed fix
           onClick={() => {
-              if (disabled) {
+              if (realDisabled) {
                 return;
               }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/chat-sdk/src/libs/ui-kit/message/components/chatflow-node/index.tsx`
around lines 108 - 114, The onClick handler currently checks the prop disabled
but should use the computed realDisabled (defined earlier as disabled ||
hasSend) for consistency with InputNode and the visual state; update the onClick
first-line guard to if (realDisabled) return; so that setHasSend and
sendTextMessage(item.name) are skipped when either disabled prop or hasSend is
true, referencing the onClick handler, realDisabled, setHasSend, and
sendTextMessage symbols.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@packages/chat-sdk/src/libs/ui-kit/message/components/chatflow-node/index.tsx`:
- Around line 108-114: The onClick handler currently checks the prop disabled
but should use the computed realDisabled (defined earlier as disabled ||
hasSend) for consistency with InputNode and the visual state; update the onClick
first-line guard to if (realDisabled) return; so that setHasSend and
sendTextMessage(item.name) are skipped when either disabled prop or hasSend is
true, referencing the onClick handler, realDisabled, setHasSend, and
sendTextMessage symbols.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 722570d3-a2f6-4959-a177-ac8b408c7283

📥 Commits

Reviewing files that changed from the base of the PR and between cabc1ec and 34fd0e0.

📒 Files selected for processing (3)
  • common/changes/@coze/chat-sdk/fix-chatsdk_card_2026-03-26-06-47.json
  • packages/chat-sdk/package.json
  • packages/chat-sdk/src/libs/ui-kit/message/components/chatflow-node/index.tsx

@Tecvan-fe Tecvan-fe merged commit 0037049 into main Mar 26, 2026
6 of 7 checks passed
@Tecvan-fe Tecvan-fe deleted the release/20260326-7d4161 branch March 26, 2026 07:14
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.

3 participants