Skip to content

fix: disable navigation.instant (unstyled pages on in-site navigation)#2704

Merged
claudiacodacy merged 1 commit into
masterfrom
fix/disable-navigation-instant
Jul 16, 2026
Merged

fix: disable navigation.instant (unstyled pages on in-site navigation)#2704
claudiacodacy merged 1 commit into
masterfrom
fix/disable-navigation-instant

Conversation

@claudiacodacy

Copy link
Copy Markdown
Contributor

Problem

After the theme change, pages render unstyled when navigating between links — first full page load is fine, clicking to another page (e.g. Getting Started) breaks the layout, and a manual refresh fixes it. Reproduced in Safari and matches reports of "a refresh does the trick, but it happens on every first-visit link and on back-navigation."

Cause

Production has navigation.instant enabled (confirmed in the live __config block). With instant loading, in-site clicks fetch the target page over XHR and swap only the <body> — no full document load. The theme's custom scripts and third-party embeds (docs-theme.js, CookieYes, Zendesk) initialize on DOMContentLoaded, which only fires on a real page load, so they never re-run on the swapped-in content → unstyled pages. A refresh is a full load, which re-runs everything, which is why it "fixes" it.

Fix

Remove navigation.instant from theme.features so navigation goes back to full page loads. navigation.path (breadcrumbs) is kept — it's independent of instant loading and isn't involved in the breakage.

This restores correct rendering immediately. Keeping instant loading would instead require re-initializing the custom scripts and embeds on Material's document$ observable (which re-fires per instant navigation) — a larger, riskier change that can be tackled separately if the page-load speedup is wanted back.

🤖 Generated with Claude Code

…igation

navigation.instant swaps <body> via XHR instead of doing a full page
load, so the theme's custom scripts and third-party embeds (docs-theme.js,
CookieYes, Zendesk) that initialize on DOMContentLoaded never re-run on
navigation, leaving navigated pages unstyled until a manual refresh.

Reverting to full page loads until the customizations are made
instant-safe (re-init on Material's document$ observable).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@claudiacodacy
claudiacodacy requested a review from a team as a code owner July 16, 2026 09:46

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request removes the "navigation.instant" feature from the MkDocs theme configuration in mkdocs.yml. I have no feedback to provide as there are no review comments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@claudiacodacy
claudiacodacy enabled auto-merge (squash) July 16, 2026 09:47

@codacy-production codacy-production 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.

Pull Request Overview

This pull request addresses the issue of unstyled pages during internal navigation by disabling the navigation.instant feature in mkdocs.yml. This ensures that JavaScript and third-party embeds are properly re-initialized on each page load.

The changes are up to standards according to Codacy, and the implementation aligns perfectly with the stated intent and acceptance criteria. No security or logic flaws were identified.

Test suggestions

  • Verify mkdocs.yml no longer contains the 'navigation.instant' feature
  • Confirm 'navigation.path' remains in the features list

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

@github-actions
github-actions Bot temporarily deployed to Netlify July 16, 2026 09:48 Inactive
@claudiacodacy
claudiacodacy merged commit e9aed54 into master Jul 16, 2026
5 checks passed
@claudiacodacy
claudiacodacy deleted the fix/disable-navigation-instant branch July 16, 2026 09:48
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