Proof (or reference) about the cc-ness of termspace forcing Recall that for $P$ a forcing order and $\dot{Q}$ a $P$-name for a forcing order, the termspace forcing $T(P,\dot{Q})$ consists of minimal-rank names for elements of $\dot{Q}$, ordered by $\dot{q}'\leq\dot{q}$ iff $1_{P}\Vdash\dot{q}'\leq_{\dot{Q}}\dot{q}$. In his chapter in the Handbook of Set Theory, James Cummings states the following result:
If $\kappa$ is inaccessible, $P$ is $\kappa$-cc. and $\dot{Q}$ is forced to be $\kappa$-cc., $T(P,\dot{Q})$ is $\kappa$-cc.
and attributes it to the paper "More saturated ideals" by Matthew Foreman. However, I was unable to find the above statement in the paper. Later on, Cummings proves it, but only for measurable (or at least Jonsson) $\kappa$.
Is there a direct proof (or a different source) for the exact result above?

Edit:
Philipp Lücke in the comments gave an argument that the stated result is actually false. If $|P|<\kappa$ and $\kappa$ is weakly compact, it holds. So another interesting question would be:

Does the above statement hold for (not necessarily weakly compact) $\kappa$ if $|P|<\kappa$?

 A: The answer is consistently negative, and it seems likely that it is actually always negative.
Let us look at the property: for every $|\mathbb P| < \kappa$, if $\Vdash_{\mathbb{P}} \dot{\mathbb{Q}}$ is $\kappa$-c.c. then $T(\mathbb P, \dot{\mathbb Q})$ is $\kappa$-c.c.
It is known that for $\kappa$ which is weakly compact, this property holds.
Indeed, if $A = \langle \dot{q}_i \mid i < \kappa\rangle$ is an antichain, then for every $i < j$ there is $p\in \mathbb{P}$ such that $p \Vdash \dot{q}_i \perp \dot{q}_j$. This gives us a coloring of pairs of ordinals below $\kappa$ with $|\mathbb P|$ many color. As $\kappa$ is assumed to be weakly compact, there is a homogeneous set $H$ with a fixed color $p$. So $p$ forces $\langle \dot{q}_i \mid i \in H\rangle$ to be an antchain in $\mathbb{Q}$, contradicting the chain condition hypothesis.
Let us assume that this property holds. In particular, it means that the product of less than $\kappa$ many copies of a $\kappa$-c.c. forcing $\mathbb{Q}$ is $\kappa$-c.c.: Let $\mathbb{P}$ be the atomic forcing with $\theta$ many atoms, and let $\mathbb{Q}$ be a $\kappa$-c.c. forcing. Then, for every $\vec q \in \mathbb{Q}^\theta$ we can assign a name $\dot{u}$ which is forced to be $\vec{q}(\alpha)$ if and only if $\min G_P$ is the $\alpha$-th atom. Clearly, this gives us a way to translate an antichain in $\mathbb{Q}^\theta$ into an antichain in $T(\mathbb{P}, \check{\mathbb{Q}})$.
In the paper, "Knaster and friends I: Closed colorings and precalibers", by Lambie-Hanson and Rinot, they define the combinatorial principle $U(\kappa,\mu,\theta,\chi)$. Let us focus on the case $U(\kappa, 2, \omega, 2)$. They proved that this case (and stronger ones) holds for successor cardinals, or if $\square(\kappa)$ holds [so in $L$, it fails exactly for weakly compact cardinals].
Moreover, they show (for example) that $U(\kappa,2,\omega,2)$ implies the existence of a $\kappa$-c.c. forcing which its $\omega$-th power is not $\kappa$-c.c., and they conjecture that $\neg U(\kappa,2,\omega,2)$ implies that $\kappa$ is weakly compact.
