Specify btop menu, preset and theme adaptation #7

Closed
opened 2026-11-16 14:39:23 +00:00 by aaron · 1 comment
Owner

Story

As a TrueNAS user, I want btop-style menus, presets and themes so that I can customize tntop without editing configuration by hand.

Context

This is the approved scope and tracking issue. Reference btop at 5d03929a, especially src/btop_menu.cpp, src/btop_config.cpp, src/btop_input.cpp and themes/.

Adapt btop to the data tntop already collects. The owner chose TrueNAS adaptation rather than full btop parity.

Menus and controls

Deliver Main, Options, Help, message and terminal-size handling, with keyboard and mouse support. Main offers Options, Help, Servers and Quit. Options has General, CPU, Memory/ZFS, Network and Apps categories. Storage stays within Memory/ZFS.

Use m/Esc for Main, F2/o for Options, F1/?/h for Help, p/P for next/previous preset and 1-4 for panel toggles. Keep s for Servers. Move app sorting to Left/Right and pool selection to [ and ]. In Vim mode, H opens Help when h navigates. Text editing consumes keys first; Escape closes one active layer and Ctrl-C exits.

Presets and themes

Use cpu, mem, net and apps panels; accept btop's proc name as an alias for apps. Preset 0 shows all four. Adapt all three upstream default presets and allow up to nine configured presets with alternate positions and per-panel graph styles.

Vendor all 49 upstream .theme files from the pinned commit with author notices and the Apache-2.0 license. Embed the catalog in release binaries so themes work offline without a separate installation step. Preserve explicit theme paths and discover user themes under the tntop configuration themes directory, with documented name precedence.

Option coverage

  • General: theme/background, truecolor/TTY, Vim/mouse, preset definitions/disabling, shown panels, update interval, rounded corners, terminal synchronization, graph styles, clock, byte units, menu background updates, log level and save-on-exit.
  • CPU: position/styles, available total/core graph sources, lower inversion/single graph, temperatures/core temperatures, units, custom display name and uptime.
  • Memory/ZFS: position/styles, graphs/meters, storage visibility and truthful ARC/cache presentation. ARC overlaps RAM; do not invent missing cache/free values.
  • Storage: pool filters and selection, I/O visibility, combined/separate read-write graphs and scales. Current I/O is aggregate, never per-pool.
  • Network: interface selection, auto/fixed/synced scales, upload/download swap, bitrate units and resettable session estimates.
  • Apps: available sort fields, reverse order, colors/gradients, CPU normalization, memory units, CPU graphs, details, follow and pause. Track app identity rather than row number.

Exclusions

No new telemetry or remote control APIs. Exclude raw process lists, signals, renice, trees/aggregation, PID/user/thread/kernel filters, dead-process accounting and app start/stop/restart. Exclude GPU, battery/UPS, CPU frequency/wattage, sensor selection/remapping, swap, mount/fstab filters, dataset hiding and privileged free-space controls. Document these differences instead of exposing settings that do nothing.

Existing issues

Reuse #1 (black background), #2 (purple title) and #5 (cursor editing), without duplicate issues. Embedded themes mean #4 (installer) and #6 (self-update) do not need to copy theme folders.

Acceptance criteria

  • All child issues meet their acceptance criteria and focused checks.
  • Every exposed option has a real effect and unavailable upstream features are documented.
  • Keyboard/mouse flows, modal input, resize, preset changes and server switching preserve active sessions.
  • All 49 themes load and remain available offline in macOS, Linux and Windows binaries.
  • Preference saves preserve comments, unrelated values, servers and certificate trust. Invalid reloads or failed writes preserve valid state.
  • Final integrated checks cover documented controls and packaged binaries; report any platform not tested.

The scope is approved. This parent tracks delivery and stays open until completion; it is not an unfinished blocker for its children.

Delivery order

Start with preferences, main-menu input, theme vendoring, graph styles and layout, plus existing #1/#2/#5. Options features follow the editor. Preset activation follows layout, graph and parser work. Theme and preset work can proceed independently. Each feature includes its own tests and mouse/help integration. Native dependency links record unfinished prerequisites.

Implementation issues

  • #8 Persist and reload live UI preferences
  • #9 Add the main menu and route keyboard input
  • #10 Add the options menu and field editing
  • #11 Add the in-app help menu
  • #12 Add mouse navigation to menus and dashboard controls
  • #13 Vendor the complete btop theme folder
  • #14 Support the bundled btop theme palettes
  • #15 Embed and discover bundled and user themes
  • #16 Add live theme selection and background control
  • #17 Add 256-color and TTY display modes
  • #18 Add block and TTY graph rendering
  • #19 Support panel visibility and alternate layouts
  • #20 Parse and validate btop-style presets
  • #21 Apply and cycle presets from the UI and CLI
  • #22 Add general appearance and input options
  • #23 Apply refresh, background-update and logging options
  • #24 Add CPU display options
  • #25 Add Memory and ZFS display options
  • #26 Add storage display and I/O controls
  • #27 Add network display and scaling controls
  • #28 Add app-list sorting and display options
  • #29 Add app detail, follow and pause controls
  • #30 Document menus, presets and theme installation
## Story As a TrueNAS user, I want btop-style menus, presets and themes so that I can customize tntop without editing configuration by hand. ## Context This is the approved scope and tracking issue. Reference btop at [5d03929a](https://github.com/aristocratos/btop/tree/5d03929a45e0720a4c8e2d189360ff1eb9ce1731), especially src/btop_menu.cpp, src/btop_config.cpp, src/btop_input.cpp and themes/. Adapt btop to the data tntop already collects. The owner chose TrueNAS adaptation rather than full btop parity. ### Menus and controls Deliver Main, Options, Help, message and terminal-size handling, with keyboard and mouse support. Main offers Options, Help, Servers and Quit. Options has General, CPU, Memory/ZFS, Network and Apps categories. Storage stays within Memory/ZFS. Use m/Esc for Main, F2/o for Options, F1/?/h for Help, p/P for next/previous preset and 1-4 for panel toggles. Keep s for Servers. Move app sorting to Left/Right and pool selection to [ and ]. In Vim mode, H opens Help when h navigates. Text editing consumes keys first; Escape closes one active layer and Ctrl-C exits. ### Presets and themes Use cpu, mem, net and apps panels; accept btop's proc name as an alias for apps. Preset 0 shows all four. Adapt all three upstream default presets and allow up to nine configured presets with alternate positions and per-panel graph styles. Vendor all 49 upstream .theme files from the pinned commit with author notices and the Apache-2.0 license. Embed the catalog in release binaries so themes work offline without a separate installation step. Preserve explicit theme paths and discover user themes under the tntop configuration themes directory, with documented name precedence. ### Option coverage - General: theme/background, truecolor/TTY, Vim/mouse, preset definitions/disabling, shown panels, update interval, rounded corners, terminal synchronization, graph styles, clock, byte units, menu background updates, log level and save-on-exit. - CPU: position/styles, available total/core graph sources, lower inversion/single graph, temperatures/core temperatures, units, custom display name and uptime. - Memory/ZFS: position/styles, graphs/meters, storage visibility and truthful ARC/cache presentation. ARC overlaps RAM; do not invent missing cache/free values. - Storage: pool filters and selection, I/O visibility, combined/separate read-write graphs and scales. Current I/O is aggregate, never per-pool. - Network: interface selection, auto/fixed/synced scales, upload/download swap, bitrate units and resettable session estimates. - Apps: available sort fields, reverse order, colors/gradients, CPU normalization, memory units, CPU graphs, details, follow and pause. Track app identity rather than row number. ### Exclusions No new telemetry or remote control APIs. Exclude raw process lists, signals, renice, trees/aggregation, PID/user/thread/kernel filters, dead-process accounting and app start/stop/restart. Exclude GPU, battery/UPS, CPU frequency/wattage, sensor selection/remapping, swap, mount/fstab filters, dataset hiding and privileged free-space controls. Document these differences instead of exposing settings that do nothing. ### Existing issues Reuse #1 (black background), #2 (purple title) and #5 (cursor editing), without duplicate issues. Embedded themes mean #4 (installer) and #6 (self-update) do not need to copy theme folders. ## Acceptance criteria - [ ] All child issues meet their acceptance criteria and focused checks. - [ ] Every exposed option has a real effect and unavailable upstream features are documented. - [ ] Keyboard/mouse flows, modal input, resize, preset changes and server switching preserve active sessions. - [ ] All 49 themes load and remain available offline in macOS, Linux and Windows binaries. - [ ] Preference saves preserve comments, unrelated values, servers and certificate trust. Invalid reloads or failed writes preserve valid state. - [ ] Final integrated checks cover documented controls and packaged binaries; report any platform not tested. The scope is approved. This parent tracks delivery and stays open until completion; it is not an unfinished blocker for its children. ## Delivery order Start with preferences, main-menu input, theme vendoring, graph styles and layout, plus existing #1/#2/#5. Options features follow the editor. Preset activation follows layout, graph and parser work. Theme and preset work can proceed independently. Each feature includes its own tests and mouse/help integration. Native dependency links record unfinished prerequisites. ## Implementation issues - [x] #8 Persist and reload live UI preferences - [x] #9 Add the main menu and route keyboard input - [x] #10 Add the options menu and field editing - [x] #11 Add the in-app help menu - [x] #12 Add mouse navigation to menus and dashboard controls - [x] #13 Vendor the complete btop theme folder - [x] #14 Support the bundled btop theme palettes - [x] #15 Embed and discover bundled and user themes - [x] #16 Add live theme selection and background control - [x] #17 Add 256-color and TTY display modes - [x] #18 Add block and TTY graph rendering - [x] #19 Support panel visibility and alternate layouts - [x] #20 Parse and validate btop-style presets - [x] #21 Apply and cycle presets from the UI and CLI - [x] #22 Add general appearance and input options - [x] #23 Apply refresh, background-update and logging options - [x] #24 Add CPU display options - [x] #25 Add Memory and ZFS display options - [x] #26 Add storage display and I/O controls - [x] #27 Add network display and scaling controls - [x] #28 Add app-list sorting and display options - [x] #29 Add app detail, follow and pause controls - [x] #30 Document menus, presets and theme installation
aaron added this to the v0.2.0 milestone 2026-11-16 14:41:41 +00:00
Author
Owner

Verified the pushed implementation at 1a17d5f520 and closed the 20 remaining feature issues with individual evidence. All child implementation issues #8-#30 are now closed.

Fresh macOS checks passed: all 103 Rust/CLI tests, all lint tasks, all-target/all-feature compilation, build and 3 Unix installer tests. All 49 themes and the license match the pinned upstream archive byte for byte, and Cargo source packaging contains them. A copied binary outside the checkout loaded all 49 bundled themes plus Default/TTY with no theme folder; all 51 PTY runs exited cleanly and restored terminal state. The owner already approved the live UI and embedded controls.

Keeping this delivery issue open for final packaged-binary verification on Linux and Windows. Those runtime checks have not run on this implementation. The Linux CI run for this push was still running when checked. Version remains 0.1.0; no 0.2.0 release has occurred.

Verified the pushed implementation at 1a17d5f520b4aee3f38250931223df054858f6fb and closed the 20 remaining feature issues with individual evidence. All child implementation issues #8-#30 are now closed. Fresh macOS checks passed: all 103 Rust/CLI tests, all lint tasks, all-target/all-feature compilation, build and 3 Unix installer tests. All 49 themes and the license match the pinned upstream archive byte for byte, and Cargo source packaging contains them. A copied binary outside the checkout loaded all 49 bundled themes plus Default/TTY with no theme folder; all 51 PTY runs exited cleanly and restored terminal state. The owner already approved the live UI and embedded controls. Keeping this delivery issue open for final packaged-binary verification on Linux and Windows. Those runtime checks have not run on this implementation. The Linux CI run for this push was still running when checked. Version remains 0.1.0; no 0.2.0 release has occurred.
aaron closed this issue 2026-11-16 17:30:33 +00:00
Sign in to join this conversation.
No description provided.