Commit Graph
287 Commits
Author SHA1 Message Date
Alexander Shaduri 25f4dd6759 Merge pull request #129 from ashaduri/claude/humanize-data-amounts
Show data amounts (written / read) in human-readable form
2026-10-25 18:31:22 +01:00
Alexander ShaduriandClaude Opus 5.5 db3d2415c9 Use correct unit sizes when converting data amounts to bytes
- ATA Device Statistics (Logical Sectors Written / Read) count actual
  logical sectors, so use the device's logical sector size instead of
  assuming 512 bytes. On 4Kn drives the totals were understated 8x.
  If the sector size is unknown, the values are not converted.
- Parse smartctl's protocol-independent host_writes / host_reads
  bytes_per_unit from both ATA and NVMe JSON output, and prefer them
  when available.
- Only convert ATA attributes with an explicit unit suffix (e.g.
  Host_Writes_32MiB). Units of LBA-counting attributes such as
  Total_LBAs_Written vary between vendors, devices and firmware
  versions (see smartmontools/smartmontools#251), and Device
  Statistics provide the same information reliably.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 18:27:43 +01:00
Alexander Shaduri 52d3bfb297 Merge pull request #128 from ashaduri/claude/save-output-as-text
Allow saving smartctl output as text from all Save As dialogs
2026-10-25 18:03:56 +01:00
Alexander Shaduri cfdee534fc Merge pull request #126 from SpookySkeletons/patch-1
Fix regex pattern for NVMe self-test detection
2026-10-25 17:56:36 +01:00
Alexander ShaduriandClaude Opus 5.5 e5f2b349f9 Show data amounts (written / read) in human-readable form
Attributes, Device Statistics and NVMe health values that count amounts of
data are now shown with a human-readable size, e.g.
"11,538,326,532 [5.91 TB]".

- ATA attributes: detected by the smartctl-reported name, which encodes the
  unit: LBA / sector counts (Total_LBAs_Written, Write_Sectors_Tot_Ct,
  Total_Host_Sector_Write, ...) and explicit units (Host_Writes_32MiB,
  NAND_Writes_1GiB, Lifetime_Writes_GiB, ...). Error / reallocation
  counters are excluded.
- Device Statistics: Logical Sectors Written / Read.
- NVMe: Data Units Read / Written (units of 512,000 bytes).
- Decimal units (TB) are used, matching drive endurance (TBW) ratings and
  smartctl's own NVMe output.

Fixes #28

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:28:06 +02:00
Alexander ShaduriandClaude Opus 5.5 d6b109dc65 Allow saving smartctl output as text from all Save As dialogs
The "View Output" window always saved the raw output (JSON), even with a
.txt file name, and offered no format choice. The device information
window saved text into a .json file when the "Text Files" type was
selected, since the suggested file name has a .json extension.

- Add smartctl_output_export (applib): extracts the available formats
  (JSON, and the text output embedded with --json=o) from smartctl output,
  and decides the format and file extension from the selected file type or
  the typed extension.
- Add a shared Save As dialog used by both windows, offering only the
  available formats and confirming overwrites of extension-adjusted names.
- "View Output" window: add a JSON / Text selector, so the displayed (and
  copyable) text can be switched; Save As suggests the displayed format.

Fixes #85

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:22:50 +02:00
Alexander Shaduri fed68f60e9 Merge pull request #127 from ashaduri/claude/fix-scanned-on-tooltip
Fix scan time missing from virtual drive tooltip
2026-10-15 23:14:13 +02:00
Alexander Shaduri 90e38fa7cb Merge pull request #117 from ashaduri/claude/fix-model-family-display-issue
Fix HTML entity encoding in main window labels
2026-10-15 23:13:33 +02:00
Alexander Shaduri a6cad5e25f Merge pull request #109 from ashaduri/copilot/fix-test-completion-eta-message
Fix misleading self-test ETA using adaptive estimation
2026-10-15 23:12:27 +02:00
Alexander Shaduri 28e385a039 Merge pull request #110 from ashaduri/claude/update-type-attribute-explanation
Clarify the Type attribute explanation
2026-10-15 23:10:59 +02:00
Alexander Shaduri dae6f79ad6 Merge pull request #107 from ashaduri/claude/add-ctrl-tab-for-tabs
Switch device information tabs with Ctrl+Tab
2026-10-15 23:09:30 +02:00
Alexander ShaduriandClaude Opus 5.5 7d9bcae73c Fix scan time missing from virtual drive tooltip
The "Scanned on" format string lacked the %1 placeholder, so the scan
time was never shown in the main window icon tooltip for virtual drives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:08:42 +02:00
Alexander ShaduriandClaude Opus 5.5 971aa8d1bf Self-test ETA: Estimate from observed progress speed per percent
- Move the adaptive estimation into SelfTestEtaEstimator, which tracks
  observed seconds per percent instead of per-change "segment" durations.
  This fixes NVMe estimates (1% steps were counted as 10% segments, giving
  ~10x too short ETAs), and progress spanning several steps between two
  polls (e.g. 80% -> 60%) being counted as a single segment.
- Reset the estimator state in start().
- Return unknown ETA when the test is not running.
- Add unit tests for the estimator (the existing tests did not cover it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:05:58 +02:00
Alexander Shaduri 55931f2a88 Merge remote-tracking branch 'origin/main' into copilot/fix-test-completion-eta-message
# Conflicts:
#	src/applib/tests/CMakeLists.txt
2026-10-15 23:04:14 +02:00
Alexander ShaduriandClaude Opus 5.5 c63983ba05 Type tooltip: Clarify that the type alone is not a warning
Start with "If" as suggested in the issue, state that the type by itself
does not indicate a problem, and restore the explanation of when an alarm
condition is reached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:03:09 +02:00
Alexander ShaduriandClaude Opus 5.5 f48dae74cd Ctrl+Tab: Include Advanced sub-tabs in the main tab cycle
Previously, once the Advanced tab was active, Ctrl+Tab only cycled its
sub-tabs, making it impossible to leave the Advanced tab using the keyboard.
Now the Advanced sub-tabs are stops in the same sequence as the main tabs.
Also ignore Ctrl+Alt+Tab and treat ISO_Left_Tab as backward navigation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:01:34 +02:00
Alexander ShaduriandClaude Opus 5.5 08d200af94 Scaling: Fix sub-100% scale handling, test real helpers
- Treat scales below 100% as non-fractional, avoiding a division by zero
  in the correction ratio and a bogus font size increase.
- Add app_get_fractional_scaling_part_percent() and use it in gsc_init.
- Move scaling tests to applib_tests and test the actual helper functions
  instead of duplicated inline math; remove the gui_tests target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 22:43:13 +02:00
Alexander ShaduriandClaude Opus 5.5 cb5b1284be Adjust default window sizes for fractional scaling on Windows
GTK3 only supports integer scaling, so at e.g. 125% or 250% system scaling
the UI is rendered at 1x / 2x. Store the full system scale percentage and
scale the default (glade) window sizes by the remaining fractional ratio,
and increase the font size by the fractional amount.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 22:43:13 +02:00
SpookySkeletons cfb96c3924 Fix regex pattern for NVMe self-test detection
Parsing of the smartctl output was broken here, tests would initiate but the GUI would report them as failing. Re-running the test would detect the in-progress SMART scan and function as expected on the second try. Fixed by modifying this regex on the stable smartmontools 7.5.
2026-10-15 14:27:41 -04:00
OldMan2525 fa31a696a7 Use bundled icons when theme icons are too small
Some icon themes may return a lower-resolution icon than requested.
For example, under XQuartz on macOS, Gtk::IconTheme::load_icon()
returns a 16x16 drive-harddisk icon even when a 64x64 icon is
requested.

Because the theme lookup succeeds, the bundled higher-resolution
icons are never used, resulting in tiny drive icons in the main
window.

Fall back to the bundled icon when the theme-provided icon is
smaller than the requested size.
2026-07-07 02:13:11 -07:00
anthropic-code-agent[bot]andashaduri d768d8b690 Fix HTML entity encoding in main window labels
- Fix model family label to use set_markup() instead of set_text()
- Fix family label tooltip to use markup mode
- Fix name label tooltip to use markup mode
- All labels now properly render HTML entities like quotes

Agent-Logs-Url: https://github.com/ashaduri/gsmartcontrol/sessions/d14daedd-b7c3-45ae-adf0-b9de6c8ea901

Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-04-04 15:33:54 +00:00
anthropic-code-agent[bot]andashaduri 37090a8556 Fix Type tooltip and FailTime condition per PR feedback
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ashaduri/gsmartcontrol/sessions/b9ea2530-2c7d-4061-accb-eb7d7bb1dc16
2026-03-22 17:09:02 +00:00
anthropic-code-agent[bot]andashaduri c673bd95bb Add unit tests for SelfTest adaptive ETA algorithm
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ashaduri/gsmartcontrol/sessions/8b4b77f5-beb6-4c32-bf49-93d641714685
2026-03-22 17:04:36 +00:00
Alexander Shaduri 57a16f6971 Fix compilation. 2026-03-08 19:08:51 +01:00
Alexander Shaduri a7f0cb78cd Merge remote-tracking branch 'origin/claude/fix-red-text-legibility' into claude/fix-red-text-legibility
# Conflicts:
#	src/applib/warning_colors.h
#	src/gui/gsc_info_window.cpp
2026-03-08 19:04:00 +01:00
Alexander Shaduri 3642afc46f Use readable text highlight colors in dark mode. 2026-03-08 18:52:27 +01:00
Alexander ShaduriandCopilot e4c9afeed0 Update src/applib/warning_colors.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-08 18:52:27 +01:00
Alexander ShaduriandCopilot 06a0a75349 Update src/gui/gsc_info_window.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-08 18:52:27 +01:00
anthropic-code-agent[bot]andashaduri c322e96741 Revert to umbrella gtkmm.h include per maintainer request
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-08 18:52:27 +01:00
anthropic-code-agent[bot]andashaduri a6e2dd0cc6 Add GTK init guard and optimize theme detection
- Guard theme detection with Gtk::Main::level() check to avoid crashes in non-GUI executables
- Use narrow headers (gtkmm/settings.h, gtkmm/main.h) instead of umbrella gtkmm.h
- Return early from app_property_get_label_highlight_color() for WarningLevel::None

Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-08 18:52:27 +01:00
anthropic-code-agent[bot]andashaduri 6de9bb897d Implement theme-aware red text colors for dark theme legibility
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-08 18:52:27 +01:00
Claude 083936e99b Add Windows dark mode detection and automatic GTK theme switching (#111) 2026-03-08 18:31:58 +01:00
anthropic-code-agent[bot]andashaduri b7cfa45cac Fix Advanced tab detection: only cycle sub-tabs when Advanced is active
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-07 16:47:13 +00:00
Alexander ShaduriandCopilot 68032c4f3c Update src/applib/warning_colors.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-07 17:39:35 +01:00
anthropic-code-agent[bot]andashaduri 980d0f143c Fix build issues: clean up corrupted function and properly structure code
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-07 15:41:03 +00:00
copilot-swe-agent[bot]andashaduri b1ccfd43e0 Fix narrowing conversion: use int instead of int8_t for remaining_segments
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-07 15:26:53 +00:00
copilot-swe-agent[bot]andashaduri dd0b9fe8ea Move gran to fallback path and fix adaptive ETA for NVMe drives
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-07 15:21:48 +00:00
Alexander ShaduriandCopilot dcce1f1250 Update src/gui/gsc_info_window.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-07 16:18:50 +01:00
Alexander ShaduriandCopilot b167098a6d Update src/gui/gsc_info_window.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-07 16:18:36 +01:00
Alexander ShaduriandCopilot 3373750d2c Update src/gui/gsc_info_window.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-07 16:18:01 +01:00
Alexander ShaduriandCopilot 7e626460c0 Update src/gui/gsc_info_window.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-07 16:15:24 +01:00
anthropic-code-agent[bot]andashaduri 258d06b755 Revert to umbrella gtkmm.h include per maintainer request
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-06 19:08:06 +00:00
anthropic-code-agent[bot]andashaduri 99d358396b Make Type bold only on pre-failure attribute failure
- Type column now shows bold text only when BOTH conditions are met:
  1. Attribute has actually failed (when_failed != None)
  2. Attribute type is pre-failure
- This provides visual emphasis for genuine pre-failure warnings
- Normal pre-failure attributes (not failed) remain normal weight

Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-06 19:02:55 +00:00
anthropic-code-agent[bot]andashaduri d88090d6b6 Skip first segment in adaptive ETA to avoid skew from instant/partial progress
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-06 14:54:17 +00:00
anthropic-code-agent[bot]andashaduri d1d64693db Clarify Type attribute explanation and remove bold formatting
- Updated tooltip to clearly explain Type indicates alarm meaning
- Removed bold formatting for "pre-failure" to reduce visual alarm
- Changed text to emphasize Type is about alarm interpretation, not current status

Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-06 14:52:28 +00:00
anthropic-code-agent[bot]andashaduri 9427d829a3 Support Ctrl+Tab navigation for Advanced tab sub-tabs
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-06 14:44:39 +00:00
anthropic-code-agent[bot]andashaduri 1c99ff8350 Implement adaptive ETA calculation based on observed segment durations
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-06 14:43:41 +00:00
anthropic-code-agent[bot]andashaduri 525fcfe3af Add GTK init guard and optimize theme detection
- Guard theme detection with Gtk::Main::level() check to avoid crashes in non-GUI executables
- Use narrow headers (gtkmm/settings.h, gtkmm/main.h) instead of umbrella gtkmm.h
- Return early from app_property_get_label_highlight_color() for WarningLevel::None

Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-06 14:36:54 +00:00
copilot-swe-agent[bot]andashaduri 2ef695f8fb Fix misleading ETA: 0 sec during self-test when drive estimate is exceeded
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-04 22:05:23 +00:00
anthropic-code-agent[bot]andashaduri 6ce03db09f Add Ctrl+Tab keyboard navigation for device information tabs
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-04 21:58:07 +00:00