So I've covered those situations where the bike really has a serious, pretty much fatal problem. As I said, often that's pretty straightforward, and the owner can understand that it's time to move on. More difficult though, are the tougher cases (forgive me sounding like a doctor)... the ones where the bike needs SO much work that it's debatable whether or not it makes sense to go ahead with it.
The things that come into play here are typically: the sentimental value of the bike, cost of the repair vs. monetary value of the bike (and for want of a better way to phrase it "what will I end up with at the end of spending x amount of dollars on this bike?"), and finally the age of the bike and where it fits in the evolution of bicycle technology,
To start with, I often ask customers, when I've examined their bike and found it needs a lot of work, just how much sentimental value there is to the bike. To many people, a bike is simply a form of recreation or transportation (or both) with no really emotional attachment involved. In those cases, it's pretty easy to lay out the other factors and let them weigh their choices and make a decision.
Where sentiment is involved, it's a bit trickier, and I have to often remind myself that rationality is not necessarily a factor. Luckily for those customers, they have an understanding partner in me... I have a bike that I bought 27 years ago today, and I wouldn't part with it for the world, even if it required major, hugely expensive work. Granted, I'm pragmatic enough to keep in mind the possibility that one day it will suffer some fatal failure, and I'll have to retire it to the status of "wall art" or some other purely sentimental state. But I love that bike, and I can understand why others might feel the same way about theirs.
Another example... a gentleman came in last summer with a very neglected old road bike from the 70s, a Soma I believe. It was crusty with dirt and oxidation, and the paint looked awful. It desperately needed a thorough overhaul and a number of new parts. In many cases, the customer would have just said "oh, never mind, that's just too much"... but this fellow had bought the bike in college and had many, many fond memories wrapped around it. So we talked about it, figured out what made the most sense to get it ridable again, without getting too insanly expensive, and he went away happy, knowing his trusty mount would be saved.
So if you are presented with a "not quite dead" diagnosis, the first question to ask yourself is "how emotionally wrapped up am I with this bike?" That will help inform your choice in light of the other factors, and may even answer the question regardless of the other factors.
You also have to weigh the value of the bike (or the cost of replacing it) with the cost of the repair. Generally speaking, the more you paid for the bike initially, the more likely it is that it makes sense to have the work done. To illustrate, I work in a shop that is an odd mixture of your "small, friendly, family-oriented shop" and "high-end recumbent and folding bike enthusiast shop". A fairly common major repair is a complete or partial drive train replacement. As you may know, over time the chain and other parts of the drive train wear out and need to be replaced. A typical cost for a complete drivetrain replacement on a high end recumbent can easily run into $200 just for parts, while a similar job on something you bought at Wal-Mart would set you back something more like $75-100 in parts. However, the replacement cost for the entire bicycle in the first case is going to be upwards of $1500 typically, while the Wal-Mart special can probably be replaced with a similar bike for around $150. Added into that is the fact that the rest of the bicycle in each case is vastly different, both in ride quality and longevity. If you spend the $200+ on the 'bent (or a similarly high end bike of any kind), the other parts of the bike will continue to hold up well for a long time, assuming reasonable service and treatment. And the bike will ride "as good as new" with the new drive train. On the other hand, given the low quality of parts on a Wal-Martesque bike, once you've replaced the drive train, the rest of the bike is unlikely to hold up and last a long time, and I promise you, the ride quality, even when new, is nothing like that of a fine bicycle.
That's not to dismiss such bikes entirely. As someone who works in an IBD (Independent Bicycle Dealer), I do feel you get a much better bicycling experience all around by buying a "real" bike from a "real" bike shop. Perhaps I'll go into the reasons why in another post, but for now, let's just accept that as my firmly held belief. Even so, depending on what you expect out of a bike, and how much riding you will do, and where bicycling fits into your life, the -Mart bike may be just fine for you. Just bear in mind that in most cases, barring a strong sentimental attachment, major repairs on such bikes quickly outpace the value of the bike and become unwise.
Another factor to take into account is the age of the bicycle and where it fits into the evolution of the bicycle. That may sound pretentious, but bicycle design does evolve and change over the years. Twenty-seven years ago, when I bought my Trek 414, such things as indexed shifting, integrated shift/brake levers (or "brifters" as some call them), carbon fiber frames and components, high quality/high performance wired on tires, and many other things were either nonexistent or considered highly exotic and rare. So when you look at repairing an older bike, you need to consider whether or not you wish you had the newer technology, and whether it is practical or even possible to upgrade to the newer gear on your current bike. Some upgrades are easy, and some even make a lot of sense depending on the nature of the repairs your bike needs.
For example, if you have been hankering for indexed ("click") shifting on your old early 80s mountain bike, and it needs a new chain and sprockets already anyway, and compatible modern parts are available, it may be a simple matter to swap out your shift levers for indexing ones while you're at it. On the other hand, you may find that such an upgrade becomes prohibitively expensive if your bike is really old or has unusual components. In such cases, think about how badly you want to move to newer technology, and whether or not it's time to just start over with a new bike. And listen to your mechanic, assuming you have one you feel you can trust. They will know what is compatible with what, and how big a job it would be to move you into the early 21st century.
So, to wrap up, when your bike has reached the point where it needs major repairs, you need to think about the monetary and sentimental value of the bike, and determine whether it makes sense TO YOU to get the work done. It's your bike, and only you can decide that. As your mechanic, I will try to point out the pros and cons, and if I really think you are headed the wrong direction, I'll try to find a way to let you know, kindly. Honestly, it's pretty easy... most folks who bring in a really rough bike know it's probably in bad shape, and know how attached they are to it, and I can usually figure that out from them pretty quickly.