If however we're talking about the Singularity where artificial human-level intelligence is produced then I think this will be a more important discovery than fire or agriculture in the history of humankind. That means that we'll have produced machines that are as good or even probably better than humans at basically anything, from making coffee to driving a truck to being a bank teller to being a software developer. If we reach this point where humanity is basically obsolete then what happens?
I don't think the Singularity is as close as some people make it to be, I know AI is super hype these days but we've had AI winters in the past and they could happen again. I do believe that it's undoubtedly going to happen sooner or later however, be it in a year, a decade or a century. When it happens what are we going to do? Will it be the beginning of a heavenly post-scarcity world where super-intelligent machines take care of all our needs, freeing us to write poetry and do some soul searching or will it create an incredible amount of instability as all of humanity suddenly realize that whatever they want to do they can ask a machine to do for them and better?