Harden Shiny package execution by namespacing external UI/render helpers - #5
Merged
Merged
Conversation
Co-authored-by: amelia-m <22108551+amelia-m@users.noreply.github.com>
Co-authored-by: amelia-m <22108551+amelia-m@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
amelia-m
August 6, 2026 02:28
View session
amelia-m
marked this pull request as ready for review
August 6, 2026 02:28
There was a problem hiding this comment.
Pull request overview
This PR hardens the Shiny app when executed in package-directory mode by explicitly namespacing calls to external-package UI/render helpers, preventing “function not found” errors when packages aren’t attached on startup.
Changes:
- Qualified DT UI/render/formatting helpers with
DT::in the Name Changes and Table Details modules. - Qualified visNetwork output/render/build + chained vis helpers with
visNetwork::in the ERD module. - Qualified app bootstrap helpers with
shiny::and theme helper withshinythemes::.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| R/run_app.R | Namespaces Shiny bootstrap calls (addResourcePath, shinyApp). |
| R/app_ui.R | Namespaces the theme helper (shinythemes::shinytheme). |
| R/mod_name_changes.R | Namespaces DT output + render + datatable calls. |
| R/mod_table_details.R | Namespaces DT output/render and DT formatting helpers (formatStyle, styleEqual). |
| R/mod_erd.R | Namespaces visNetwork output/render/build and chained vis helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running the app via
shiny::runApp()in package-directory mode intermittently failed with unresolved function errors (notablyrenderDTandvisNetworkhelpers). The failures were caused by unqualified external-package calls in module/UI startup paths.Scope: DT call sites
DT::usage in:/home/runner/work/table-explorer/table-explorer/R/mod_name_changes.R/home/runner/work/table-explorer/table-explorer/R/mod_table_details.RDTOutput,renderDT,datatable,formatStyle, andstyleEqual.Scope: visNetwork call sites
visNetwork::usage in:/home/runner/work/table-explorer/table-explorer/R/mod_erd.RvisNetworkOutput,renderVisNetwork,visNetwork, and chained vis helpers (visOptions,visEdges,visNodes,visInteraction,visEvents,visHierarchicalLayout,visPhysics,visLayout).Scope: app bootstrap/UI entrypoints
/home/runner/work/table-explorer/table-explorer/R/app_ui.R:shinythemes::shinytheme(...)/home/runner/work/table-explorer/table-explorer/R/run_app.R:shiny::addResourcePath(...),shiny::shinyApp(...)