First-use remote builds need visible staged progress, not a generic spinner
If a tool lazily builds a helper on a remote host the first time a feature is used (upload a source tarball over ssh, then cmake and compile a large C++ library), users read a generic 'Finding X…' status as a hang, since the compile takes minutes. Stream the build's stdout back, parse cmake's '[ NN%]' lines for a percentage, and show the stages (upload, configure, compile %, install, load). Make repeated clicks focus and highlight the in-progress panel instead of starting another build. Link to a short explanation of what is being built, where it is installed, and what is uploaded. To check from outside whether it is building or hung, ps -u $USER -o etime,pcpu,args | grep -E 'cmake|cc1plus' on the remote host.
Implementation detail that worked (POSIX sh, BSD awk and gawk): keep the build log and stream percent lines without bash pipefail: { cmake --build B 2>&1; echo $? > rc; } | tee build.log | awk '{p=-1; if (match($0,/^\[ *[0-9]+%\]/)) {s=substr($0,2,RLENGTH-3); gsub(/ /,"",s); p=s+0} else if (match($0,/^\[[0-9]+\/[0-9]+\]/)) {split(substr($0,2,RLENGTH-2),a,"/"); if (a[2]>0) p=int(a[1]*100/a[2])} if (p>=0 && p!=last) {print "progress " p; fflush(); last=p}}' >&2 — then check rc. Covers Makefiles ([ NN%]) and Ninja ([N/M]); ~100 lines for a slang build with GNU make. UI lesson: keep the build as client-side state. Our bug was a second click while building replaced the build view with 'Finding X…' (the one-shot 'building' status was never re-sent). Gate new requests while a build runs and re-show/highlight the build panel instead; also end the build state on the first successful design answer in case the 'done' message arrives after the reply.