Embed and discover bundled and user themes #15

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

Story

As a TrueNAS user, I want to select themes without managing installation folders so that monitoring fits my workflow.

Context

Parent scope: #7.

Embed themes for offline use. Cargo.toml currently includes src/**, README.md and LICENSE only, so source packaging must include theme inputs too.

Upstream: btop 5d03929a.

Acceptance criteria

  • Make all bundled themes available offline in macOS, Linux and Windows binaries.
  • Include theme files and notices in source packages and release build inputs.
  • Keep explicit theme paths and resolution relative to the selected config file.
  • Discover user .theme files in the tntop config themes directory and document deterministic name-collision precedence.
  • Include Default and, when implemented, TTY choices without ambiguous duplicate names.
  • Test discovery, collisions, missing/unreadable directories, explicit paths and a copied binary outside the checkout.

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 #13, #14.

## Story As a TrueNAS user, I want to select themes without managing installation folders so that monitoring fits my workflow. ## Context Parent scope: #7. Embed themes for offline use. Cargo.toml currently includes src/**, README.md and LICENSE only, so source packaging must include theme inputs too. Upstream: [btop 5d03929a](https://github.com/aristocratos/btop/tree/5d03929a45e0720a4c8e2d189360ff1eb9ce1731). ## Acceptance criteria - [x] Make all bundled themes available offline in macOS, Linux and Windows binaries. - [x] Include theme files and notices in source packages and release build inputs. - [x] Keep explicit theme paths and resolution relative to the selected config file. - [x] Discover user .theme files in the tntop config themes directory and document deterministic name-collision precedence. - [x] Include Default and, when implemented, TTY choices without ambiguous duplicate names. - [x] Test discovery, collisions, missing/unreadable directories, explicit paths and a copied binary outside the checkout. ## 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 #13, #14.
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: 1ea1b9b9ad.

Checked unconditional compile-time embedding with include_str! and the complete catalog in src/ui/theme.rs. Cargo source packaging includes all 49 themes and their license. A copied macOS binary outside the checkout loaded every bundled theme plus Default and TTY, with no theme files beside it; all 51 runs exited cleanly and restored terminal state. Discovery, collisions, explicit paths and directory-error tests pass. Native Linux/Windows packaged-binary smoke checks remain tracked by #7; this closure records the completed embedding implementation, not those unperformed checks.

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: 1ea1b9b9ad746995975cc80392e78c8ac8a65a2a. Checked unconditional compile-time embedding with include_str! and the complete catalog in src/ui/theme.rs. Cargo source packaging includes all 49 themes and their license. A copied macOS binary outside the checkout loaded every bundled theme plus Default and TTY, with no theme files beside it; all 51 runs exited cleanly and restored terminal state. Discovery, collisions, explicit paths and directory-error tests pass. Native Linux/Windows packaged-binary smoke checks remain tracked by #7; this closure records the completed embedding implementation, not those unperformed checks. 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:17 +00:00
Sign in to join this conversation.
No description provided.