In The Rising Sea, Vakil states the following right before exercise 8.3.B (p. 231):
Following Grothendieck’s philosophy of thinking that the important notions are properties of morphisms, not of objects, we can restate the definition of quasicompact (resp. quasiseparated) scheme as a scheme that is quasicompact (resp. quasiseparated) over the final object $\operatorname{Spec}\mathbb{Z}$ in the category of schemes.
It is clear to me that if $X\to \operatorname{Spec}\mathbb{Z}$ is quasicompact (resp. quasiseparated), then X is quasicompact (resp. quasiseparated), since $\operatorname{Spec}\mathbb{Z}$ is affine. It is also clear that if $X$ is quasiseparated, then the morphism is quasiseparated, since every open subscheme of a quasiseparated scheme is also quasiseparated.
The problem is that I am not sure how to verify that if $X$ is quasicompact, then the morphism $X\to \operatorname{Spec}\mathbb{Z}$ is quasicompact. This is clear if $X$ is noetherian, but I can't see why it holds in general.
Related question that may be useful to solve my problem: how does $\operatorname{Spec}\mathbb{Z}$ behave? Is it true that every open subscheme of this scheme is affine? Is every affine open subscheme of the form $\operatorname{Spec}\mathbb{Z}_f$?