Skip to content

[TOOL-2891] Fix Team dashboard not loading if team slug contains special characters #5867

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

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Jan 1, 2025

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR focuses on improving the handling of team slugs in the application by decoding the slug from the URL and enhancing user feedback during team URL updates.

Detailed summary

  • Updated team retrieval to use decodeURIComponent for params.team_slug.
  • Updated project retrieval to use decodeURIComponent for params.team_slug.
  • Replaced isTeamTaken state with errorMessage for better error handling.
  • Added validation for team URL input, providing specific error messages.

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

Copy link

vercel bot commented Jan 1, 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 Jan 1, 2025 5:05pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Jan 1, 2025 5:05pm
thirdweb_playground ⬜️ Skipped (Inspect) Jan 1, 2025 5:05pm
wallet-ui ⬜️ Skipped (Inspect) Jan 1, 2025 5:05pm

Copy link

linear bot commented Jan 1, 2025

@vercel vercel bot temporarily deployed to Preview – docs-v2 January 1, 2025 15:08 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground January 1, 2025 15:08 Inactive
Copy link

changeset-bot bot commented Jan 1, 2025

⚠️ No Changeset found

Latest commit: 8b1a60d

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

@vercel vercel bot temporarily deployed to Preview – wallet-ui January 1, 2025 15:08 Inactive
@MananTank MananTank marked this pull request as ready for review January 1, 2025 15:08
@MananTank MananTank requested review from jakubkrehel and a team as code owners January 1, 2025 15:08
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Jan 1, 2025
Copy link
Member Author


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 Jan 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.18%. Comparing base (8136ec9) to head (8b1a60d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5867   +/-   ##
=======================================
  Coverage   55.18%   55.18%           
=======================================
  Files        1123     1123           
  Lines       59611    59611           
  Branches     5031     5031           
=======================================
  Hits        32895    32895           
  Misses      25996    25996           
  Partials      720      720           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 8136ec9
packages 52.83% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Copy link
Contributor

github-actions bot commented Jan 1, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 45.09 KB (0%) 902 ms (0%) 2.4 s (-21.89% 🔽) 3.3 s
thirdweb (cjs) 110.84 KB (0%) 2.3 s (0%) 6.3 s (-1.47% 🔽) 8.6 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 546 ms (-7.5% 🔽) 658 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 102 ms (+85.93% 🔺) 112 ms
thirdweb/react (minimal + tree-shaking) 19.12 KB (0%) 383 ms (0%) 666 ms (-13.47% 🔽) 1.1 s

@MananTank MananTank force-pushed the 01-01-_tool-2891_fix_team_dashboard_not_loading_if_team_slug_contains_special_characters branch from e636ded to 489ba7c Compare January 1, 2025 15:13
@vercel vercel bot temporarily deployed to Preview – docs-v2 January 1, 2025 15:13 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui January 1, 2025 15:13 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground January 1, 2025 15:13 Inactive
@MananTank MananTank force-pushed the 01-01-_tool-2891_fix_team_dashboard_not_loading_if_team_slug_contains_special_characters branch from 489ba7c to 945b0d1 Compare January 1, 2025 15:20
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground January 1, 2025 15:21 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui January 1, 2025 15:21 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 January 1, 2025 15:21 Inactive
Copy link
Contributor

graphite-app bot commented Jan 1, 2025

Merge activity

…ial characters (#5867)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on improving the handling of `team_slug` and validating the `teamSlug` input in the settings UI. It enhances the URL decoding process and adds error handling for invalid team URLs.

### Detailed summary
- Updated `team_slug` retrieval to decode the URL component in `layout.tsx`.
- Modified project retrieval logic to decode `team_slug`.
- Replaced `isTeamTaken` state with `errorMessage` state for better error handling.
- Added validation for `teamSlug` input to check for empty values and invalid characters.

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

<!-- end pr-codex -->
@MananTank MananTank force-pushed the 01-01-_tool-2891_fix_team_dashboard_not_loading_if_team_slug_contains_special_characters branch from 945b0d1 to 8b1a60d Compare January 1, 2025 17:02
@vercel vercel bot temporarily deployed to Preview – wallet-ui January 1, 2025 17:02 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 January 1, 2025 17:02 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground January 1, 2025 17:02 Inactive
@graphite-app graphite-app bot merged commit 8b1a60d into main Jan 1, 2025
31 checks passed
@graphite-app graphite-app bot deleted the 01-01-_tool-2891_fix_team_dashboard_not_loading_if_team_slug_contains_special_characters branch January 1, 2025 17:06
@vercel vercel bot temporarily deployed to Production – wallet-ui January 1, 2025 17:06 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 January 1, 2025 17:06 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground January 1, 2025 17:06 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants