feature(network visualization): Redirect users to INDRA when clicking an edge#115
feature(network visualization): Redirect users to INDRA when clicking an edge#115tonywu1999 merged 3 commits intodevelfrom
Conversation
WalkthroughAdds propagation of an evidenceLink field from Cytoscape edge clicks, a server helper Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Cyt as Cytoscape (client)
participant Server as Shiny Server (module)
participant Browser as Browser
User->>Cyt: click edge
Cyt-->>Server: edge_click event { source, target, ..., evidenceLink }
Server->>Server: extract & validate evidenceLink
Server-->>Cyt: shiny.sendCustomMessage("openLinkInNewTab", { url })
note right of Server: new message type emitted
Cyt->>Browser: window.open(url, "_blank", "noopener,noreferrer")
note right of Browser: evidence opens in new tab
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ 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)
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
R/module-visualize-network-server.R (2)
32-34: Include defensive default and trim on evidenceLink before sending to server.If edge.data('evidenceLink') is undefined, Shiny may omit the field entirely. Consider normalizing to null client-side to make server logic simpler, but current approach is acceptable.
509-509: Potential popup blockers; consider client-side open within the Cytoscape click handler.Many browsers block window.open unless triggered synchronously by a user gesture. As an enhancement, also call window.open from the JS edge click handler (in addition to server flow) when evidenceLink is present.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
R/module-visualize-network-server.R(3 hunks)R/module-visualize-network-ui.R(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). (1)
- GitHub Check: build
PR Type
Enhancement, Bug fix
Description
Add edge evidence link propagation
Open evidence links in new tab
Handle empty/invalid URLs safely
Integrate edge click with table highlight
Diagram Walkthrough
File Walkthrough
module-visualize-network-server.R
Add evidence link handling and opening logicR/module-visualize-network-server.R
evidenceLinkin edge click payload.openEvidenceLinkhelper with validation.module-visualize-network-ui.R
UI handler to open links in new tabR/module-visualize-network-ui.R
openLinkInNewTab.Summary by CodeRabbit