Conversation component demo
A worked example of fixing a bug in a WinForms app:
claude — InvoiceForm fix
You
The invoice total in InvoiceForm is wrong when a discount and tax both
apply. Find the cause and fix it.
Claude
Let me look at how the total is calculated.
Read
src/Forms/InvoiceForm.csFound it — the discount is applied to Subtotal twice: once before tax and
again in RecalculateTotal(). I’ll remove the duplicate.
Edit
src/Forms/InvoiceForm.csBash
dotnet test --filter InvoiceTestsResult
Passed! - Failed: 0, Passed: 14, Skipped: 0
Fixed. The discount now applies once, before tax, and all invoice tests pass.