forked from agentic-review-benchmarks/cal.com
-
Notifications
You must be signed in to change notification settings - Fork 1
fix(companion): event type links for org user #5
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
tomerqodo
wants to merge
7
commits into
qodo_full_base_fixcompanion_event_type_links_for_org_user_pr5
Choose a base branch
from
qodo_full_head_fixcompanion_event_type_links_for_org_user_pr5
base: qodo_full_base_fixcompanion_event_type_links_for_org_user_pr5
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
26f7e01
checkpoint 1
dhairyashiil 8f668ab
checkpoint 2
dhairyashiil c199070
update extension header
dhairyashiil b05a537
fix some minor ios ui bugs
dhairyashiil e125fd2
fix(companion): restore username fetching for URL fallback display
devin-ai-integration[bot] 3dd928a
complete devins code change
dhairyashiil 161a777
update pr
tomerqodo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,7 @@ import { | |
| useEventTypes, | ||
| } from "@/hooks"; | ||
| import { useEventTypeFilter } from "@/hooks/useEventTypeFilter"; | ||
| import { CalComAPIService, type EventType } from "@/services/calcom"; | ||
| import type { EventType } from "@/services/calcom"; | ||
| import { showErrorAlert, showSuccessAlert } from "@/utils/alerts"; | ||
| import { openInAppBrowser } from "@/utils/browser"; | ||
| import { getEventDuration } from "@/utils/getEventDuration"; | ||
|
|
@@ -133,22 +133,27 @@ export default function EventTypes() { | |
| }; | ||
|
|
||
| const handleCopyLink = async (eventType: EventType) => { | ||
| if (!eventType.bookingUrl) { | ||
| showErrorAlert("Error", "Booking URL not available for this event type."); | ||
| return; | ||
| } | ||
| try { | ||
| const link = await CalComAPIService.buildEventTypeLink(eventType.slug); | ||
| await Clipboard.setStringAsync(link); | ||
|
|
||
| await Clipboard.setStringAsync(eventType.bookingUrl); | ||
| showSuccessAlert("Link Copied", "Event type link copied!"); | ||
|
Comment on lines
+136
to
142
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 5. Link actions too strict • EventTypes list screens (iOS and cross-platform) now hard-require eventType.bookingUrl and show an error when it’s missing. • bookingUrl is explicitly typed as optional, and other parts of the codebase handle its absence via fallback URL construction. • If the API omits bookingUrl in some responses, share/copy/preview will fail even though the URL can be derived from username + slug. Agent prompt
|
||
| } catch { | ||
| showErrorAlert("Error", "Failed to copy link. Please try again."); | ||
| } | ||
| }; | ||
|
|
||
| const _handleShare = async (eventType: EventType) => { | ||
| if (!eventType.bookingUrl) { | ||
| showErrorAlert("Error", "Booking URL not available for this event type."); | ||
| return; | ||
| } | ||
| try { | ||
| const link = await CalComAPIService.buildEventTypeLink(eventType.slug); | ||
| await Share.share({ | ||
| message: `Book a meeting: ${eventType.title}`, | ||
| url: link, | ||
| url: eventType.bookingUrl, | ||
| }); | ||
| } catch { | ||
| showErrorAlert("Error", "Failed to share link. Please try again."); | ||
|
|
@@ -280,14 +285,15 @@ export default function EventTypes() { | |
| }; | ||
|
|
||
| const handlePreview = async (eventType: EventType) => { | ||
| if (!eventType.bookingUrl) { | ||
| showErrorAlert("Error", "Booking URL not available for this event type."); | ||
| return; | ||
| } | ||
| try { | ||
| const link = await CalComAPIService.buildEventTypeLink(eventType.slug); | ||
| // Open in browser | ||
| if (Platform.OS === "web") { | ||
| window.open(link, "_blank"); | ||
| window.open(eventType.bookingUrl, "_blank"); | ||
| } else { | ||
| // For mobile, use in-app browser | ||
| await openInAppBrowser(link, "event type preview"); | ||
| await openInAppBrowser(eventType.bookingUrl, "event type preview"); | ||
| } | ||
| } catch { | ||
| console.error("Failed to open preview"); | ||
|
|
@@ -443,6 +449,7 @@ export default function EventTypes() { | |
| /> | ||
| <TouchableOpacity | ||
| className="min-w-[60px] flex-row items-center justify-center gap-1 rounded-lg bg-black px-2.5 py-2" | ||
| style={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }} | ||
| onPress={handleCreateNew} | ||
| > | ||
| <Ionicons name="add" size={18} color="#fff" /> | ||
|
|
@@ -507,6 +514,7 @@ export default function EventTypes() { | |
| /> | ||
| <TouchableOpacity | ||
| className="min-w-[60px] flex-row items-center justify-center gap-1 rounded-lg bg-black px-2.5 py-2" | ||
| style={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }} | ||
| onPress={handleCreateNew} | ||
| > | ||
| <Ionicons name="add" size={18} color="#fff" /> | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
3. Detail link always missing
🐞 Bug✓ CorrectnessAgent prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools