Post History
The difference is that the first sentence doesn't have a tag. It's a line of dialogue followed by a complete sentence. The second sentence is dialogue followed by a dialogue tag. Your first set ...
Answer
#4: Attribution notice removed
Source: https://writers.stackexchange.com/a/16566 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#3: Attribution notice added
Source: https://writers.stackexchange.com/a/16566 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision
The difference is that the first sentence doesn't have a _tag_. It's a line of dialogue followed by a complete sentence. The second sentence is dialogue followed by a dialogue tag. Your first set of examples is punctuated correctly — when you use a tag, the dialogue ends in a comma, and the tag starts with a lowercase letter. This also applies to action tags.