With that sort of SFO layover, I generally take BART to town, ride a cable car (tourism value; photo ops) to Fisherman's Wharf and have a good meal at Scoma's or No. 9 Fisherman's Wharf. Then reverse the trip, perhaps with a brief shopping/dessert/whatever stop at Ghirardelli Square.
If it's morning, instead of Fisherman's Wharf get off the cable car in front of Buena Vista Cafe and stoke up on Irish coffee and breakfast (outstanding) before the next flight... then back on the cable car, up the hill, transfer to BART, and life back in the hands of UA.
Tom