I have a fix for the bartering bug.
For repair, you use the item on the anvil. Hold down the right shoulder and select the item in your inventory. When you look at the anvil, the X button should change to "Repair".