Skip to content

DC-6383 UTM params persistence fixed for nav bar - #7353

Merged
aidankmcalister merged 2 commits into
mainfrom
DC-6383-utm-params
Dec 4, 2025
Merged

DC-6383 UTM params persistence fixed for nav bar#7353
aidankmcalister merged 2 commits into
mainfrom
DC-6383-utm-params

Conversation

@aidankmcalister

@aidankmcalister aidankmcalister commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Session-based UTM parameters are now automatically appended to Prisma Console navigation links and kept in sync for the duration of the session, including links added after the page initially loads.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions

github-actions Bot commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Dangerous URL check

No absolute URLs to prisma.io/docs found.
No local URLs found.

@github-actions

github-actions Bot commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

@coderabbitai

coderabbitai Bot commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a useEffect in src/theme/Layout/index.tsx that, on mount, reads utm_params from sessionStorage, merges them into the query strings of anchors linking to console.prisma.io, runs an initial update, observes DOM mutations to update new links, and disconnects the observer on unmount. (48 words)

Changes

Cohort / File(s) Change Summary
Layout DOM UTM injector
src/theme/Layout/index.tsx
Adds a useEffect that reads utm_params from sessionStorage, merges those UTM params into URLs of anchor elements targeting console.prisma.io (initial pass + MutationObserver for dynamic additions), and disconnects the observer on unmount. No exported APIs changed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify MutationObserver is scoped (observing appropriate subtree/options) to avoid excessive callbacks.
  • Inspect URL merging: ensure proper encoding, no duplicate keys, and correct handling of existing query strings/hash fragments.
  • Confirm initial update covers existing links and observer covers dynamic link additions without reprocessing the same anchors repeatedly.
  • Validate cleanup on unmount to avoid memory leaks or lingering observers.

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically references the primary change: adding UTM parameter persistence for navigation bar links to console.prisma.io, matching the actual implementation.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e0d45c1 and 29fd992.

📒 Files selected for processing (1)
  • src/theme/Layout/index.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/theme/Layout/index.tsx
⏰ 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). (2)
  • GitHub Check: Check internal links
  • GitHub Check: Cloudflare Pages

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 4, 2025

Copy link
Copy Markdown

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 29fd992
Status: ✅  Deploy successful!
Preview URL: https://931de2a0.docs-51g.pages.dev
Branch Preview URL: https://dc-6383-utm-params.docs-51g.pages.dev

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19241c2 and e0d45c1.

📒 Files selected for processing (1)
  • src/theme/Layout/index.tsx (1 hunks)
⏰ 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). (2)
  • GitHub Check: Check internal links
  • GitHub Check: Cloudflare Pages

Comment thread src/theme/Layout/index.tsx
@aidankmcalister
aidankmcalister merged commit 5e47f0b into main Dec 4, 2025
6 checks passed
@aidankmcalister
aidankmcalister deleted the DC-6383-utm-params branch December 4, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants