Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/gui/gsc_info_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ void GscInfoWindow::fill_ui_ata_attributes(const StoragePropertyRepository& prop

model_columns.add(columns_->ata_attribute_table_columns.type);
num_tree_col = app_gtkmm_create_tree_view_column(columns_->ata_attribute_table_columns.type, *treeview,
_("Type"), _("Alarm condition is reached when normalized value becomes less than or equal to threshold. Type indicates whether it's a signal of drive's pre-failure time or just an old age."), false, true);
_("Type"), _("Indicates whether an alarm for this attribute signals drive failure (pre-failure) or normal wear from drive age (old age)."), false, true);

// Doesn't carry that much info. Advanced users can look at the flags.
// model_columns.add(attribute_table_columns.updated);
Expand Down Expand Up @@ -2098,7 +2098,10 @@ void GscInfoWindow::cell_renderer_for_ata_attributes(Gtk::CellRenderer* cr,
crt->property_weight() = Pango::WEIGHT_BOLD;
}
if (column_index == columns_->ata_attribute_table_columns.type.index()) {
if (attribute.attr_type == AtaStorageAttribute::AttributeType::Prefail) {
// Bold only when attribute has failed AND it's pre-failure type
if ((attribute.when_failed == AtaStorageAttribute::FailTime::Past
|| attribute.when_failed == AtaStorageAttribute::FailTime::Now)
&& attribute.attr_type == AtaStorageAttribute::AttributeType::Prefail) {
crt->property_weight() = Pango::WEIGHT_BOLD;
Comment on lines +2101 to 2105

Copilot AI Mar 6, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new condition treats FailTime::Unknown as “failed” because it checks when_failed != None. That can incorrectly bold “pre-failure” when the failure status is simply unknown/unparsed (text parser initializes when_failed to Unknown). Consider explicitly checking for FailTime::Past or FailTime::Now (or excluding Unknown) so bolding matches the comment (“has failed”).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in f2b95d3. Changed the condition from when_failed != None (which incorrectly includes Unknown) to explicitly check when_failed == Past || when_failed == Now, so bold is only applied when the attribute has actually failed.

} else { // reset to default value if reloading
crt->property_weight().reset_value();
Expand Down
Loading