Skip to content

Update exit page controller to use new-style exit pages - #2283

Merged
lfdebrux merged 5 commits into
mainfrom
ldeb-new-style-exit-pages
Aug 13, 2026
Merged

Update exit page controller to use new-style exit pages#2283
lfdebrux merged 5 commits into
mainfrom
ldeb-new-style-exit-pages

Conversation

@lfdebrux

@lfdebrux lfdebrux commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

Trello card: https://trello.com/c/0ijhpyt8/3146-update-forms-runner-to-work-with-more-than-one-exit-page-for-a-question

This PR updates the exit_page#show action to work with new-style exit pages. The code still assumes that an question with an exit page has only one exit page and only one routing condition, but this PR does most of the changes needed to make the exit page controller work with multiple exit pages. We just need to make some more changes to the step model and the step controller before we can fully support more than one exit page per question in forms-runner.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

@lfdebrux
lfdebrux force-pushed the ldeb-new-style-exit-pages branch from a2abf06 to c11cfa5 Compare August 12, 2026 09:28
@lfdebrux
lfdebrux marked this pull request as draft August 12, 2026 09:28
@lfdebrux
lfdebrux force-pushed the ldeb-new-style-exit-pages branch 3 times, most recently from dfaf3f2 to e25cb26 Compare August 12, 2026 10:06
@lfdebrux
lfdebrux marked this pull request as ready for review August 12, 2026 10:12

@theseanything theseanything 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.

To minor comments - but generally looks fine!

Comment thread app/models/exit_page.rb Outdated
Comment thread app/controllers/forms/exit_pages_controller.rb
@lfdebrux
lfdebrux force-pushed the ldeb-new-style-exit-pages branch from e25cb26 to 1d199d5 Compare August 12, 2026 13:52
Add some checks/exceptions for various possible edge cases to the
exit_page#show action:

- If the step does not have an exit page, redirect to the next visitable
  step
- If the answer given for the step does not route to an exit page,
  redirect to the next visitable step
- If the form document is missing the exit page object in the step for
  some reason (this shouldn't happen), raise an exception
@lfdebrux
lfdebrux force-pushed the ldeb-new-style-exit-pages branch from 1d199d5 to e26927a Compare August 13, 2026 05:14
@github-actions

Copy link
Copy Markdown
Contributor

🎉 A review copy of this PR has been deployed! It is made of up two components

  1. A review copy of forms-runner
  2. A production copy of forms-admin

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@lfdebrux
lfdebrux added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit 409978b Aug 13, 2026
3 checks passed
@lfdebrux
lfdebrux deleted the ldeb-new-style-exit-pages branch August 13, 2026 08:52
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