Skip to content

Feature/dataset info improvements - #119

Merged
markusressel merged 7 commits into
mainfrom
feature/dataset-info-improvements
May 28, 2026
Merged

Feature/dataset info improvements#119
markusressel merged 7 commits into
mainfrom
feature/dataset-info-improvements

Conversation

@markusressel

Copy link
Copy Markdown
Owner

This pull request significantly refactors and enhances the dataset info UI and related dataset property accessors. The main improvements are a more compact, color-coded, and readable display for dataset properties, and a major simplification and unification of property retrieval logic in the Dataset model. There are also improvements to color handling for file and snapshot browser tables to ensure consistent status highlighting.

image

Key changes:

UI Enhancements for Dataset Info:

  • The dataset info panel is now rendered using a tview.TextView instead of a table, allowing for colorized, aligned, and more compact output. Property keys and values are color-coded for readability, and special states (like "readonly" or missing keys) are visually highlighted. Helper functions for color formatting and value-based color resolution have been added to support this. [1] [2] [3] [4]
  • Several new dataset properties are now displayed, such as creation time, readonly status, snapdir, case sensitivity, and encryption details. Compression info now includes the compression ratio for a more concise view.

Dataset Property Accessor Refactor:

  • All dataset property getters in internal/zfs/dataset.go have been refactored to use new helper methods (getPropertyString, getPropertyInt, getPropertyUint64). This unifies property retrieval between the two ZFS backends and reduces code duplication.
  • New accessors have been added for properties such as creation time, readonly, snapdir, case sensitivity, quota, encryption, and key status. The encryption accessor also exposes whether encryption is enabled.
  • The creation time is now returned as a time.Time object for proper formatting in the UI.

File and Snapshot Browser Table Improvements:

  • Status color variables in the file and snapshot browser tables have been renamed for clarity, and status colors are now consistently used for both text and selected row backgrounds, improving the visual feedback for users. [1] [2] [3] [4] [5] [6] [7]
  • A new function for determining the base text color of snapshot browser entries has been added for better differentiation of modified/added/deleted states.

General Improvements:

  • Imports have been updated to include required packages for new features. [1] [2]

These changes collectively modernize the dataset info UI, improve maintainability, and enhance the user experience with clearer and more informative displays.

  • UI enhancements and color-coding in dataset info (dataset_info.go): [1] [2] [3] [4]
  • Expanded dataset property display and formatting (dataset_info.go):
  • Unified and extended dataset property accessors (dataset.go): [1] [2]
  • Consistent status color handling in file/snapshot browser tables: [1] [2] [3] [4] [5] [6] [7]
  • Import updates for new utilities: [1] [2]

@markusressel markusressel self-assigned this May 28, 2026
@markusressel markusressel added the enhancement New feature or request label May 28, 2026
@markusressel
markusressel merged commit 2a30a74 into main May 28, 2026
3 checks passed
@markusressel
markusressel deleted the feature/dataset-info-improvements branch May 28, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant