Report section dispatch system - #94
Conversation
…port-registry)" This reverts commit 7fd0130.
There was a problem hiding this comment.
Pull request overview
Adds workflow-specific Quarto report recipes and dynamically assembles reports from registered workflow definitions.
Changes:
- Extends workflow registration with validated report factories.
- Reorganizes Quarto content into shared and workflow-specific sections.
- Adds tests and documentation for report recipes.
Reviewed changes
Copilot reviewed 8 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
R/workflow_registry.R |
Adds report registration, validation, and retrieval. |
R/es_data.R |
Defines the amplicon-demux report recipe. |
R/zzz.R |
Registers the built-in report factory. |
NAMESPACE |
Exports the report getter. |
tests/testthat/test_es_data.R |
Tests report recipes and validation. |
inst/quarto/pixelatorES.qmd |
Dynamically dispatches report children. |
inst/quarto/shared/preprocessing.qmd |
Provides shared report setup. |
inst/quarto/shared/samples.qmd |
Provides the shared samples section. |
inst/quarto/shared/run_settings.qmd |
Provides shared run metadata. |
inst/quarto/workflows/amplicon_demux/quality_metrics.qmd |
Adds workflow quality metrics. |
inst/quarto/workflows/amplicon_demux/cell_annotation.qmd |
Adds cell annotation content. |
inst/quarto/workflows/amplicon_demux/abundance.qmd |
Adds abundance content. |
inst/quarto/workflows/amplicon_demux/spatial.qmd |
Adds spatial metrics content. |
man/register_es_data_workflow.Rd |
Documents the report parameter. |
man/get_es_workflow_report.Rd |
Documents report retrieval. |
DEVELOPERS.md |
Explains workflow report development. |
CHANGELOG.md |
Records the report-recipe feature. |
Files not reviewed (2)
- man/get_es_workflow_report.Rd: Generated file
- man/register_es_data_workflow.Rd: Generated file
Suppressed comments (1)
R/workflow_registry.R:218
- The factory output is validated only during registration, but this public getter invokes the factory again and returns that later result unchecked. A stateful or environment-dependent factory can therefore register successfully and then supply a malformed recipe that fails unpredictably inside the Quarto dispatcher. Validate each produced recipe before returning it.
get_es_workflow_report <- function(name) {
return(.get_es_workflow_definition(name)$report())
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7659fac. Configure here.

Description
This adds the
reportargument to the workflow registration so that it is possible to associate tabs with a workflow. The Quarto main file has been downgraded to a preamble + section dispatcher to follow the recipe in the registered workflow.Added
preamble+sections) viaregister_es_data_workflow(), retrieved withget_es_workflow_report().Changed
inst/quarto/shared/; workflow-owned children live underinst/quarto/workflows/<id>/.Type of change
How Has This Been Tested?
Tests have been added and manual tests.
PR checklist:
Note
Medium Risk
Breaking change to
register_es_data_workflow()and report assembly path; misconfigured extension workflows fail at registration or render time, though built-in paths are covered by tests.Overview
Workflows now own the HTML report layout, not only data extractors.
register_es_data_workflow()takes a requiredreportfactory that returns a recipe (preamblechild paths + tabsectionswithid,title,child). Recipes are validated at registration (structure, unique section ids, on-disk child paths).get_es_workflow_report()retrieves the recipe;amplicon_demuxregisters.amplicon_demux_report()on load.pixelatorES.qmdis a thin shell: it loads the recipe forparams$workflow, knits preamble children, then builds the panel tabset fromsections. Section.qmdfiles move underinst/quarto/shared/(cross-workflow) andinst/quarto/workflows/<id>/(workflow-specific).Also adds exported
test_es_data()for aligned test fixtures and switches tests away from hand-builtstructure(..., class = "es_data"). Breaking for anyone who registered workflows in 0.12.0 without areportargument.Reviewed by Cursor Bugbot for commit 117a38a. Bugbot is set up for automated code reviews on this repo. Configure here.