🚨 MISSING: one red ladybug
Last seen: top-left corner of my screen, top: 12px; left: 12px.
Height: 50vh. Width: exactly 360px, never one pixel more.
Distinctive marks: red border, an FPS graph, and a log that always got cut off right at the interesting part.
Last night I opened the core sandbox of BeeLadybug, my zero-dependency debug HUD, and... she was gone. 😱
The game was running. RUN tick 87852. The FPS were fine. But the panel? Vanished.
I panicked for about four seconds. Then I noticed a tiny red button sitting under the tick counter:
🐞 56.8 fps
She hadn't disappeared. She had curled up into a pill. 😹
🕵️ How it started: the 360px prison
For months, BeeLadybug lived in a box with a fixed width:
.bl-panel { width: 360px; max-height: 50vh; } Small enough not to steal space from the game. Also small enough that the EVENTS log was stuck at max-height: 140px, so every time I wanted to read the logs comfortably I had to press F8 EXPORT and open a file.
A debug tool that makes you export a file just to read a log line. Very efficient. 🙃
📏 Version 0.6.6: she learned to stretch
First escape attempt: let the panel grow.
.bl-panel { width: 360px; min-width: 340px; max-width: 90vw; max-height: 90vh; resize: both; } resize: both gives you that little handle in the bottom-right corner, like a normal window. Drag it, and the EVENTS log grows with the panel.
But on a phone you can't really grab that handle with your finger, so there's also a WIDE / COMPACT button next to LIVE:
#toggleWide() { const panel = this.#els?.panel; if (!panel) return; this.#wide = !this.#wide; const width = Math.min(this.#wide ? PANEL_WIDE : PANEL_COMPACT, this.#widthCap()); panel.style.width = `${Math.round(width)}px`; // ... } 360px ↔ 680px, never more than 90% of the screen. And a ResizeObserver redraws the FPS graph at the new size, so the line stays sharp all the way to the edge.
🫠 Side effect: the pancake ladybug
Of course, the first thing I did was drag the handle the wrong way.
I pulled it up... and up... until BeeLadybug was squashed into a thin red strip: just the header, LIVE, WIDE, PILL, and that tiny diagonal handle in the corner looking at me like "happy now?" 😹
Nothing was broken. Grab the handle at the bottom-right, pull it down, and the EVENTS log comes back. And yes, she remembers the pancake size too, so if you squash her, she stays squashed until you fix it. 🥞🐞
💊 Version 0.6.7: she learned to hide
Then came the dangerous part. The panel can now be dragged from its header (pointer events, so fingers work too) and stays inside the screen.
And there's a PILL button. One click, and the whole HUD shrinks to a tiny pill with the ladybug mark and the FPS. Click the pill and the panel comes back, in the same place, at the same size.
#setPill(on) { // ... this.#pill = on === true; this.#applyChrome(); this.#moveEl(el, left, top); this.#rememberLayout(); } 🧠 The plot twist: she remembers everything
This is why I thought she was gone. BeeLadybug now remembers how you left her:
const data = { width: Math.round(width), height: this.#layoutHeight, wide: this.#wide === true, left: Number.isFinite(this.#layoutLeft) ? this.#layoutLeft : 12, top: Number.isFinite(this.#layoutTop) ? this.#layoutTop : 12, pill: this.#pill === true }; try { if (typeof localStorage === 'undefined') return; localStorage.setItem(PANEL_STORE_KEY, JSON.stringify(data)); } catch { /* private mode, sandboxed frame, or a full quota */ } I had turned her into a pill earlier, then switched to another example (DOM, CSS hunt, Python...), and she stayed a pill everywhere. Loyal. Stubborn. A real ladybug. 🐞
(And if the storage is blocked, the panel just starts normally. No drama.)
✅ Case closed
-
npm test: 77 tests, 77 passing -
npm run lint: clean -
npm run typecheck: clean - Public API (
index.js,index.d.ts): untouched
Small changes, just CSS and a bit of UI, but now I can read my logs without exporting a file, move the HUD out of the way, and hide it when I just want to play.



