Spaces:
Running
Fix logo flash and iframe-resizer infinite-scroll on Spaces
Two UI bugs visible on the deployed Space (not locally):
Logo flashes big then becomes tiny.
gr.Imagewas rendered at its default size, then shrunk to 40px once the injected<style>fromgr.HTMLwas parsed. Fix: passheight=40, width=40togr.Imageso the component is inline-sized at the first paint, before any CSS needs to apply.Page scrolls to infinity, chat UI unusable. Classic feedback loop between
html, body { height: 100vh }and the HF Spaces iframe-resizer: the iframe grows tobody.scrollHeight, which causes100vhto grow, which makes the body taller, which grows the iframe again.overflow: hiddendoes not break the loop becausescrollHeightreports actual content size, not clipped visible size. Fix: drop100vhon body and pingradio-appwithposition: fixed; inset: 0;so the app is removed from document flow โbody.scrollHeightstays ~0 and the iframe never grows. The app still visually fills whatever size the iframe gets from its parent.