Parse and validate btop-style presets #20

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

Story

As a TrueNAS user, I want to save reusable panel layouts so that monitoring fits my workflow.

Context

Parent scope: #7.

Use upstream box:position:graph syntax, with apps as the native panel name and proc as an alias.

Upstream: btop 5d03929a.

Acceptance criteria

  • Provide preset 0 with all four panels and the three adapted defaults: cpu:1:default,proc:0:default; cpu:0:default,mem:0:default,net:0:default; cpu:0:block,net:0:tty.
  • Support up to nine configured presets, 0/1 positions and default/braille/block/tty graph choices.
  • Validate names, repeated/malformed entries, positions, graph styles and count limits.
  • Map proc to Apps and reject GPU panels clearly instead of silently dropping them.
  • Persist through TOML preferences; invalid edits retain the valid definitions.
  • Test defaults, aliases, limits, custom layouts and malformed input.

Validation

Run focused tests through mise run test --filter <name> and relevant existing mise format/lint tasks. Record interactive or platform checks required by this issue; report anything untested.

Dependencies

Blocked by #8.

## Story As a TrueNAS user, I want to save reusable panel layouts so that monitoring fits my workflow. ## Context Parent scope: #7. Use upstream box:position:graph syntax, with apps as the native panel name and proc as an alias. Upstream: [btop 5d03929a](https://github.com/aristocratos/btop/tree/5d03929a45e0720a4c8e2d189360ff1eb9ce1731). ## Acceptance criteria - [x] Provide preset 0 with all four panels and the three adapted defaults: cpu:1:default,proc:0:default; cpu:0:default,mem:0:default,net:0:default; cpu:0:block,net:0:tty. - [x] Support up to nine configured presets, 0/1 positions and default/braille/block/tty graph choices. - [x] Validate names, repeated/malformed entries, positions, graph styles and count limits. - [x] Map proc to Apps and reject GPU panels clearly instead of silently dropping them. - [x] Persist through TOML preferences; invalid edits retain the valid definitions. - [x] Test defaults, aliases, limits, custom layouts and malformed input. ## Validation Run focused tests through `mise run test --filter <name>` and relevant existing mise format/lint tasks. Record interactive or platform checks required by this issue; report anything untested. ## Dependencies Blocked by #8.
aaron added this to the v0.2.0 milestone 2026-11-16 14:41:41 +00:00
Author
Owner

Verified against pushed main at 1a17d5f520. Completing commit: 7741cfe766.

Checked src/config/preset.rs for preset 0, the three defaults, nine-definition limit, proc alias, validation and TOML persistence. Parser and invalid-edit tests pass.

Fresh checks: all 103 Rust/CLI tests, all lint tasks, all-target/all-feature compilation, build, and all 3 Unix installer tests passed on macOS. The owner approved the live UI and panel-border controls. Final cross-platform packaged-binary checks remain in #7.

Closing after verification; the push stopped automatic issue processing at the dependency on #10.

Verified against pushed main at 1a17d5f520b4aee3f38250931223df054858f6fb. Completing commit: 7741cfe7660305a5f3dc31e96e8815ad60cb914b. Checked src/config/preset.rs for preset 0, the three defaults, nine-definition limit, proc alias, validation and TOML persistence. Parser and invalid-edit tests pass. Fresh checks: all 103 Rust/CLI tests, all lint tasks, all-target/all-feature compilation, build, and all 3 Unix installer tests passed on macOS. The owner approved the live UI and panel-border controls. Final cross-platform packaged-binary checks remain in #7. Closing after verification; the push stopped automatic issue processing at the dependency on #10.
aaron closed this issue 2026-11-16 17:29:37 +00:00
Sign in to join this conversation.
No description provided.