The fact that you are using $K=\mathrm{Frac}(A)$ is misleading. The fraction field is only relevant because $K$ is the residue field of a point of $\mathrm{Spec}(A)$ — it is $k(\eta)$ for $\eta$ the generic point of $\mathrm{Spec}(A)$.
So, perhaps a more true-to-geometry way to write your formula is the following. Suppose that $A$ is a finite type $k$-algebra. Then,
$$\displaystyle \dim(A)=\sup _{x\in \mathrm{Spec}(A)} \mathrm{tr.deg}(k(x)/k).$$
What this also highlights is also that you have to use $\mathrm{Spec}(A)$ and not $\mathrm{MaxSpec}(A)$ — you really need ‘non-classical points’ (i.e., not $\overline{k}$-points) to get the correct answer.
With these comments in mind, then a similar formula holds in rigid geometry. If $k$ is a non-archimedean field, and $A$ is an affinoid $k$-algebra (i.e., a topological $k$-algebra which is topologically of finite type), then
$$\dim(A)=\sup_{x\in\mathrm{Spa}(A)}\mathrm{trc.deg}(k(x)/k).$$
Let me explain the notation here:
$\mathrm{Spa}(A)=\mathrm{Spa}(A,A^\circ)$ is the adic space associated to $A$ — this shows up, and not something like the Tate spectrum $\mathrm{Sp}(A)$, for the same reason as before: you need to consider all, in particular non-classical, points to get the right formula,
$\mathrm{trc.deg}(k(x)/k)$ is a topological variant of transcendence degree, which is defined as the minimum of $\mathrm{tr.deg}(L/k)$ where $L$ runs over subextensions of $k(x)/k)$ which are ‘algebraically dense’ — you can obtain $L$ from $k$ by applying the operation $\widetilde{(-)}$ (i.e., the topological closure of the algebraic closure) finitely many times.
Remark: Because $k(x)=k(y)$ if $x$ and $y$ are related by specializations/generalizations, you can also replace $\mathrm{Spa}(A)$ by its Berkovich space $\mathcal{M}(A)$.
I am not very familiar with Huber spaces, so let us maybe stick to the Berkovich side. If I understand correctly, you associate to each residue field k(x) a transcendence degree that takes into account the topology coming from its nonarchimedian norm.
Would you kindly give me a reference for this statement?
I have a follow-up question: in The case where k(x) is the fraction field of the Tate algebra, can it ever happen that the generators $x_1,\dots, x_n$ do not form a transcendence basis of the kind you described?
– Kemal Aug 05 '24 at 05:26