Re: How do you write a brilliant ep like ULTIMATE COMPUTER but then go
While it was clear from "The Ultimate Computer" that the Federation Starfleet sustained loss of life during the wargames disaster, and that people were indeed upset while the M-5 was still a menace, there are a few things to consider...
1: the "joke" scene in the turbolift did seem odd, but we don't know exactly how long after the war games it took place. Was it a matter of hours? days? A couple weeks? It is not inconceivable that enough time had passed after the M-5 had been disabled that the period of mourning could have ended. I would not expect the Enterprise or the other ships to return to the space station immediately. Wesley was probably charged with boarding the Excalibur, looking for survivors, and determining if the ship could be salvaged. If a rescue/recovery operation were underway, the turbolift scene could have taken place weeks later.
This would not be inconsistent with 20th century naval analogies or what we saw in "The Doomsday Machine". Consider the Battle of Pearl Harbor and its aftermath. Survivors were found in the wrecked ships in the harbor. Even sunken battleships were floated, rebuilt and put back in service. If a ship as badly damaged as the Constellation is still able to support life, and Spock could not clearly detect life signs aboard her, then maybe it's possible Excalibur either had hidden survivors that sensors could not detect or that the survivors had somehow escaped.
2: We know there were casualties on at least two of the four other starships. Lexington had at least 53 dead. Excalibur certainly had more, but we can't be sure how many. Could Enterprise, Lexington, Hood and Potemkin have found Excalibur survivors trapped in the dead ship, Constellation-style? If so, this would have minimized casualties and given everyone involved cause for celebration. It would also explain how relaxed Kirk and crew were in the final scenes of the show. Maybe some of the survivors were either found on the derelict Excalibur or in escape pods that were already ejected from the dead ship. (It was never made clear in TOS if the Excalibur crew had a means to quickly abandon ship or if they all died in the engagement. It was also never made clear if Federation Starships had escape pods or other means of abandoning ship.)
3: If the casualties clearly mentioned in "The Ultimate Computer" as confirmed are any indication, there could be anywhere from 65 dead to 500 or more. We can't be sure. Consider this passage during the battle after Wesley's force pulls back and regroups:
UHURA: Captain, I'm getting the Lexington again. Tapping in on their message to Starfleet Command, sir.
WESLEY [on viewscreen]: All ships damaged in unprovoked attack. Excalibur Captain Harris and first officer dead. Many casualties. We have damage, but are still able to maneuver. The Enterprise refuses to answer and is continuing attack. I still have an effective battle force and believe the only way to stop the Enterprise is to destroy her. Request permission to proceed. Wesley, commanding attack force, out.
DAYSTROM: They can't do that. They'll destroy the M-5.
KIRK: You can save the M-5 if you talk to it and make it stop the attack.
Consider that at this stage if Commodore Wesley knew that the entire crew of the Starship Excalibur had indeed been killed, he obviously would have reported this to his superiors in this message. Yet Wesley did not do so.
It should also be noted that when Wesley's remaining ships regroup, they do not regroup around the Excalibur. Instead, we see the Excalibur adrift by herself (in both the original and "remastered" footage). So Wesley made a conscious command decision to withdraw from the engagement rather than immediately help the derelict Excalibur. This surely saved lives on the other ships.
It is not clear if Wesley has any communication with the Excalibur at the time he dispatches this message to Starfleet. Are communications ongoing, or erratic, or cut off? We don't know.
4: The Enterprise, with M-5 still in control, must make a pass in the Excalibur's direction in order to scan it and for Sulu to determine it "looks dead". So the M-5 sees the Excalibur is not a threat and then decides not to renew its attack on the derelict vessel. But why did the M-5 decide to approach the relatively nearby Excalibur if she appeared to be stopped in space? Could it be that Wesley ordered either the Hood or the Potemkin to quickly approach the derelict, locate and beam out all remaining survivors (the 22-man transporters would sure come in handy here) and then quickly retreat and rendez-vous with the Lexington and Hood? There's nothing in the dialogue to eliminate the possibility, is there?
If this were the case, perhaps less than 100 starship personnel died in the wargames disaster. This would be serious, and no doubt a cause for a period of both mourning and investigation, but if lives were saved and if the Excalibur was recovered and salvaged, then the mood of the wargames survivors could be tempered with relief and a determination to get on with the rescue and recovery.