An on-device terminal over /exec, the draggable sphere launcher, polling robustness.
Date: 2026-06-08 Commits: a17adc6, 5a3d038, 9f00e29, c1d0447, d9b8b71, 6152ab1, 65f30de, a38dcd7, 69e8990, 54a9ab0, a39b53c, 8f30720, edb88d0, 5db9676 Theme: Give Selim and Atilla a remote control room for the headless Pi, and turn the home screen into a fast launcher - while hardening the polling that keeps it all live.
The device lives in a car with no keyboard. Debugging it (checking disk, memory, syslog, rebooting) meant SSH. This session put a terminal *in the app*, made the home screen a draggable launcher, and fixed the connection polling that everything depends on.
a17adc6, 5a3d038, 9f00e29, 54a9ab0)What. Hardened the /status polling: cache the base URL, thread an AbortSignal through fetchStatus, abort the previous request before starting a new one, widen the interval to 8s, and invalidate the URL cache when the device host changes.
Why / the bug. The original polling fired overlapping requests on a slow link; a stale in-flight request could land *after* a newer one and flip the UI back to a wrong state (connected โ disconnected flicker). Changing the device IP also didn't take effect because the old base URL was still cached.
How. Each poll tick creates an AbortController and aborts the previous one, so only the latest request can resolve. The base URL is cached in module memory and explicitly invalidated (invalidateBaseUrl()) on host change. The interval moved to 8s to cut churn.
Purpose / goal. A connection indicator you can trust. Everything else in the app keys off "are we connected?", so this had to be correct, not flickery.
/exec + DevScreen (a39b53c, 5db9676,69e8990, a38dcd7, 65f30de)
What. A POST /exec endpoint on the device (api/routes/exec.py) and a DevScreen terminal UI with quick-command buttons (Shutdown, Reboot, Disk Usage, Memory, Syslog) plus a free-text command field, added as a fifth bottom tab.
Why. The Pi is headless and often physically out of reach (in a car). When it misbehaves, the team needs to run shell commands without SSH - from the phone they already have in hand.
How. DevScreen POSTs { cmd } to /exec; the device runs it and returns { output, error }, rendered in a scrollable dark terminal view. The tab only appears when the device is connected. Registered in MainTabParamList and the tab navigator with a code-outline icon.
Purpose / goal. A field debugging console for Selim and Atilla - the practical tooling that makes an out-of-reach appliance maintainable.
Security note. /exec runs arbitrary shell commands on the device. It is a
developer convenience scoped to the local device API on a trusted link; it must
be locked down (or removed) before any public release. Flagged here so it isn't
forgotten.
d9b8b71, c1d0447, 8f30720, edb88d0,6152ab1)
What. AppShortcuts rewritten as floating, draggable spheres that snap to the screen edge - an absoluteFill overlay on Home - wrapped in GestureHandlerRootView, with a staggered float animation.
Why. A car app is glanced at and poked at one-handed. Fixed menu rows are fiddly; big, physical, draggable targets that the user can park wherever suits their grip are far more usable in motion. It's also the app's signature visual.
How. Each sphere floats via withRepeat(withSequence(...)) with a per-sphere phase offset (so they don't pulse in sync). A Gesture.Exclusive(tap, pan) distinguishes a tap (finger moves < 8px) from a drag; on pan end the sphere snaps to the nearest left/right edge and clamps its Y within the safe area. The whole app is wrapped in GestureHandlerRootView so gestures work. An early scan-line overlay was removed and the shortcuts were moved outside the ScrollView so dragging wouldn't fight scrolling (6152ab1).
Purpose / goal. A tactile, one-handed, signature launcher - the home screen's personality and its fastest path to Maps/Music/etc.
The app is now a control room: trustworthy live status, an in-app terminal for field debugging, and a playful draggable launcher. Report 05 fills those launcher spheres with real services and adds the car-specific features (fuel, voice enrollment) plus the build pipeline to ship it.