Consider a point in cartesian and polar coordinates, $P = \{x,y\} = \{r,\theta\}$, such that $x = r \cos\theta$ and $y = r\sin\theta$, where $r$ is a radial distance that is not necessarily unity. I have an arbitrary vector (e.g. a velocity vector) at point $P$, and I know it's cartesian coordinates, $\vec{v} = a^i e_i = a^0 e_0 + a^1 e_1$, where $e_i = \{\hat{x}, \hat{y}\}$, and I want to find the components in a bases that is the polar tangent vectors, $e'_i = \{\hat{r},\hat{\theta}\}$, i.e. $\vec{v} = a^{\prime i} e'_i = a^{\prime 0} e'_0 + a^{\prime 1} e_1$.
(Ultimately I need to do this exercise in 3D spherical coordinates, and do a couple of coordinate rotations in between, but I think this case encompasses my [current] confusion).
Attempt:
I can define a transformation between coordinates based on, $$e'_j = e_i \, {S^i}_j = e_i \frac{\partial e'_j}{\partial e_i},$$
i.e. a covariant transformation. For example, $e'_0 = \hat{r} = \frac{\partial}{\partial r} = \frac{\partial}{\partial x} \frac{\partial x}{\partial r} + \frac{\partial}{\partial y} \frac{\partial y}{\partial r}.$
Thus the tensor that transforms the bases $\{\hat{x},\hat{y}\} \rightarrow \{\hat{r},\hat{\theta}\}$, can be calculated as
$${S^i}_j = \pmatrix{\frac{\partial e'_0}{\partial e_0} & \frac{\partial e'_1}{\partial e_0} \\ \frac{\partial e'_0}{\partial e_1} & \frac{\partial e'_1}{\partial e_1}} = \pmatrix{\frac{\partial r}{\partial x} & \frac{\partial \theta}{\partial x} \\ \frac{\partial r}{\partial y} & \frac{\partial \theta}{\partial y}} = \pmatrix{\cos\theta & -\frac{1}{r} \sin\theta \\ \sin\theta & \frac{1}{r} \cos\theta},$$
and the values of $\{r,\theta\}$ here are, again, fixed based on the point $P$. Using this, we immediately get, $e'_i = \{\hat{r}, \hat{\theta} \} = \{\hat{x}\cos\theta + \hat{y}\sin\theta, \,\, - (\hat{x}/r)\sin\theta + (\hat{y}/r) \cos\theta \}$, which matches what I get from geometry. So this seems good.
The components of the vectors transform contravariantly, and so the transformation should be given by, ${T^i}_j = \partial e_j \, / \, \partial e'_i$ (NOTE: is this still true, in non-orthonormal bases?). Going through the same procedure, I find the components of the tensor that transforms the coordinates (transposes because these are 'columns') $\{a_0,a_1\}^T \rightarrow \{a'_0, a'_1\}^T$ as,
$${T^i}_j = \pmatrix{\frac{\partial e_0}{\partial e'_0} & \frac{\partial e_1}{\partial e'_0} \\ \frac{\partial e_0}{\partial e'_1} & \frac{\partial e_1}{\partial e'_1}} = \pmatrix{\frac{\partial x}{\partial r} & \frac{\partial y}{\partial r} \\ \frac{\partial x}{\partial \theta} & \frac{\partial y}{\partial \theta}} = \pmatrix{\cos\theta & \sin\theta \\ -r \sin\theta & r \cos\theta}.$$
Now if we try this, we immediately get a problem: $a^{\prime i} = \{x\cos\theta + y\sin\theta, \,\, -rx\sin\theta + ry\cos\theta \}^T$. The $0$th component seems fine, but the $1$th has the wrong dimensions: length squared instead of dimensionless! So it seems like this $T$ tensor should actually be transposed... but then it no longer seems to represent a contravariant transformation.
Am I missing a transpose somewhere? Or am I assuming an orthonormality somewhere where it doesn't exist? Rows-vs-columns, and left-vs-right matrix multiplication has always confused me, so I'm primarily following the indices and their positions, but I've still tried to be consistent with rows and columns. One "reason" to add a transpose, however, could be that while the inverse matrix should transform the components (as apposed to bases), the components are 'columns' while the bases 'rows', so perhaps that adds a transpose? But where does this come from in index notation? Any help or pointers (even on improper terminology / syntax) is much appreciated!