Splitting app into server_*.R files - #35
Merged
Merged
Conversation
eboyer221
approved these changes
Jun 23, 2026
eboyer221
left a comment
Contributor
There was a problem hiding this comment.
Reviewed and tested locally, looks really good. Nice split of the server into
per-tab modules. Approving!
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.
This PR finishes the reorganization of the repo, splitting app.R into multiple server_*.R modules in line with utils/plots. A new script was created for
R/server_setup.R: Shared reactives + cross-tab UI-update observersR/server_metadata.R: Metadata tabR/server_modelperf.R: Model Performance + Performance overviewR/server_featureimportance.R: Bug/Drug feature comparisonR/server_crossmodel.R: Model holdoutsR/server_network.R: Drug-feature networkR/server_query.R: Query data + CSV downloadssetupServerCore(input, output, session, results_root)runs once inside the dashboard's server function and returns a named list of shared reactivesEach
server_<tab>(input, output, session, core, ...)function then registers its outputs and observers, reading shared state viacore$x()and forwardingresults_root/amrdata_rootTesting
Run devtools::test() and load the dashboard with loadAMRDashboard() to make sure the plots still render correctly