Skip to content

siwa updates and new article #7197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025
Merged

siwa updates and new article #7197

merged 1 commit into from
May 30, 2025

Conversation

Yash094
Copy link
Member

@Yash094 Yash094 commented May 29, 2025


PR-Codex overview

This PR focuses on enhancing the chat functionality and knowledge base in the application. It introduces new features for sending feedback on chat messages and adds a new troubleshooting section for ERC20 token transfers.

Detailed summary

  • Added a new link to the /chat page in page.tsx.
  • Replaced BotIcon with MessageCircleIcon in Header.tsx.
  • Implemented sendFeedback function in api.ts for chat feedback.
  • Added feedback buttons (thumbs up/down) in chat.tsx.
  • Created a new troubleshooting entry for "Transfer Amount Exceeds Allowance" in erc20-transfer-allowance/page.mdx.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • New Features
    • Introduced feedback buttons (thumbs up/down) for assistant messages in the AI chat, allowing users to rate responses.
    • Added a new "Ask AI" button on the main page, providing quick access to the chat assistant.
    • Added a new knowledge base article explaining the "ERC20: transfer amount exceeds allowance" error and its resolution.
  • Improvements
    • Enhanced chat message payloads with source identifiers for better context.
    • Updated sidebar navigation with a new troubleshooting entry for ERC20 transfer allowance issues.
    • Updated chat and header icons to use a consistent message circle icon for AI-related features.

@Yash094 Yash094 requested review from a team as code owners May 29, 2025 12:21
Copy link

changeset-bot bot commented May 29, 2025

⚠️ No Changeset found

Latest commit: 0639d0d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented May 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2025 8:06am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2025 8:06am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
login ⬜️ Skipped (Inspect) May 30, 2025 8:06am
thirdweb_playground ⬜️ Skipped (Inspect) May 30, 2025 8:06am
wallet-ui ⬜️ Skipped (Inspect) May 30, 2025 8:06am

Copy link
Contributor

graphite-app bot commented May 29, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link
Contributor

coderabbitai bot commented May 29, 2025

Walkthrough

This update introduces a new feedback feature for the AI chat in the portal, allowing users to rate assistant responses with thumbs up or down. The chat API payloads in both dashboard and portal apps now include a source identifier. Additionally, a new knowledge base article and sidebar entry about ERC20 transfer allowance errors are added, and a button to access the AI assistant is placed on the portal home page. The chat-related icons were also updated from BotIcon to MessageCircleIcon.

Changes

File(s) Change Summary
apps/dashboard/src/app/nebula-app/(app)/components/CustomChat/CustomChatContent.tsx Added source: "dashboard-support" to chat API payload in handleSendMessage.
apps/portal/src/components/AI/api.ts Added source: "portal" to chat API payload; introduced new sendFeedback function for chat feedback.
apps/portal/src/components/AI/chat.tsx Added feedback UI and logic for assistant messages; updated message interface; replaced empty chat icon.
apps/portal/src/app/knowledge-base/sidebar.tsx Added "Transfer Amount Exceeds Allowance" entry to Contracts troubleshooting section.
apps/portal/src/app/knowledge-base/troubleshoot/contracts/erc20-transfer-allowance/page.mdx New documentation page explaining ERC20 transfer allowance errors and resolution steps.
apps/portal/src/app/page.tsx Added "Ask AI" button linking to /chat on the portal home page.
apps/portal/src/app/Header.tsx Replaced BotIcon with MessageCircleIcon for chat navigation buttons in the header.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant PortalUI
    participant ChatAPI

    User->>PortalUI: Clicks "Ask AI" button
    PortalUI->>PortalUI: Navigate to /chat

    User->>PortalUI: Sends chat message
    PortalUI->>ChatAPI: POST /v1/chat { message, sessionId, source: "portal" }
    ChatAPI-->>PortalUI: Returns assistant response and conversationId
    PortalUI-->>User: Displays assistant response

    User->>PortalUI: Clicks thumbs up/down on assistant message
    PortalUI->>ChatAPI: POST /v1/chat/feedback { conversationId, feedbackRating }
    ChatAPI-->>PortalUI: Acknowledges feedback
    PortalUI-->>User: Updates message feedback UI
Loading

Possibly related PRs

  • [Dashboard] siwa chat widget #7128: Refactors and enhances the dashboard chat widget, including changes to CustomChatContent and chat message handling, closely related to the addition of the source property in this PR.

Suggested reviewers

  • joaquim-verges

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added Dashboard Involves changes to the Dashboard. Portal Involves changes to the Portal (docs) codebase. labels May 29, 2025
@Yash094 Yash094 requested a review from joaquim-verges May 29, 2025 12:21
Copy link

