Skip to content

Create per-dataset hidden dashboard pages with stable nav links#7

Draft
JZauner wants to merge 1 commit intomainfrom
codex/rework-app-for-separate-dataset-pages
Draft

Create per-dataset hidden dashboard pages with stable nav links#7
JZauner wants to merge 1 commit intomainfrom
codex/rework-app-for-separate-dataset-pages

Conversation

@JZauner
Copy link
Copy Markdown
Contributor

@JZauner JZauner commented Mar 13, 2026

Motivation

  • Replace the single dashboard page with a dedicated (hidden) nav page per dataset so each dataset has its own stable dashboard instance while selection remains driven by the dataset manager.
  • Ensure renames keep dashboard links stable and deletes remove the corresponding dashboard page.

Description

  • Add R/dataset_nav_pages.R with new_dataset_page() to create stable nav_value/module_id pairs and a mutable dataset_name handle, and reconcile_dataset_pages() to compute added/removed/renamed datasets.
  • Rework the app server in R/LightLogWeb-app.R to dynamically nav_insert() a hidden nav_panel per dataset, datasetDashboardServer() instantiation per page, and nav_remove() on deletion; navigation is driven by nav_select() using the selected dataset name.
  • Simplify datasetDashboardServer() signature in R/m_dataset_dashboard.R by removing active_panel coupling so the dashboard module can be instantiated per dataset page without changing its internal UI/content.
  • Add test scaffolding and unit tests in tests/testthat/ for the new page helpers, and add testthat to DESCRIPTION suggests for CI.

Testing

  • Added unit tests under tests/testthat/test-dataset-nav-pages.R covering new_dataset_page() and reconcile_dataset_pages() semantics and a test for rename detection, and a tests/testthat.R test runner was added.
  • Attempted to run tests with Rscript -e "testthat::test_dir('tests/testthat')" but execution failed in this environment because Rscript is not available; tests could not be executed here.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant