The true test being that the new claim "arises from the same set of operative facts." This means a federal court hearing a federal claim can also hear substantially related state law claims, thereby encouraging efficiency by only having one trial at the federal level rather than one trial in federal court and another in state court. However, if the case is brought as a diversity action (i.e., the basis for federal jurisdiction is that each defendant comes from a state different from each plaintiff), there generally is no supplemental jurisdiction if such claims would destroy complete diversity.
The core test involves whether the new claim "derives from the same factual context." This suggests that a federal court dealing with a federal case can also address closely related state law claims, enhancing efficiency by holding one trial in federal court rather than separate trials in both federal and state courts. Nonetheless, if the case is brought as a diversity action (where jurisdiction hinges on defendants being from different states than plaintiffs), there usually isn't supplemental jurisdiction when such claims could jeopardize complete diversity.