On the morning of July 16th, 1945 the United States successfully detonated the first atomic bomb. On July 17th, Truman, Churchill, and Stalin met at the Potsdam Conference to discuss Japan and post-war Europe and Asia. A diplomatic summit of such gravity would warrant as much preparation as possible, but with Truman being sworn in as President on April 12th and Byrnes being appointed Secretary of State on July 3rd, the United States had limited time to prepare. And the massive shift in military power caused by possession of the atomic bomb would likely alter the negotiation strategy of the Americans significantly. What was the original American plan for the conference, and did the success of the atomic bomb change that plan? On July 24th, near the close of the conference, Truman famously told Stalin that the United States possessed the atomic bomb. Was this an improvised action or was it planned? And I’ve read that this news apparently didn’t surprise Stalin. I know the Soviets had become aware of the American, British, and German nuclear weapons programs in 1942, but they were 4 years away from their own atomic bomb at the time. How much did the Soviets actually know about the Manhattan Project immediately before the Potsdam Conference? And did they learn about the successful detonation before being told about it by Truman, or did it simply fall within their predicted timeline?
Truman was immensely interested and excited by the successful test of the atomic bomb. Prior to the test, it did not in any meaningful way factor into his planning for the end of the war, except in one interesting area: Truman appears to have delayed the beginning of the Potsdam Conference as much as he could, to see if the test was successful. An associate of Truman's reported that on the way to Truman, the latter was heard to have remarked, "If it explodes, as I think it will, I'll certainly have a hammer on those boys (Russia as well as the Japs)." So he appears to have seen the results as having diplomatic import, but only if it was not a "maybe" thing.
After its test, it moved from a "maybe" to a "real" thing for him, and the fact that it was several times more powerful than was predicted very much stimulated his thinking. According to witnesses there (Stimson in particular) Truman read aloud Groves' memo on the test several times, and throughout his life whenever he would talk about the bomb he would paraphrase memorized parts of the memo (such as the fact that the entire explosion came from a mere 13 lbs of fuel, which Truman was clearly captivated by; it is an amusing aside that this fact was classified for many, many years, yet Truman referenced it several times in public talks, to the consternation of the Atomic Energy Commission).
Anyway, what actions at Potsdam can we attribute to the atomic bomb? Generally, Truman adopted a "tougher" attitude towards Stalin according to those who witnessed him. Truman himself thanked Stimson for giving him the news (and watching over the bomb project) because it gave him "an entirely new confidence." Churchill reported Truman was "immensely more fortified...and he stood up to the Russians in a most emphatic and decisive matter," and McCloy noted in his diary that, "The Big Bomb stiffened Truman and Churchill after getting Groves’ report. They went to the next meeting like little boys with a big red apple secreted on their persons."
What did this translate into? One was Truman informing Stalin about the bomb. While not improvised per se, it had not been extremely well-planned. The idea that the Soviets should be told something had been emphasized by Manhattan Project advisors for a long time, and Stimson pushed it very hard on Truman. Truman did eventually agree to do it, but not to tell them much (he didn't tell them it was an atomic bomb; Stalin immediately knew what it was though, because the Manhattan Project had been penetrated by several well-placed spies/moles — Stalin likely knew much more about the development of the atomic bomb than Truman did, and for a longer time). But to answer your specific question: the Soviet spies had reported that a test of the bomb was pending. When Stalin heard Truman's cryptic discussion of a "new weapon," he immediately understood Truman to mean that the test had been a success. He could not have gotten that information from the spies in that amount of time (the spies did not have anything like a "hotline" to Soviet intelligence; they met with their couriers on a regular basis, and the couriers then gave the information to the Soviet intelligence agents in the US, who sent them back to Moscow).
The major area of "transformation" though is Truman's attitude toward Soviet entry into the Pacific War. One of the original goals of Potsdam was to secure commitments from the Soviets that they would renounce their neutrality and declare war on the Japanese, because it was felt that this would end the war very swiftly. After the news of the test, Truman began hoping the atomic bomb would allow the war to end prior to Stalin's renunciation of neutrality with the Japanese, because that would deny the Soviets key holdings in the Far East. ("I was not willing to let Russia reap the fruits of a long and bitter and gallant effort in which she had had no part," he later wrote.) Related to this was the deliberate cutting of the Soviets out of the Potsdam Declaration, to Stalin's surprise and annoyance.
Relatedly, Truman seems to have been even less willing to give concessions to the Japanese than he had before. Despite most of his advisors (and Churchill) recommending that the Potsdam Declaration address the postwar question of the Emperor (because they knew from the intercepted MAGIC decryptions that this was a sticking point in surrender discussions by the Japanese high command), Truman dug in, making it clear he wanted the Japanese to grovel. One can interpret this as Truman feeling he had a real trump card now: he did not need to search for ways to make ending the war easier, because he could do it with sheer threat and force. This is a somewhat different perspective than they had prior to the bomb test, although one would not want to overstate this.
Scholars have debated whether the atomic bomb was the "origin point" of the Cold War, specifically at Potsdam, in the way that it caused the US to react in a more forceful way with the USSR, and the USSR interpreting this (correctly) as reflecting that the US felt that with the acquisition of atomic weapons, it no longer required the wartime alliance for either the short or the long term. I think perhaps too much emphasis can be put on this point — relations between the US and USSR were souring well before the Trinity test, and may have been doomed to sour anyway even if someone less hostile to the Soviets than Truman had been President, due to the difficulties of reconciling Soviet and American interests in the postwar — but one can document some effect in this respect, for sure. One can also see a "hardening" of the US position towards the Japanese as well as a result of the Trinity test, as a result of a confidence that the end of the war was close at hand.
The two most useful references on this are Tsuyoshi Hasegawa's Racing the Enemy: Stalin, Truman, and the Surrender of Japan (Harvard University Press, 2005), and Barton Bernstein's "Roosevelt, Truman, and the Atomic Bomb, 1941-1945: A Reinterpretation," Political Science Quarterly 90, no. 1 (Spring 1975), 23-69. Also useful, though somewhat superseded by Hasegawa's scholarship in many points, is Martin Sherwin, A World Destroyed: Hiroshima and the Origins of the Arms Race (Vintage Books, 1987).