It depends. In cases when the story is not plot-driven, it might even be the desired effect for the twist to be unexpected.
Lets say you are writing a drama novel about the life of a fictional entrepreneur. You go through the significant events that got him here, creating his startup. Finally everything seems to be going smoothly and John is just about to fly to SV to pitch his product in front of a crowd of VCs. Funding is the remaining piece of the puzzle and with what he has to offer, success is imminent. Suddenly, he receives a call with terrible news. His six years old daughter is in critical condition after being hit by a car. From there you can end on how he goes to the hospital, she dies, he falls into despair and gives up on everything, including the company that was so far central to the story.
Did you need to foreshadow the accident? Not really. There is no way the protagonist or anyone in the story's universe could have anticipated it. Accidents just happen without warning. The novel was never about the final resolution of some conflict. It was about the thoughts, feelings and actions of a man experiencing the ups and downs on his journey. The journey just happened to end on a hefty down.
Another example is in comedy writing. No one laughs at predictable puns. As long as you set up the right tone, the more bizarre (or even world breaking) a twist is, the more effective it can be.
On the other hand, it can be very frustrating if the plot is the driving factor, yet you pull something out of your buttocks in the last moment.
Picture a murder mystery that ends with a person that was never introduced calling the detective and saying "Hey, last night I was very drunk. I now notice that I brought a bloodied bat home. I don't remember much of what happened, but I want to to turn in and cooperate." Complete disaster.
Or a classic fantasy story that ends with the benevolent old wizard completing the young protagonist's quest by waving his staff and defeating the evil warlock on the other side of the world (Deus ex machina).
It's all about what you want your narrative to revolve around, making that clear to the reader early on and fulfilling said promise. Hence you don't even need to have a twist, as long as you have set up that expectation and there is something else worth while.
As for how much to reveal and what the reaction is, I'm going with the assumption that the twist is essential to the story.
- If you give them all the details and they figure it out well before the ending, they (1) feel a bit bored until they reach it and (2) think the plot wasn't particularly clever (to put it lightly) when they do.
- If you give them everything needed early on and they don't unravel it, they (1) are filled with a sense of curiosity and speculate along the way and (2) think it was pure genius when it's revealed. Needless to say, it's very hard to accomplish and you run the risk of falling into the first category instead.
- If you give them most of the information very close to the actual twist, it much depends on the overall tone so far and whether or not said information makes it painfully obvious. Depending on that, you might approach danger territory here or it might just be an exiting new turn.
- If you feed them bits gradually and the final bit is not disproportional, but simply before the ending - you hit the gold spot. Readers that didn't figure it out will react as if you gave them something from the second category. Readers that did will be engaged along the way and feel rewarded for their efforts once they reach it.