I love how most of the Final Fantasy:Tactics series did this.
Each turn had two items: an action and a move. You could do either one in either order. If you chose to attack or use an ability it would show the odds of success and the probable effects and damage range. Once you confirmed the action, it was committed and could not be undone. Movement also showed you the range, and you could move and undo the move as many times as you wanted to check out details...
... except if you moved and triggered a trap, or slid down a hill, or had other issues, you were not allowed to undo the move. Some traps or triggers also prevented taking an action the same turn, so if you were had not taken the action already the turn was over and you could not do what was planned.
<snip>
TL;DR: Consider allowing as many undo and take-back as you can until the moment damage is done or the dice are rolled, then the action is committed. Traps, and terrain effects are included in the items that trigger lock-in.
I was doing the FFT move-or-attack system too. Going by your explanation I suppose I could make all moves undoable except for those that trigger effects like hazardous tiles and (hidden) traps. Though I'd need to keep track of whether any tiles locked out the movement undo when a player character moves. Also, a player may willfully move a character through hazardous tiles, where I'd still want some way to show the character's target ranges at the potential destination.
Hmm, I'm guessing those games either don't have randomness or keep the results? Otherwise I could see someone undoing an attack and redoing it until they got the desired result. Setting the seed at the start of the player's turn and also after they confirm an undoable action, and setting it back to the same seed whenever they undo would let you fix that.
Attacks aren't going to be undoable. I'm talking about showing what attacks a character could make after a potential movement path.
I'm working on a squad based, turn based game that has a similar issue. We solved it by making a look-ahead mode, where by pressing a button, you "project" the selected unit onto the tile you're hovering over, so you can see the attack range of your selected ability in the case you move your unit there. Releasing the button simply "cancels the projection". This way the player can check his ranges before commiting to the action, allowing him to tactically plan ahead.
I'm likely going to do something like this too.
Right now during a player character's turn, moving the mouse over a tile within the character's movement range shows move path, and clicking causes the character to move. I'm thinking of making two clicks on the destination necessary for a move, once to place the move arrow and again to perform the move. In between the two clicks I can show any target ranges at the destination tile (as well as allow the planned move to be cancelled).
In the four pictures here, it's the wizard's turn and he has a magic bolt spell. Clicking on a tile inside the blue movement range shows the movement arrow. Clicking on the magic bolt button shows the target range, though you can't select targets while there's a planned movement arrow. Clicking on the end of the movement arrow does the actual move.