-
Notifications
You must be signed in to change notification settings - Fork 432
fix(ui): Handle logo upload failure in TaskChooseOrganization
#7638
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
fix(ui): Handle logo upload failure in TaskChooseOrganization
#7638
Conversation
🦋 Changeset detectedLatest commit: 0fd9c47 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis pull request patches the 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this 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
🤖 Fix all issues with AI agents
In
`@packages/ui/src/components/SessionTasks/tasks/TaskChooseOrganization/__tests__/TaskChooseOrganization.test.tsx`:
- Around line 14-26: Remove the locally redeclared FakeOrganizationParams type
in TaskChooseOrganization.test.tsx and rely on the imported
FakeOrganizationParams (import type { FakeOrganizationParams } ...) instead;
delete the duplicate type block (the type declaration that lists id, createdAt,
imageUrl, slug, name, membersCount, pendingInvitationsCount, adminDeleteEnabled,
maxAllowedMemberships) so only the imported symbol FakeOrganizationParams
remains used in the test.
| import type { FakeOrganizationParams } from '../../../../CreateOrganization/__tests__/CreateOrganization.test'; | ||
|
|
||
| type FakeOrganizationParams = { | ||
| id: string; | ||
| createdAt?: Date; | ||
| imageUrl?: string; | ||
| slug: string; | ||
| name: string; | ||
| membersCount: number; | ||
| pendingInvitationsCount: number; | ||
| adminDeleteEnabled: boolean; | ||
| maxAllowedMemberships: number; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
cat -n packages/ui/src/components/SessionTasks/tasks/TaskChooseOrganization/__tests__/TaskChooseOrganization.test.tsx | head -30Repository: clerk/javascript
Length of output: 1275
🏁 Script executed:
grep -n "FakeOrganizationParams" packages/ui/src/components/CreateOrganization/__tests__/CreateOrganization.test.tsx | head -20Repository: clerk/javascript
Length of output: 272
Remove the duplicate FakeOrganizationParams type declaration.
Line 14 imports FakeOrganizationParams from the CreateOrganization test file, but lines 16–26 re-declare it locally. This duplicate identifier causes a TypeScript compiler error that blocks the build.
Suggested fix
-import type { FakeOrganizationParams } from '../../../../CreateOrganization/__tests__/CreateOrganization.test';
-
-type FakeOrganizationParams = {
- id: string;
- createdAt?: Date;
- imageUrl?: string;
- slug: string;
- name: string;
- membersCount: number;
- pendingInvitationsCount: number;
- adminDeleteEnabled: boolean;
- maxAllowedMemberships: number;
-};Keep only the import and use the imported type.
📝 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.
| import type { FakeOrganizationParams } from '../../../../CreateOrganization/__tests__/CreateOrganization.test'; | |
| type FakeOrganizationParams = { | |
| id: string; | |
| createdAt?: Date; | |
| imageUrl?: string; | |
| slug: string; | |
| name: string; | |
| membersCount: number; | |
| pendingInvitationsCount: number; | |
| adminDeleteEnabled: boolean; | |
| maxAllowedMemberships: number; | |
| }; | |
| import type { FakeOrganizationParams } from '../../../../CreateOrganization/__tests__/CreateOrganization.test'; |
🧰 Tools
🪛 Biome (2.1.2)
[error] 16-16: Shouldn't redeclare 'FakeOrganizationParams'. Consider to delete it or rename it.
'FakeOrganizationParams' is defined here:
(lint/suspicious/noRedeclare)
🤖 Prompt for AI Agents
In
`@packages/ui/src/components/SessionTasks/tasks/TaskChooseOrganization/__tests__/TaskChooseOrganization.test.tsx`
around lines 14 - 26, Remove the locally redeclared FakeOrganizationParams type
in TaskChooseOrganization.test.tsx and rely on the imported
FakeOrganizationParams (import type { FakeOrganizationParams } ...) instead;
delete the duplicate type block (the type declaration that lists id, createdAt,
imageUrl, slug, name, membersCount, pendingInvitationsCount, adminDeleteEnabled,
maxAllowedMemberships) so only the imported symbol FakeOrganizationParams
remains used in the test.
3b2f0ff to
0fd9c47
Compare
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Description
Port from #7635
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.