-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Improve partner link modal #3029
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe PR removes nanoid-based suffix generation from partner link keys in the controls component while simultaneously adding session-aware auto-key generation logic with validation to the partner link modal, shifting key generation responsibility and changing initialization behavior. Changes
Sequence DiagramsequenceDiagram
participant User
participant Modal as Partner Link Modal
participant Form as react-hook-form
participant Session as Session Data
rect rgb(200, 220, 255)
Note over Modal,Form: Old Flow (Removed)
User->>Modal: Open modal with existing link
Modal->>Modal: Generate key: ${link.key}-${nanoid(6)}
end
rect rgb(220, 255, 220)
Note over Modal,Form: New Flow (Added)
User->>Modal: Open modal to create new link
Modal->>Session: Retrieve session data
Session-->>Modal: User name
Modal->>Modal: Auto-generate key from name + suffix
Modal->>Form: Write key without marking dirty
User->>Modal: Focus key input
Modal->>Modal: Set keyInputFocused = true
User->>Modal: Blur key input or submit
Form->>Form: Validate key (required)
Form-->>Modal: Return validation errors
Modal->>User: Display error if present
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2025-06-06T07:59:03.120ZApplied to files:
📚 Learning: 2025-08-25T21:03:24.285ZApplied to files:
🧬 Code graph analysis (1)apps/web/ui/modals/partner-link-modal.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (11)
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. Comment |
Summary by CodeRabbit
New Features
Improvements