Let $I$ denote the unit interval and $f:I\to I$ be a Borel measurable function. For each $n$ let $P_n$ denote the partition of $I$ defined as $$P_n= \left\{\left[0, \frac{1}{2^n}\right), \left[\frac{1}{2^n}, \frac{2}{2^n}\right), \left[\frac{2}{2^n}, \frac{3}{2^n}\right), \ldots, \left[\frac{2^n-2}{2^n}, \frac{2^n-1}{2^n}\right],\left[\frac{2^n-1}{2^n}, 1\right]\right\}$$ and let $\mathcal A_n$ be the $\sigma$-algebra on $I$ generated by $P_n$. Define $f_n=E[f|\mathcal A_n]$, where the conditional expectation is with respect to the Lebesgue measure.
It is known by the martingale convergence theorem that $f_n\to f$ pointwise a.e. and also in $L^1$.
Question. Are there some (nice) sufficient conditions on the nature of $f$ which ensure that the convergence above is in $L^\infty$ also?
Denote by $I_{n,j}$ the interval $\left[j2^{-n},(j+1)2^{-n}\right)$. Then $$ f_n(x)=2^n\sum_{j=0}^{2^n-1}\mathbb E\left[f\mathbf 1_{I_{n,j}}\right]\mathbf 1_{I_{n,j}}(x), x\in I. $$ If $f$ is continuous on $[0,1]$, then for all $x\in I_{n,j}$, $$ 2^n\mathbb E\left[f\mathbf 1_{I_{n,j}}\right]-f(x)=\frac1{2^{-n}}\int_{j2^{-n}}^{(j+1)2^{-n}}\left(f(t)-f(x)\right)dt$$ hence $$ \left\lvert f(x)-f_n(x)\right\rvert\leqslant \sup_{\substack{s,t\in [0,1]\\ \left\lvert t-s\right\rvert\leqslant 2^{-n}}}\left\lvert f(t)-f(s)\right\rvert $$ and uniform continuity allows to conclude.
However, in general, we cannot expect a convergence in $\mathbb L^\infty$. Let $t$ be an element of $I$ such that for all $n\geqslant 1$ and $0\leqslant j\leqslant 2^n-1$, $t\neq j2^{-n} $ (for example $t$ irrational). Let $n$ be fixed; then for some $j_0\in\left\{0,\dots,2^n-1\right\}$, $t\in I_{n,j_0}$. Therefore, letting $f=\mathbf 1_{[0,t]}$, we have $$ f_n(x)=\mathbf 1_{\left[0,j_02^{-n}\right)}(x)+2^n\left(t-j_02^{-n}\right)\mathbf 1_{I_{n,j_0}}(x), x\in I.$$ Let $J$ and $J'$ be the intervals defined respectively by $J:=\left[j_02^{-n},t\right)$ and $J':=\left[t, (j_0+1)2^{-n}\right)$. By the assumption on $t$, these intervals have positive measure and letting $u:= 2^n \left(t-j_02^{-n}\right)$, it follows that $$ \left\lVert f-f_n\right\rVert_\infty\geqslant \max\left\{\sup_{x\in J}\left\lvert f(x)-f_n(x)\right\rvert,\sup_{x\in J'}\left\lvert f(x)-f_n(x)\right\rvert \right\}\geqslant \max\{u,1-u\}\geqslant 1/2. $$