gather affected pages on plan commit

this fixes the weirdness of the progress bar it also should take
links to missing pages into account on the preview already, but the
actual implementation is still missing