Repository navigation
fix(citation): open external web documents directly - #20452
Conversation
Citation buttons always routed to the internal `/document/:id` preview page, even for web-page documents that carry their own source URL in `doc_aggs.url`. That page has nothing to render for them, so those links were effectively dead. - `components/markdown-content`, `components/next-markdown-content` and `components/floating-chat-widget-markdown` now open the source URL directly when it is an absolute http(s) link, and keep the internal preview route otherwise. - `pages/next-search/markdown-content` previously discarded `documentUrl`; it is now passed through so external links bypass the preview modal. The unused `isPdf` parameter was dropped.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughDocument buttons in four markdown views now open HTTP(S) document URLs in a new tab with ChangesExternal Document URL Handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to External web citations open their source URLs, while other citations retain existing routing. No actionable merge-blocking risk was identified; merge after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to External citation clicks now open source websites directly. HTTP(S)-only routing and isolated new tabs constrain exposure, and no introduced exploit was demonstrated. However, the provenance and validation of the supplied URLs remain unconfirmed. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit clicks a link with care, Comment |
The `handleDocumentButtonClick` callback params were wrapped across four lines; oxfmt collapses them onto one, which is what `lefthook run web-checks` enforces in CI. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Summary
Citation buttons always routed to the internal
/document/:idpreview page, even for web-page documents that carry their own source URL indoc_aggs.url. That page has nothing to render for them, so those links were effectively dead.components/markdown-content,components/next-markdown-contentandcomponents/floating-chat-widget-markdownnow open the source URL directly when it is an absolute http(s) link, and keep the internal preview route otherwise.pages/next-search/markdown-contentpreviously discardeddocumentUrl; it is now passed through so external links bypass the preview modal. The unusedisPdfparameter was dropped.