Developer Tools
Source:components/dev/ChaosFab.tsx (34 lines) + components/dev/DbDebugFab.tsx (263 lines, 12.2KB)
Two floating action buttons mounted at the root layout level that provide real-time debugging and chaos engineering capabilities during development.
ChaosFab
A red floating button (bug emoji) positioned at the bottom-right of the screen. Tapping it navigates to the/(dev)/chaos screen where the full ChaosStore actions are available.
Visual Spec:
- Size: 48x48px, circular (borderRadius: 24)
- Color: #FF3B30 (danger red)
- Position: absolute, bottom: 280, right: 16
- Z-index: 9999 (always on top)
- Shadow: iOS shadow + Android elevation: 10
DbDebugFab
A full-featured database inspector (magnifying glass emoji) that provides a dual-mode debug overlay: Visual Spec:- Size: 48x48px, circular (borderRadius: 24)
- Color: #FF9500 (warning orange)
- Position: absolute, bottom: 160, right: 16
DB View Mode
Displays all data from the local SQLite cache:Log View Mode
Displays the full contents of today’s persistent JS log file (from the Logger module). Includes:- Toggle button to switch between DB and Log views
- “Clear” button to wipe today’s log file
- Monospace green text on near-black background for readability
Orphan Detection
The inspector runs a special query to find orphaned instances:Mount Location
Both components are mounted inapp/_layout.tsx inside the provider tree:
position: absolute and zIndex: 9999 styling.