Delete the comma.
Now you’re done. Yay!
Yes, I know that if you were taught to figure out comma placement by just looking for verbs — any verbs — and separating them, this example is punctuated “correctly.” However, there are big problems with that method, because not every verb is the predicate for a complete sentence. (I try to avoid jargon — I hate it, personally, because it means something only to people who already know these things — but sometimes I have to go into a bit of the “hard stuff,” beyond noun and adverb and compound sentence. I guarantee that any other reliable source of grammar-and-punctuation advice, such as the Grammar Girl website, would tell you the same thing about this example sentence: Don’t put a comma in it.)
In the example, they had spent so long trying to hide just describes magic; that part may look like an independent clause (complete sentence on its own), and it could be in some other context, but it isn’t one here. You have to consider how words are being used in context, not just what parts of speech they appear to be when standing alone on a page… and that is why computer programs cannot edit/proofread as well as a live human (or reasonable substitute for same) with a good understanding of how written English works.