Fix Next button stuck disabled after incomplete mapping error - #1403
Merged
Conversation
Shaakon35
approved these changes
Jul 29, 2026
KOBANAK
approved these changes
Jul 29, 2026
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.
Issue
Closes #1402
Description
In the Data tab, submitting an incomplete column mapping (a required variable unmapped) correctly showed an error notification, but the Next button then stayed permanently disabled — the user could not correct the mapping and continue, and had to restart the app.
Root cause
In
inst/shiny/modules/tab_data.R(.setup_step_navigation):trigger_mapping_submit(it does not change the step).data_step():observe({ data_step() shinyjs::enable("next_step") })apply_mapping()throws,mapped_data()catches it and returnsNULL, soadnca_mapped()isNULL,req(adnca_mapped())halts, and the step never advances. Sincedata_step()never changes, the re-enable observer never re-fires and the button stays disabled.Fix
Make the re-enable observer also depend on
trigger_mapping_submit(), which increments on every mapping submission. The Next button is now re-enabled after each submission is processed, whether the mapping succeeds or fails. This is safe becausetrigger_mapping_submitis the same reactiveVal that drives the (synchronous) mapping and strictly increments on every click, so repeated failed attempts each re-enable the button.Definition of Done
How to test
devtools::load_all()thenaNCA::run_app().Unmapped required columns detected: ...).Contributor checklist
.scsschange was done, rundata-raw/compile_css.Rdata-raw/test_suggests_hidden.RNotes to reviewer
devtools::test()andlintr::lint_package()were not run here. Line lengths were checked manually (all <=100).0.1.0.9186.