Rebuild TUI as 4-tab layout with 10 new widgets

Replace sidebar + 5-screen layout with horizontal tab bar (F1-F4)
and persistent StatusStrip. Consolidate Position + Scan screens into
Signal (F3) with Monitor/Sweep/Sky Map sub-modes via ModeBar.

Screens:
  - F1 Dashboard: system health, tracking panel, quick actions, presets
  - F2 Control: motor tuning, compass rose, preset management
  - F3 Signal: RSSI monitor, 1D sweep (SweepPlot), 2D sky map (heatmap)
  - F4 System: NVS editor with regex filter, EEPROM, firmware info
  - F5 Console: push/pop overlay (no longer a tab)

New widgets: StatusStrip, ModeBar, SweepPlot, QuickActions, PresetList,
ReceiverInfo, MotorTuning, NvsFilter, SystemHealth, TrackingPanel.

Removed: PositionScreen, ScanScreen, DeviceStatusBar (functionality
absorbed into new screens and StatusStrip).

App-level position poll feeds StatusStrip and active screen at ~2 Hz.
Fix shared threading.Event across instances (class-level mutable default).
This commit is contained in:
Ryan Malloy 2026-02-14 18:04:50 -07:00
parent e7e71c47d7
commit 145763fcfb
23 changed files with 2796 additions and 865 deletions

View file

@ -1,6 +1,8 @@
/* Birdcage TUI — Dark RF Theme
* Teal accent on deep blue-black. No purple.
* Signal gradient: blue > cyan > green > yellow > red
*
* Layout: Header / StatusStrip / TabBar / ContentSwitcher / Footer
*/
/* ── Global ────────────────────────────────────────── */
@ -25,49 +27,31 @@ Footer {
height: 1;
}
/* ── Layout Containers ─────────────────────────────── */
/* ── Status Strip ─────────────────────────────────── */
#main-area {
layout: horizontal;
height: 1fr;
}
#sidebar {
width: 26;
#status-strip {
dock: top;
height: 1;
background: #0e1420;
border-right: solid #1a2a3a;
padding: 1 1;
color: #c8d0d8;
border-bottom: solid #1a2a3a;
padding: 0 1;
}
.sidebar-title {
color: #00d4aa;
text-style: bold;
text-align: center;
width: 100%;
}
/* ── Tab Bar ──────────────────────────────────────── */
.sidebar-subtitle {
color: #506878;
text-align: center;
width: 100%;
margin: 0 0 1 0;
}
#content-area {
width: 1fr;
}
ContentSwitcher {
width: 1fr;
height: 1fr;
}
/* ── Sidebar Buttons ───────────────────────────────── */
.sidebar-btn {
width: 100%;
#tab-bar {
dock: top;
height: 3;
margin: 0 0 1 0;
background: #0a0a12;
padding: 0 1;
layout: horizontal;
}
.tab-btn {
min-width: 16;
height: 3;
margin: 0 0 0 0;
background: #121c2a;
color: #7090a8;
text-style: bold;
@ -75,19 +59,84 @@ ContentSwitcher {
text-align: center;
}
.sidebar-btn:hover {
.tab-btn:hover {
background: #1a2a40;
color: #00d4aa;
border: round #00d4aa;
}
.sidebar-btn.active {
.tab-btn.active {
background: #0a2a3a;
color: #00d4aa;
border: round #00d4aa;
text-style: bold;
}
/* ── Mode Bar (within-screen sub-mode toggle) ─────── */
.mode-bar {
height: 3;
background: #0a0a12;
padding: 0 1;
layout: horizontal;
dock: top;
}
.mode-btn {
min-width: 14;
height: 3;
margin: 0 0 0 0;
background: #0e1420;
color: #506878;
text-style: bold;
border: round #1a2a3a;
text-align: center;
}
.mode-btn:hover {
background: #1a2a40;
color: #00d4aa;
border: round #00d4aa;
}
.mode-btn.active {
background: #0a2a3a;
color: #00d4aa;
border: round #00d4aa;
text-style: bold;
}
/* ── Content Area ─────────────────────────────────── */
#content-area {
width: 1fr;
height: 1fr;
}
ContentSwitcher {
width: 1fr;
height: 1fr;
}
/* ── Console Overlay (ModalScreen) ────────────────── */
ConsoleOverlay {
background: rgba(10, 10, 18, 0.6);
}
#console-overlay {
dock: bottom;
height: 50%;
width: 100%;
background: #0a0a12;
border-top: double #00d4aa;
padding: 0;
}
#console-overlay #serial-log {
height: 1fr;
}
/* ── Panel / Card ──────────────────────────────────── */
.panel {
@ -177,6 +226,18 @@ Button.-active {
background: #0a3a3a;
}
/* ── Checkbox ──────────────────────────────────────── */
Checkbox {
background: transparent;
color: #c8d0d8;
padding: 0 1;
}
Checkbox:focus {
color: #00d4aa;
}
/* ── DataTable ─────────────────────────────────────── */
DataTable {
@ -338,44 +399,23 @@ ProgressBar PercentageStatus {
color: #c8d0d8;
}
/* ── Device Status Bar (sidebar bottom) ────────────── */
#device-status {
dock: bottom;
height: auto;
padding: 1;
background: #0e1420;
border-top: solid #1a2a38;
}
.device-status-label {
color: #506878;
}
.device-status-value {
color: #c8d0d8;
}
.device-connected {
color: #00e060;
}
.device-demo {
color: #e8a020;
}
/* ── Console Screen ────────────────────────────────── */
/* ── Console Input Area ───────────────────────────── */
.console-input-area {
dock: bottom;
height: 3;
height: auto;
width: 100%;
layout: horizontal;
padding: 0 1;
background: #0e1420;
border-top: solid #1a2a38;
}
.console-input-area Input {
.console-input-area .label {
width: auto;
}
#console-input {
width: 1fr;
}
@ -426,7 +466,125 @@ ProgressBar PercentageStatus {
color: #506878;
}
/* ── Scan Screen ───────────────────────────────────── */
/* ── Quick Actions (Dashboard) ────────────────────── */
.quick-actions {
height: auto;
layout: horizontal;
padding: 0 1;
}
.quick-action-btn {
min-width: 16;
height: 3;
margin: 0 1 0 0;
background: #1a2a40;
color: #00d4aa;
border: round #1a3050;
text-style: bold;
}
.quick-action-btn:hover {
background: #00d4aa;
color: #0a0a12;
border: round #00d4aa;
}
/* ── System Health (Dashboard) ────────────────────── */
.system-health {
height: auto;
padding: 1 2;
background: #0e1420;
border: round #1a2a3a;
margin: 0 1;
}
/* ── Preset List ──────────────────────────────────── */
.preset-controls {
height: auto;
layout: horizontal;
padding: 0 1;
dock: bottom;
}
.preset-controls Button {
margin-right: 1;
}
/* ── Tracking Panel ───────────────────────────────── */
.tracking-panel {
height: auto;
padding: 1 2;
background: #0e1420;
border: round #1a2a3a;
}
.tracking-status {
color: #506878;
}
/* ── Receiver Info ────────────────────────────────── */
.receiver-info {
height: auto;
padding: 1 2;
background: #0e1420;
border: round #1a2a3a;
}
/* ── Sweep Plot ───────────────────────────────────── */
.sweep-plot {
height: auto;
min-height: 8;
padding: 1 2;
background: #0e1420;
border: round #1a2a3a;
}
/* ── NVS Filter ───────────────────────────────────── */
.nvs-filter {
height: auto;
layout: horizontal;
padding: 0 1;
dock: top;
background: #0e1420;
border-bottom: solid #1a2a3a;
}
.nvs-filter Input {
width: 1fr;
margin-right: 1;
}
/* ── Motor Tuning (PID editor) ────────────────────── */
.motor-tuning {
height: auto;
padding: 1 2;
background: #0e1420;
border: round #1a2a3a;
}
.pid-row {
layout: horizontal;
height: 3;
}
.pid-row .label {
width: 4;
}
.pid-row Input {
width: 8;
margin-right: 1;
}
/* ── Scan Controls ────────────────────────────────── */
.scan-controls {
dock: bottom;
@ -446,8 +604,8 @@ ProgressBar PercentageStatus {
.screen-container {
layout: vertical;
height: 1fr;
width: 1fr;
height: 100%;
width: 100%;
}
.top-row {