Skip to content

Splitting app into server_*.R files - #35

Merged
amcim merged 3 commits into
mainfrom
refactor-app
Jun 23, 2026
Merged

Splitting app into server_*.R files#35
amcim merged 3 commits into
mainfrom
refactor-app

Conversation

@amcim

@amcim amcim commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

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 observers
R/server_metadata.R : Metadata tab
R/server_modelperf.R : Model Performance + Performance overview
R/server_featureimportance.R : Bug/Drug feature comparison
R/server_crossmodel.R : Model holdouts
R/server_network.R : Drug-feature network
R/server_query.R : Query data + CSV downloads

setupServerCore(input, output, session, results_root) runs once inside the dashboard's server function and returns a named list of shared reactives

Each server_<tab>(input, output, session, core, ...) function then registers its outputs and observers, reading shared state via core$x() and forwarding results_root / amrdata_root

Testing

Run devtools::test() and load the dashboard with loadAMRDashboard() to make sure the plots still render correctly

@amcim
amcim requested a review from eboyer221 June 23, 2026 17:11
@amcim amcim self-assigned this Jun 23, 2026

@eboyer221 eboyer221 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and tested locally, looks really good. Nice split of the server into
per-tab modules. Approving!

@amcim
amcim merged commit 5174aa4 into main Jun 23, 2026
8 checks passed
@amcim
amcim deleted the refactor-app branch June 23, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants