I respectfully dissent.
This case raises one issue, whether this was a lawsuit brought to enforce the governing documents. Relevant precedent, Kaplan v. Fairway Oaks Homeowners Association (2002) 98 Cal.App.4th 715 [120 Cal.Rptr.2d 158], and a commonsense examination of the record reveal that the trial court was right, it was such a lawsuit. I thus disagree with the majority’s holding on that issue.
I also disagree with the majority’s view on, to quote the opening paragraph, whether a “defendant’s successful invocation of the governing documents” *675would entitle it to fees under Civil Code section 1354, subdivision (f). Here, I say “view,” not holding, because the theory is not raised in this appeal and the discussion is dicta. The discussion is unnecessary, and, being dicta, has dicta’s common problems. It is difficult to understand and has the potential to be applied to situations the majority may not have contemplated.
I begin with Kaplan, which the majority cites, then ignores. In that case, the complaint alleged a violation of the Corporations Code relating to proxy and voting rights, but after an examination of what the case was actually about, the Court found that the “gist” of the action was to enforce the homeowners’ voting rights under the governing documents. (Kaplan v. Fairway Oaks Homeowners Association, supra, 98 Cal.App.4th at p. 720; see also Cutujian v. Benedict Hills Estates Assn. (1996) 41 Cal.App.4th 1379, 1388, fn. 2 [49 Cal.Rptr.2d 166] [gravamen of an action labeled “continuing nuisance” was enforcement of the covenants, conditions and restrictions (CC&R’s)].)
Here, although the cause of action came with a promissory estoppel label, appellants’ theory was actually based on Ocean Towers Housing Corporation’s alleged violation of its duty to repair appellants’ earthquake-damaged apartments and to restore those apartments to their original condition, a duty imposed by the governing documents. The gist and gravamen of the complaint was a violation of the governing documents. That, not the label, controls.
“How the party achieves the goal of enforcing the right in question is not determinative of the right to an award of attorney fees. . . . The impact of the litigation is.” (In re Head (1986) 42 Cal.3d 223, 228-229 [228 Cal.Rptr. 184, 721 P.2d 65] [Code Civ. Proc., § 1021.5, fees available to prevailing party in habeas corpus proceedings].)
“Gist” and “gravamen” are shorthand for the California primary rights theory, “under which the invasion of one primary right gives rise to a single cause of action.” (Slater v. Blackwood (1975) 15 Cal.3d 791, 795 [126 Cal.Rptr. 225, 543 P.2d 593].) “ ‘[T]he “cause of action” is based on the harm suffered, as opposed to the particular theory asserted by the litigant. . . . Even where there are multiple legal theories upon which recovery might be predicated, one injury gives rise to only one claim for relief.’ ” (Bay Cities Paving & Grading, Inc. v. Lawyers’ Mutual Ins. Co. (1993) 5 Cal.4th 854, 860 [21 Cal.Rptr.2d 691, 855 P.2d 1263], quoting Slater v. Blackwood, supra, 15 Cal.3d at p. 795.) “[T]he nature of a cause of action does not depend on the label the plaintiff gives it or the relief the plaintiff seeks but on the primary right involved.” (Bird, Marella, Boxer & Wolpert v. Superior Court (2003) 106 Cal.App.4th 419, 427 [130 Cal.Rptr.2d 782].) The caption of the complaint or the particular theory adopted by the pleader is immaterial.
*676It is clear from the allegations in this complaint that the primary right appellants actually sought to enforce was their right to have the damage to their apartments repaired and the apartments restored to their original condition, in accord with the governing documents. Under the guise of “promissory estoppel,” appellants sought precisely the relief available to them under the governing documents. Any judgment awarded under the promissory estoppel theory would result in the enforcement of those documents.
I now turn to the discussion of Palmer v. Agee (1978) 87 Cal.App.3d 377 [150 Cal.Rptr. 841] and its progeny. (I would also discuss Exxess Electronixx v. Heger Realty Corporation (1998) 64 Cal.App.4th 698 [75 Cal.Rptr.2d 376], but it is a Civil Code section 1717 case, in which the issue was whether tort causes of action were brought to enforce a contract. The issue is not an unusual one, but it has nothing to do with this case, or this discussion.)
In Palmer, the plaintiff was the owner of a mobilehome park, and landlord to defendant tenants. He initiated eviction proceedings under standard landlord-tenant procedures. The tenants moved for judgment on the pleadings on the ground that the landlord had failed to comply with the eviction procedures specified in the Mobilehome Residency Law. The trial court granted the motion and awarded fees to the tenants under a section of that law which provided for fees to the prevailing party “in any action arising out of’ that law’s eviction provisions. The Court of Appeal affirmed. After making some commonsense observations about the kind of game-playing landlords would engage in if the ruling was otherwise, the court held that “An action is not limited to the complaint or the document initiating the action but the entire judicial proceeding.” (Palmer v. Agee, supra, 87 Cal.App.3d at p. 387.)
Other courts have concurred in this analysis: Nassif v. Municipal Court (1989) 214 Cal.App.3d 1294, 1298 [263 Cal.Rptr. 195], considering the meaning of “action” for purposes of Code of Civil Procedure section 583.110 cited Palmer’s holding, and Sunkyong Trading (H.K.) Ltd. v. Superior Court (1992) 9 Cal.App.4th 282, 288-289 [11 Cal.Rptr.2d 504], which considered “action” under Code of Civil Procedure section 170.6, cited Nassif for the proposition for which Nassif cited Palmer.
“Generally an action is defined as a proceeding wherein one asserts a right or seeks redress for a wrong. ([Code Civ. Proc.] § 22.) An action is usually deemed to commence upon the filing of a complaint ([Code Civ. Proc.] §§ 350 & 411.10) and remains pending until the judgment is final. ([Code Civ. Proc.] § 1049.)” (Nassif v. Municipal Court, supra, 214 Cal.App.3d at p. 1298.)
*677These cases tell us that even if—and that is not the case here—respondent had sought fees based on a governing-documents demurrer, it would be entitled to fees if it prevailed.
The majority seeks to distinguish Palmer from this case based on the purported difference between an “action to enforce” and an “action arising from.” I find the discussion overly clever and hypertechnical. These are attorney fee provisions, similar to countless statutory and contractual attorney fee provisions. Such provisions should be interpreted broadly and liberally. (Milman v. Shukhat (1994) 22 Cal.App.4th 538, 545 [27 Cal.Rptr.2d 526] [Civ. Code, § 1717 mutuality]; Kaplan v. Fairway Oaks Homeowners Association, supra, 98 Cal.App.4th at p. 719.) Their only possible purpose is to discourage litigation by providing that when two parties get into in a lawsuit over the matters subject to the contract or statute, the winner gets fees. I simply cannot imagine that a lawyer or legislator ever reached the considered opinion that it was right and just that in some circumstances the party who files, but not the party who defends, may recover fees. What kind of sense would that make, if the context is not a laboratory analysis of language, but the ordinary lives of people, organizations, and their lawyers? None.
A search of the legislative history shows no trace of such an intent. Those legislative documents which mention the attorney fee provision in Civil Code section 1354 (the clause was added as part of a bill which primarily concerned solar energy) describe the provision as one which awards fees to the prevailing party “in any litigation to enforce” the CC&R’s (Sen. Rules Com., Off. of Sen. Floor Analyses, 3d reading analysis of Assem. Bill No. 3689 (1989-1990 Reg. Sess.) Aug. 23, 1990, par. 4; Sen. Housing and Urban Affairs Com., com. on Assem. Bill No. 3689 (1989-1990 Reg. Sess.) Aug. 2, 1990, par. 4.), or “in any action to enforce restrictions affecting common interest developments.” (Assemblyman Hauser, sponsor of Assem. Bill No. 3689, letter to Governor, Aug. 28, 1990, p. 2.)
Finally, the majority’s narrow reading of “action” seems to me to have the potential to unnecessarily confuse what are not, at the moment, confused issues. Does the majority suggest that a plaintiff who files a writ of mandate seeking to compel a board to act under the governing documents, and is successful, is not entitled to fees? After all, a writ is not an “action,” it is a special proceeding. Suppose the governing documents established a statute of *678limitations on suits against the board, and a board successfully moved for summary judgment on that ground? As I read the majority, that board would not be entitled to fees. Where is the logic in that result? I can see none, and would confine this opinion to a simple affirmance of the trial court’s straightforward ruling.
A petition for a rehearing was denied September 9, 2004, and respondent’s petition for review by the Supreme Court was denied December 1, 2004.