In the movie Star Wars: Revenge of the Sith, I am wondering why Darth Sidious didn't detect Yoda's presence inside the Galactic Senate building until Yoda walked into his office and also as to why he was surprised by Yoda coming there.
Darth Sidious was someone who liked to brag a lot about how he was able to foresee future events, so its a bit of mystery to me as to why he was surprised by Yoda coming there and also as to why he hadn't foreseen having such a huge battle with Yoda inside the Galactic Senate building.
I think this was a mistake on the part of George Lucas. I think the way he should have written this scene in the movie is that Yoda walks into his office, takes out the two guards, Darth Sidious then turns his chair towards Yoda and says, "Master Yoda, you survived just like I had foreseen. You should not have come back here, I highly suggest that you surrender!" Yoda refuses and the two of them go on to battle just like it was shown in the movie.
Why didn't Darth Sidious detect Yoda inside the Galactic Senate building before Yoda walked into his office?