Repository navigation
fix(docs): prevent 404 on eclair demo link - #93
Conversation
The "View Demo" link was causing a 404 because VitePress's internal router intercepted clicks in the bubbling phase before our handler could run. Changed to capture phase (third argument true) so our eclair link handler runs before VitePress can intercept. Co-Authored-By: Claude Opus 4.5 <[email protected]>
📝 WalkthroughWalkthroughThe document-level click handler in Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings📚 Learning: 2026-01-06T18:04:54.841ZApplied to files:
📚 Learning: 2026-01-07T08:55:23.513ZApplied to files:
⏰ 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). (1)
🔇 Additional comments (5)
Comment |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
Deploying living-architecture with
|
| Latest commit: |
806bc89
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://425e0bfc.living-architecture.pages.dev |
| Branch Preview URL: | https://fix-eclair-demo-404.living-architecture.pages.dev |
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
Remove defaultPrevented check and add stopImmediatePropagation to ensure our handler forces full page navigation before VitePress can intercept and render its 404 page. Co-Authored-By: Claude Opus 4.5 <[email protected]>
|



User description
Fixes the 404 error when clicking the "View Demo" link from the docs homepage.
The issue was that VitePress's internal router was intercepting clicks in the bubbling phase before our eclair link handler could run. Changed the event listener to use the capture phase (third argument
true) so our handler executes before VitePress can intercept the click.This is a one-line fix that adds the capture phase flag to both
addEventListenerandremoveEventListenercalls inapps/docs/.vitepress/theme/Layout.vue.PR Type
Bug fix
Description
Fix 404 error on eclair demo link click
Use capture phase for event listener to prevent VitePress router interception
Ensure eclair link handler executes before VitePress intercepts click event
Diagram Walkthrough
File Walkthrough
Layout.vue
Enable capture phase for eclair link handlerapps/docs/.vitepress/theme/Layout.vue
truetodocument.addEventListenercalltruetodocument.removeEventListenercallclicks
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.