Skip to content

Comments

fix: disable prefetch on team page event type links to prevent Google rate limits#27260

Merged
sean-brydon merged 1 commit intomainfrom
devin/1769461049-disable-team-event-prefetch
Jan 26, 2026
Merged

fix: disable prefetch on team page event type links to prevent Google rate limits#27260
sean-brydon merged 1 commit intomainfrom
devin/1769461049-disable-team-event-prefetch

Conversation

@emrysal
Copy link
Contributor

@emrysal emrysal commented Jan 26, 2026

What does this PR do?

Disables Next.js Link prefetching on the team page (/team/[slug]) to prevent excessive server-side rendering of event type pages when viewing a team's profile.

When a team has many event types, Next.js automatically prefetches all linked event type pages when they come into the viewport. This triggers server-side rendering for each page, which can make Google Calendar API calls and cause rate limiting issues.

This follows the existing pattern in users-public-view.tsx which already has prefetch={false} on event type links with the comment: "Don't prefetch till the time we drop the amount of javascript in [user][type] page which is impacting score for [user] page"

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - no documentation changes needed.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Navigate to a team page with multiple event types (e.g., i.cal.com/engineering)
  2. Open browser DevTools Network tab
  3. Observe that event type pages are no longer being prefetched/prerendered when they come into view
  4. Verify that clicking on an event type still navigates correctly to the event type page

Checklist

  • My code follows the style guidelines of this project
  • My changes generate no new warnings

Human Review Checklist

  • Verify prefetch={false} is the correct approach to prevent the prerendering behavior shown in the screenshot
  • Consider if there are other team-related pages that might need similar treatment
  • Note: There's a minor indentation change from the linter - verify this is acceptable

Link to Devin run: https://app.devin.ai/sessions/20d6b6950eab4841b44f488bbf30fbc9
Requested by: @emrysal

… rate limits

Co-Authored-By: alex@cal.com <me@alexvanandel.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@emrysal emrysal marked this pull request as ready for review January 26, 2026 21:15
@graphite-app graphite-app bot requested a review from a team January 26, 2026 21:15
@graphite-app graphite-app bot added the core area: core, team members only label Jan 26, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@sean-brydon sean-brydon merged commit 43d05f4 into main Jan 26, 2026
91 of 92 checks passed
@sean-brydon sean-brydon deleted the devin/1769461049-disable-team-event-prefetch branch January 26, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants