Let $A,B\in \mathbb{C}^{n\times n}$ and $[A,B]=0$. Let the set of eigenvectors of $B$ with eigenvalue $\beta^{(i)}$ be denoted by $\{\underline{b}_j^{(i)}\}$. We can construct the $i$-th projector via the outer product $$ P_i \doteq \sum_j^{g^{(i)}} \underline{b}_j^{(i)}\left(\underline{b}_j^{(i)}\right)^{\dagger}, $$ where $g^{(i)}$ denotes the degeneracy of the $i$-th eigenvalue.
Is it true that, with the projector defined as above $$ \Lambda_i \doteq P_i^{-1} A P_i = \cdots \oplus A_i \oplus \cdots, $$ i.e. $A_i$ is the $i$-th block of the block diagonal representation of $A$ such that $$ \Lambda \doteq P^{-1} A P \doteq \sum_i P_i^{-1} A P_i = A_1 \oplus \cdots \oplus A_i \oplus \cdots \oplus A_n = \begin{pmatrix} A_1 & \cdots & 0 & \cdots & 0\\ \vdots & \ddots & \vdots & \ddots & \vdots \\ 0 & \cdots & A_i & \cdots & 0\\ \vdots &\ddots & \vdots & \ddots & \vdots\\ 0 & \cdots & 0 & \cdots & A_n \end{pmatrix}, $$ where $A_i \in \mathbb{C}^{g^{(i)}\times g^{(i)}}$?
Yes. If $B$ has the above eigenbasis, in that basis, $[A,B]=0$ gives $\lambda_j A_{ij} - \lambda_i A_{ij}=0,$ where $A_{ij}$'s are the block matrices, so the block is identically $0$ for $A_{ij}$ with different $i$ and $j$.