Skip to content

chore: Enable telegram support channel, add join link button #7472

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arcoraven
Copy link
Contributor

@arcoraven arcoraven commented Jun 29, 2025

[Dashboard] Feature: Enable Telegram Support for Dedicated Support Channels

Screenshot after TG is added.

image.png

Notes for the reviewer

This PR enables Telegram as a fully supported channel type for dedicated support, removing the "Coming Soon" label. It also enhances the UI for displaying existing support channels by adding a "Join channel" button that links directly to the channel when available.

How to test

  1. Navigate to team settings
  2. Create a dedicated support channel using Telegram
  3. Verify that the channel is created successfully and the join link is displayed
  4. Test that the "Join channel" button opens the link in a new tab

AI/ML Systems

Summary by CodeRabbit

  • New Features

    • Added a direct "Join channel" button with an external link for dedicated support channels, allowing users to quickly access their support platform.
    • Enabled Telegram as a selectable and fully available platform for dedicated support channels.
    • Updated dropdown placeholder text to "Select platform" for improved clarity.
  • User Interface

    • Improved the display of dedicated support channel information with clearer styling and actionable links.

Copy link

vercel bot commented Jun 29, 2025

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

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 29, 2025 6:11pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Jun 29, 2025 6:11pm
nebula ⬜️ Skipped (Inspect) Jun 29, 2025 6:11pm
thirdweb_playground ⬜️ Skipped (Inspect) Jun 29, 2025 6:11pm
wallet-ui ⬜️ Skipped (Inspect) Jun 29, 2025 6:11pm

@vercel vercel bot temporarily deployed to Preview – wallet-ui June 29, 2025 18:03 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula June 29, 2025 18:03 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 29, 2025 18:03 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 29, 2025 18:03 Inactive
Copy link

changeset-bot bot commented Jun 29, 2025

⚠️ No Changeset found

Latest commit: 7bfb4bb

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
Contributor

coderabbitai bot commented Jun 29, 2025

Walkthrough

This update modifies the team settings UI to enhance the dedicated support channel card. It enables Telegram as a selectable platform, updates the dropdown placeholder, and adds a "Join channel" button with an external link if available. The TeamResponse type is extended to include an optional link property for the support channel.

Changes

File(s) Change Summary
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/settings-cards/dedicated-support.tsx UI update for the dedicated support card: enables Telegram, adds join link button, updates dropdown text.
packages/service-utils/src/core/api.ts Adds optional link property to dedicatedSupportChannel in TeamResponse type.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TeamSettingsUI
    participant API

    User->>TeamSettingsUI: View Team Settings
    TeamSettingsUI->>API: Fetch Team Data
    API-->>TeamSettingsUI: Return TeamResponse (with dedicatedSupportChannel.link)
    TeamSettingsUI->>User: Display support channel card
    alt dedicatedSupportChannel.link exists
        User->>TeamSettingsUI: Click "Join channel"
        TeamSettingsUI->>User: Open link in new tab
    end
Loading

Possibly related PRs

✨ 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.

@arcoraven arcoraven marked this pull request as ready for review June 29, 2025 18:03
@arcoraven arcoraven requested review from a team as code owners June 29, 2025 18:03
@github-actions github-actions bot added Dashboard Involves changes to the Dashboard. packages labels Jun 29, 2025
Copy link
Contributor Author

arcoraven commented Jun 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.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

codecov bot commented Jun 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.92%. Comparing base (fd67c5d) to head (7bfb4bb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7472   +/-   ##
=======================================
  Coverage   51.92%   51.92%           
=======================================
  Files         949      949           
  Lines       64149    64149           
  Branches     4228     4228           
=======================================
  Hits        33312    33312           
  Misses      30731    30731           
  Partials      106      106           
Flag Coverage Δ
packages 51.92% <ø> (ø)
🚀 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

@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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between fd67c5d and 7bfb4bb.

📒 Files selected for processing (2)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/settings-cards/dedicated-support.tsx (5 hunks)
  • packages/service-utils/src/core/api.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.@(ts|tsx)`: Accept a typed 'props' object and export a named function (e.g...

**/*.@(ts|tsx): Accept a typed 'props' object and export a named function (e.g., export function MyComponent()).
Combine class names via 'cn', expose 'className' prop if useful.
Reuse core UI primitives; avoid re-implementing buttons, cards, modals.
Local state or effects live inside; data fetching happens in hooks.
Merge class names with 'cn' from '@/lib/utils' to keep conditional logic readable.
Stick to design-tokens: background ('bg-card'), borders ('border-border'), muted text ('text-muted-foreground') etc.
Use the 'container' class with a 'max-w-7xl' cap for page width consistency.
Spacing utilities ('px-', 'py-', 'gap-*') are preferred over custom margins.
Responsive helpers follow mobile-first ('max-sm', 'md', 'lg', 'xl').
Never hard-code colors – always go through Tailwind variables.
Tailwind CSS is the styling system – avoid inline styles or CSS modules.
Prefix files with 'import "server-only";' so they never end up in the client bundle (for server-only code).

📄 Source: CodeRabbit Inference Engine (.cursor/rules/dashboard.mdc)

List of files the instruction was applied to:

  • packages/service-utils/src/core/api.ts
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/settings-cards/dedicated-support.tsx
🧠 Learnings (1)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/settings-cards/dedicated-support.tsx (9)
Learnt from: MananTank
PR: thirdweb-dev/js#7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:153-226
Timestamp: 2025-06-10T00:50:20.795Z
Learning: In apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx, the updateStatus function correctly expects a complete MultiStepState["status"] object. For pending states, { type: "pending" } is the entire status object. For error states, { type: "error", message: React.ReactNode } is the entire status object. The current code incorrectly spreads the entire step object instead of passing just the status object.
Learnt from: jnsdls
PR: thirdweb-dev/js#7365
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.tsx:16-17
Timestamp: 2025-06-18T04:27:16.172Z
Learning: Next.js Link component supports external URLs without throwing errors. When used with absolute URLs (like https://...), it behaves like a regular anchor tag without client-side routing, but does not cause runtime crashes or errors as previously believed.
Learnt from: jnsdls
PR: thirdweb-dev/js#7365
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.tsx:16-17
Timestamp: 2025-06-18T04:30:04.326Z
Learning: Next.js Link component fully supports both internal and external URLs and works appropriately with all standard anchor attributes including target="_blank", rel="noopener noreferrer", etc. Using Link for external URLs is completely appropriate and recommended.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-23T13:49:58.951Z
Learning: Use React Query ('@tanstack/react-query') for all client-side data fetching to leverage caching and query management.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-23T13:49:58.951Z
Learning: Client components must begin with 'use client'; before imports to ensure correct rendering behavior in Next.js.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-25T02:13:08.257Z
Learning: Client components should begin files with 'use client' and use React hooks for interactivity.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-25T02:13:08.257Z
Learning: Wrap client-side data fetching calls in React Query and use descriptive, stable queryKeys for cache hits.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-23T13:49:58.951Z
Learning: Use NavLink for internal navigation to automatically handle active states.
Learnt from: jnsdls
PR: thirdweb-dev/js#6929
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/insight/webhooks/page.tsx:14-19
Timestamp: 2025-05-21T05:17:31.283Z
Learning: In Next.js server components, the `params` object can sometimes be a Promise that needs to be awaited, despite type annotations suggesting otherwise. In apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/insight/webhooks/page.tsx, it's necessary to await the params object before accessing its properties.
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (6)
packages/service-utils/src/core/api.ts (1)

153-153: LGTM!

The addition of the optional link property to the dedicatedSupportChannel object is correctly typed and follows the existing pattern for nullable string fields.

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/settings-cards/dedicated-support.tsx (5)

3-4: LGTM!

The imports are correctly added to support the new external link functionality.


21-21: LGTM!

Removing "Coming Soon" from the Telegram option correctly reflects its current availability.


62-62: LGTM!

The channelLink extraction correctly accesses the new optional link property with proper null-safe chaining.


167-167: LGTM!

The placeholder text "Select platform" is more user-friendly and accurate than the previous "Select Channel Type".


171-171: LGTM!

Adding the key prop to SelectItem follows React best practices for list rendering.

Comment on lines +79 to 100
<div className="space-y-3">
<div className="rounded-lg border bg-muted/50 p-4">
<div className="flex items-center justify-between">
<div>
<p className="font-bold">{channelName}</p>
<p className="text-muted-foreground text-sm">
{CHANNEL_TYPES[channelType]} channel
</p>
</div>
{channelLink && (
<Link
className="inline-flex items-center gap-2 rounded-md border border-input px-3 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground transition-colors"
href={channelLink}
target="_blank"
>
Join channel
<ExternalLinkIcon className="size-4" />
</Link>
)}
</div>
</div>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add security attributes to external link.

The UI restructuring looks great with proper styling and conditional rendering. However, the external link should include security attributes for safety.

Apply this diff to add security attributes:

              {channelLink && (
                <Link
                  className="inline-flex items-center gap-2 rounded-md border border-input px-3 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground transition-colors"
                  href={channelLink}
                  target="_blank"
+                 rel="noopener noreferrer"
                >
                  Join channel
                  <ExternalLinkIcon className="size-4" />
                </Link>
              )}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="space-y-3">
<div className="rounded-lg border bg-muted/50 p-4">
<div className="flex items-center justify-between">
<div>
<p className="font-bold">{channelName}</p>
<p className="text-muted-foreground text-sm">
{CHANNEL_TYPES[channelType]} channel
</p>
</div>
{channelLink && (
<Link
className="inline-flex items-center gap-2 rounded-md border border-input px-3 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground transition-colors"
href={channelLink}
target="_blank"
>
Join channel
<ExternalLinkIcon className="size-4" />
</Link>
)}
</div>
</div>
</div>
<div className="space-y-3">
<div className="rounded-lg border bg-muted/50 p-4">
<div className="flex items-center justify-between">
<div>
<p className="font-bold">{channelName}</p>
<p className="text-muted-foreground text-sm">
{CHANNEL_TYPES[channelType]} channel
</p>
</div>
{channelLink && (
<Link
className="inline-flex items-center gap-2 rounded-md border border-input px-3 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground transition-colors"
href={channelLink}
target="_blank"
rel="noopener noreferrer"
>
Join channel
<ExternalLinkIcon className="size-4" />
</Link>
)}
</div>
</div>
</div>
🤖 Prompt for AI Agents
In
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/settings-cards/dedicated-support.tsx
around lines 79 to 100, the external link rendered with the Link component lacks
security attributes. To fix this, add rel="noopener noreferrer" to the Link
component that has target="_blank" to prevent security vulnerabilities related
to opening external links in a new tab.

Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 63.11 KB (0%) 1.3 s (0%) 295 ms (+67.32% 🔺) 1.6 s
thirdweb (cjs) 352.76 KB (0%) 7.1 s (0%) 1.3 s (+6.96% 🔺) 8.4 s
thirdweb (minimal + tree-shaking) 5.72 KB (0%) 115 ms (0%) 115 ms (+800.21% 🔺) 229 ms
thirdweb/chains (tree-shaking) 530 B (0%) 11 ms (0%) 99 ms (+3088.8% 🔺) 109 ms
thirdweb/react (minimal + tree-shaking) 19.59 KB (0%) 392 ms (0%) 180 ms (+577.57% 🔺) 572 ms

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. packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant