Skip to content

Conversation

@emrysal
Copy link
Contributor

@emrysal emrysal commented Jan 26, 2026

What does this PR do?

Adds an E2E test to verify that the prefetch={false} fix in PR #27260 is working correctly. The test ensures that no RSC prefetch requests (requests with _rsc query parameter) are made for event type pages when loading the team page, which was causing excessive Google Calendar API rate limit hits.

Updates since last revision

  • Changed test from checking prefetch on hover to checking prefetch on page load (per Sean's request)
  • Fixed overly broad regex that was catching unrelated RSC requests - now specifically matches only /team/{teamSlug}/{eventTypeSlug} pattern
  • Renamed function to countEventTypePrefetchRequests for clarity

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 - test only
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Run the E2E test locally:

PLAYWRIGHT_HEADLESS=1 yarn e2e team-page-no-prefetch.e2e.ts

The test:

  1. Creates a team with event types
  2. Navigates to the team page (/team/{slug})
  3. Waits for page to fully load (networkidle + 3 second buffer)
  4. Intercepts RSC prefetch requests matching /team/{teamSlug}/{eventTypeSlug} pattern
  5. Asserts that zero event type prefetch requests are made on page load

Expected result: Both tests pass, confirming that prefetch={false} prevents Next.js from prefetching event type pages when they enter the viewport.

Human Review Checklist

  • To validate the test catches real issues, temporarily remove prefetch={false} from team-view.tsx and verify the test fails
  • Consider if the 3 second timeout is sufficient to catch prefetch requests in production builds
  • Verify the regex ^/team/${teamSlug}/[^/]+$ correctly matches event type URLs without false positives

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked if my changes generate no new warnings

Link to Devin run: https://app.devin.ai/sessions/20d6b6950eab4841b44f488bbf30fbc9
Requested by: @emrysal (alex@cal.com)

devin-ai-integration bot and others added 2 commits January 26, 2026 20:57
… rate limits

Co-Authored-By: alex@cal.com <me@alexvanandel.com>
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

Co-Authored-By: alex@cal.com <me@alexvanandel.com>
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
@devin-ai-integration devin-ai-integration bot changed the title test: add E2E test to verify no getSchedule calls on team page load test: add E2E test to verify no RSC prefetch on team page hover Jan 26, 2026
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
@pull-request-size pull-request-size bot added size/M and removed size/L labels Jan 27, 2026
@devin-ai-integration devin-ai-integration bot changed the title test: add E2E test to verify no RSC prefetch on team page hover test: add E2E test to verify no RSC prefetch on team page load Jan 27, 2026
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jan 27, 2026
@github-actions
Copy link
Contributor

E2E results are ready!

@emrysal emrysal marked this pull request as ready for review January 27, 2026 02:32
@graphite-app graphite-app bot added foundation core area: core, team members only labels Jan 27, 2026
@graphite-app graphite-app bot requested a review from a team January 27, 2026 02:32
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.

1 issue found across 1 file

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/web/playwright/team-page-no-prefetch.e2e.ts">

<violation number="1" location="apps/web/playwright/team-page-no-prefetch.e2e.ts:39">
P1: Rule violated: **E2E Tests Best Practices**

Add a URL assertion after navigation to fail fast on unexpected redirects, as required by the E2E Tests Best Practices rule.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

Devin AI is addressing Cubic AI's review feedback

New feedback has been sent to the existing Devin session.

View Devin Session


✅ Pushed commit 9a52852

Co-Authored-By: alex@cal.com <me@alexvanandel.com>
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.

3 participants