codecov bot commented May 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.62%. Comparing base (4fed9f4) to head (0639d0d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7197   +/-   ##
=======================================
  Coverage   55.62%   55.62%           
=======================================
  Files         908      908           
  Lines       58570    58570           
  Branches     4133     4133           
=======================================
  Hits        32577    32577           
  Misses      25886    25886           
  Partials      107      107           
Flag Coverage Δ
packages 55.62% <ø> (ø)
🚀 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.

Copy link
Contributor

github-actions bot commented May 29, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 62.15 KB (0%) 1.3 s (0%) 3 s (+6.17% 🔺) 4.3 s
thirdweb (cjs) 344.84 KB (0%) 6.9 s (0%) 21.6 s (+1.42% 🔺) 28.5 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 161 ms (-21.38% 🔽) 275 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 62 ms (-31.46% 🔽) 73 ms
thirdweb/react (minimal + tree-shaking) 19.52 KB (0%) 391 ms (0%) 352 ms (-15.54% 🔽) 742 ms

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
apps/portal/src/app/knowledge-base/troubleshoot/contracts/erc20-transfer-allowance/page.mdx (1)

5-5: Consider using "number of tokens" for better grammar.

The phrase "amount of tokens" should be "number of tokens" since tokens are countable items. This improves the grammatical correctness of the documentation.

-The "ERC20: transfer amount exceeds allowance" error occurs when trying to transfer ERC20 tokens beyond the allowed limit set by the token owner. ERC20 tokens use an allowance system that grants specific addresses permission to transfer a certain amount of tokens on behalf of the owner.
+The "ERC20: transfer amount exceeds allowance" error occurs when trying to transfer ERC20 tokens beyond the allowed limit set by the token owner. ERC20 tokens use an allowance system that grants specific addresses permission to transfer a certain number of tokens on behalf of the owner.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~5-~5: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...resses permission to transfer a certain amount of tokens on behalf of the owner. ## H...

(AMOUNTOF_TO_NUMBEROF)

apps/portal/src/components/AI/chat.tsx (2)

162-175: Fix unused variable in catch block.

The feedback function is well-implemented, but the unused variable in the catch block should be prefixed with an underscore to indicate it's intentionally unused.

-    } catch (e) {
+    } catch (_e) {
       // Optionally handle error
     }
🧰 Tools
🪛 Biome (1.9.4)

[error] 172-172: This variable is unused.

Unused variables usually are result of incomplete refactoring, typos and other source of bugs.
Unsafe fix: If this is intentional, prepend e with an underscore.

(lint/correctness/noUnusedVariables)


213-234: Fix accessibility and code quality issues in feedback UI.

The feedback UI implementation is good, but needs some improvements for accessibility and code consistency.

                       {!message.feedback && (
                         <>
                           <button
+                            type="button"
                             aria-label="Thumbs up"
-                            className="hover:text-green-500 transition-colors text-muted-foreground"
+                            className="text-muted-foreground transition-colors hover:text-green-500"
                             onClick={() => handleFeedback(message.id, 1)}
                           >
                             <ThumbsUpIcon className="size-5" />
                           </button>
                           <button
+                            type="button"
                             aria-label="Thumbs down"
-                            className="hover:text-red-500 transition-colors text-muted-foreground"
+                            className="text-muted-foreground transition-colors hover:text-red-500"
                             onClick={() => handleFeedback(message.id, -1)}
                           >
                             <ThumbsDownIcon className="size-5" />
                           </button>
                         </>
                       )}
-                     <div className="flex gap-2 mt-2">
+                     <div className="mt-2 flex gap-2">

Changes:

  1. Added type="button" to prevent form submission
  2. Sorted CSS classes for consistency
  3. Fixed CSS class order in the container div
🧰 Tools
🪛 Biome (1.9.4)

[error] 214-214: These CSS classes should be sorted.

Unsafe fix: Sort the classes.

(lint/nursery/useSortedClasses)


[error] 219-219: These CSS classes should be sorted.

Unsafe fix: Sort the classes.

(lint/nursery/useSortedClasses)


[error] 226-226: These CSS classes should be sorted.

Unsafe fix: Sort the classes.

(lint/nursery/useSortedClasses)


[error] 217-221: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)


[error] 224-228: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 16482cf and f83b27f.

⛔ Files ignored due to path filters (1)
  • apps/portal/src/icons/siwa-icon.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • apps/dashboard/src/app/nebula-app/(app)/components/CustomChat/CustomChatContent.tsx (1 hunks)
  • apps/portal/src/app/knowledge-base/sidebar.tsx (1 hunks)
  • apps/portal/src/app/knowledge-base/troubleshoot/contracts/erc20-transfer-allowance/page.mdx (1 hunks)
  • apps/portal/src/app/page.tsx (3 hunks)
  • apps/portal/src/components/AI/api.ts (2 hunks)
  • apps/portal/src/components/AI/chat.tsx (6 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/portal/src/components/AI/chat.tsx (1)
apps/portal/src/components/AI/api.ts (1)
  • sendFeedback (46-74)
🪛 LanguageTool
apps/portal/src/app/knowledge-base/troubleshoot/contracts/erc20-transfer-allowance/page.mdx

[uncategorized] ~5-~5: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...resses permission to transfer a certain amount of tokens on behalf of the owner. ## H...

(AMOUNTOF_TO_NUMBEROF)


[grammar] ~10-~10: The word ‘approve’ is not a noun. Did you mean “approval”?
Context: ...oo low, the token owner should call the approve function to increase it. 3. Transfer to...

(PREPOSITION_VERB)

🪛 Biome (1.9.4)
apps/portal/src/components/AI/chat.tsx

[error] 172-172: This variable is unused.

Unused variables usually are result of incomplete refactoring, typos and other source of bugs.
Unsafe fix: If this is intentional, prepend e with an underscore.

(lint/correctness/noUnusedVariables)


[error] 214-214: These CSS classes should be sorted.

Unsafe fix: Sort the classes.

(lint/nursery/useSortedClasses)


[error] 219-219: These CSS classes should be sorted.

Unsafe fix: Sort the classes.

(lint/nursery/useSortedClasses)


[error] 226-226: These CSS classes should be sorted.

Unsafe fix: Sort the classes.

(lint/nursery/useSortedClasses)


[error] 217-221: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)


[error] 224-228: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Size
🔇 Additional comments (10)
apps/portal/src/components/AI/api.ts (2)

14-14: LGTM: Source identifier added for analytics/tracking.

The addition of the source: "portal" field helps identify the origin of chat requests, which aligns with the similar change in the dashboard app.


46-74: Well-implemented feedback function with proper error handling.

The sendFeedback function is well-structured with:

  • Clear TypeScript typing using union type for feedbackRating: 1 | -1
  • Consistent HTTP request pattern matching getChatResponse
  • Proper error handling with try-catch and logging
  • Boolean return type for success/failure indication

The implementation follows good practices and maintains consistency with the existing codebase.

apps/dashboard/src/app/nebula-app/(app)/components/CustomChat/CustomChatContent.tsx (1)

105-105: LGTM: Source identifier added for request tracking.

The addition of source: "dashboard-support" provides proper request origin identification, consistent with the portal implementation. This change enhances analytics and debugging capabilities.

apps/portal/src/app/page.tsx (2)

18-19: LGTM: Proper imports for new UI components.

The imports for Button and MessageCircleIcon are correctly added to support the new AI assistant entry point.


46-51: Excellent UX enhancement with proper accessibility.

The AI assistant button provides:

  • Clear visual hierarchy with icon and descriptive text
  • Proper navigation using Next.js Link component
  • Good accessibility with meaningful button text
  • Consistent styling using the Button component

This creates an intuitive entry point for users to access the AI chat functionality.

apps/portal/src/app/knowledge-base/sidebar.tsx (1)

73-76: LGTM: Well-structured knowledge base entry addition.

The new sidebar entry for "Transfer Amount Exceeds Allowance" follows the established pattern with:

  • Descriptive title that clearly indicates the content
  • Proper href structure pointing to the troubleshooting documentation
  • Consistent formatting with other contract-related entries

This enhancement improves the discoverability of ERC20 troubleshooting resources.

apps/portal/src/app/knowledge-base/troubleshoot/contracts/erc20-transfer-allowance/page.mdx (1)

1-15: Well-structured and technically accurate documentation.

The documentation clearly explains the ERC20 allowance error and provides a logical three-step resolution process. The technical terminology is correct and the content will be helpful for users troubleshooting this common issue.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~5-~5: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...resses permission to transfer a certain amount of tokens on behalf of the owner. ## H...

(AMOUNTOF_TO_NUMBEROF)


[grammar] ~10-~10: The word ‘approve’ is not a noun. Did you mean “approval”?
Context: ...oo low, the token owner should call the approve function to increase it. 3. Transfer to...

(PREPOSITION_VERB)

apps/portal/src/components/AI/chat.tsx (3)

8-8: Good import additions for the feedback feature.

The new imports properly support the feedback functionality with thumbs up/down icons and the SIWA branding update.

Also applies to: 18-19


26-26: Well-designed feedback field addition.

The optional feedback field with explicit numeric values (1 | -1) provides clear typing and aligns with the API expectations.


136-147: Improved scroll behavior with proper cleanup.

The delayed scroll with timeout provides smoother UX, and the cleanup function properly prevents memory leaks. The "end" block positioning is more appropriate for chat messages.

🧰 Tools
🪛 Biome (1.9.4)

[error] 136-136: This hook specifies more dependencies than necessary: messages

This dependency can be removed from the list.

(lint/correctness/useExhaustiveDependencies)

@vercel vercel bot temporarily deployed to Preview – login May 29, 2025 12:59 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 29, 2025 12:59 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 29, 2025 12:59 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 29, 2025 12:59 Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/portal/src/components/AI/chat.tsx (1)

162-175: Consider improving error handling for feedback submission.

The feedback functionality is well implemented with proper state updates. However, silently catching all errors might make debugging harder in production.

Consider adding optional error logging or user notification:

  } catch (_e) {
-    // Optionally handle error
+    console.error("Failed to send feedback:", _e);
+    // Optionally show user notification that feedback failed
  }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f83b27f and ae98c67.

📒 Files selected for processing (4)
  • apps/portal/src/app/knowledge-base/sidebar.tsx (1 hunks)
  • apps/portal/src/app/page.tsx (2 hunks)
  • apps/portal/src/components/AI/api.ts (2 hunks)
  • apps/portal/src/components/AI/chat.tsx (6 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/portal/src/app/knowledge-base/sidebar.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/portal/src/app/page.tsx
  • apps/portal/src/components/AI/api.ts
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/portal/src/components/AI/chat.tsx (1)
apps/portal/src/components/AI/api.ts (1)
  • sendFeedback (46-72)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Size
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (6)
apps/portal/src/components/AI/chat.tsx (6)

7-7: LGTM: Icon import added.

The import of the custom SIWA icon is properly implemented.


9-9: LGTM: Feedback icon imports added.

The ThumbsUp and ThumbsDown icons are correctly imported for the feedback functionality.


19-19: LGTM: Feedback API import added.

The sendFeedback function is correctly imported from the API module.


26-26: LGTM: Message interface extended for feedback.

The optional feedback property correctly supports the rating values (1 for positive, -1 for negative).


41-41: LGTM: Icon replacement implemented correctly.

The change from BotIcon to the custom SIWA icon with proper img element and styling is well implemented.


207-237: LGTM: Feedback UI implementation is excellent.

The feedback button implementation is well thought out:

  • Only shows for assistant messages that aren't loading
  • Hides buttons after feedback is given
  • Proper accessibility labels
  • Good hover states with color transitions
  • Clean conditional rendering logic

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 29, 2025 13:20 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 29, 2025 13:20 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 29, 2025 13:20 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 29, 2025 13:20 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 29, 2025 13:59 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 29, 2025 13:59 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 29, 2025 13:59 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 29, 2025 13:59 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 30, 2025 07:04 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 30, 2025 07:44 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 30, 2025 07:44 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 30, 2025 07:44 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 30, 2025 07:44 Inactive
@Yash094 Yash094 added the merge-queue Adds the pull request to Graphite's merge queue. label May 30, 2025
Copy link
Contributor

graphite-app bot commented May 30, 2025

Merge activity

  • May 30, 7:56 AM UTC: @Yash094 we removed the merge queue label because we could not find a Graphite account associated with your GitHub profile.

You must have a Graphite account in order to use the merge queue. Create an account and try again using this link

@graphite-app graphite-app bot removed the merge-queue Adds the pull request to Graphite's merge queue. label May 30, 2025
@Yash094 Yash094 added the merge-queue Adds the pull request to Graphite's merge queue. label May 30, 2025
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the chat functionality within the application by adding a feedback system, updating icons, and improving the knowledge base content related to ERC20 token transfers.

### Detailed summary
- Added a new knowledge base entry for "Transfer Amount Exceeds Allowance".
- Updated `Header` and `Hero` components to replace `BotIcon` with `MessageCircleIcon`.
- Introduced `sendFeedback` function to handle user feedback on chat messages.
- Modified `Chat` component to include feedback buttons (thumbs up/down) for messages.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
	- Introduced feedback buttons (thumbs up/down) for assistant messages in the AI chat, allowing users to rate responses.
	- Added a new "Ask AI" button on the main page, providing quick access to the chat assistant.
	- Added a new knowledge base article explaining the "ERC20: transfer amount exceeds allowance" error and its resolution.
- **Improvements**
	- Enhanced chat message payloads with source identifiers for better context.
	- Updated sidebar navigation with a new troubleshooting entry for ERC20 transfer allowance issues.
	- Updated chat and header icons to use a consistent message circle icon for AI-related features.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the yash/siwa-updates branch from d9abfcb to 0639d0d Compare May 30, 2025 07:59
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 30, 2025 07:59 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 30, 2025 07:59 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 30, 2025 07:59 Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
apps/portal/src/app/knowledge-base/troubleshoot/contracts/erc20-transfer-allowance/page.mdx (3)

3-6: Clarify the allowance mechanism description

Consider rephrasing for clarity and consistency. For example:
“ERC20 tokens use an allowance system that grants an address permission to transfer up to a specified number of tokens on behalf of the owner.”

This refines “certain amount” to “up to a specified number,” aligning with common ERC20 terminology.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~5-~5: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...resses permission to transfer a certain amount of tokens on behalf of the owner. ## H...

(AMOUNTOF_TO_NUMBEROF)


7-12: Enhance the fix steps with links or code examples

The resolution steps are well-structured. You may want to add direct links or inline code examples for:

  1. Navigating to the allowance section in the thirdweb Dashboard.
  2. Calling the approve function (e.g., via web3 or ethers.js).
  3. Using transferFrom or transfer with a snippet.

This will help users follow the steps more easily.

🧰 Tools
🪛 LanguageTool

[grammar] ~10-~10: The word ‘approve’ is not a noun. Did you mean “approval”?
Context: ...oo low, the token owner should call the approve function to increase it. 3. Transfer to...

(PREPOSITION_VERB)


13-14: Emphasize the concluding guidance

The statement “Ensure the allowance covers the transfer amount before initiating.” is clear. Optionally, you can emphasize this with bold text or an alert callout to draw attention.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d9abfcb and 0639d0d.

⛔ Files ignored due to path filters (1)
  • apps/portal/src/icons/siwa-icon.png is excluded by !**/*.png
📒 Files selected for processing (7)
  • apps/dashboard/src/app/nebula-app/(app)/components/CustomChat/CustomChatContent.tsx (1 hunks)
  • apps/portal/src/app/Header.tsx (3 hunks)
  • apps/portal/src/app/knowledge-base/sidebar.tsx (1 hunks)
  • apps/portal/src/app/knowledge-base/troubleshoot/contracts/erc20-transfer-allowance/page.mdx (1 hunks)
  • apps/portal/src/app/page.tsx (2 hunks)
  • apps/portal/src/components/AI/api.ts (2 hunks)
  • apps/portal/src/components/AI/chat.tsx (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • apps/dashboard/src/app/nebula-app/(app)/components/CustomChat/CustomChatContent.tsx
  • apps/portal/src/app/Header.tsx
  • apps/portal/src/app/page.tsx
  • apps/portal/src/app/knowledge-base/sidebar.tsx
  • apps/portal/src/components/AI/chat.tsx
  • apps/portal/src/components/AI/api.ts
🧰 Additional context used
🪛 LanguageTool
apps/portal/src/app/knowledge-base/troubleshoot/contracts/erc20-transfer-allowance/page.mdx

[uncategorized] ~5-~5: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...resses permission to transfer a certain amount of tokens on behalf of the owner. ## H...

(AMOUNTOF_TO_NUMBEROF)


[grammar] ~10-~10: The word ‘approve’ is not a noun. Did you mean “approval”?
Context: ...oo low, the token owner should call the approve function to increase it. 3. Transfer to...

(PREPOSITION_VERB)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Build Packages
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
apps/portal/src/app/knowledge-base/troubleshoot/contracts/erc20-transfer-allowance/page.mdx (2)

1-2: Title is clear and concise

The page title accurately reflects the error and follows the existing naming conventions in the knowledge base. Great job!


15-15: Support link is appropriate

The support link is formatted correctly and directs users to the right resource. No changes needed here.

@graphite-app graphite-app bot merged commit 0639d0d into main May 30, 2025
24 checks passed
@graphite-app graphite-app bot deleted the yash/siwa-updates branch May 30, 2025 08:07
@graphite-app graphite-app bot removed the merge-queue Adds the pull request to Graphite's merge queue. label May 30, 2025
@vercel vercel bot temporarily deployed to Production – thirdweb_playground May 30, 2025 08:07 Inactive
@vercel vercel bot temporarily deployed to Production – login May 30, 2025 08:07 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui May 30, 2025 08:07 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard. Portal Involves changes to the Portal (docs) codebase.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants