Skip to content

android: fix health warnings sort order#789

Merged
kari-ts merged 1 commit into
mainfrom
kari/severorder
May 13, 2026
Merged

android: fix health warnings sort order#789
kari-ts merged 1 commit into
mainfrom
kari/severorder

Conversation

@kari-ts
Copy link
Copy Markdown
Collaborator

@kari-ts kari-ts commented May 12, 2026

This changes the comparator to sort by severity first (descending), ImpactsConnectivity as a secondary sort, and title as a final tiebreaker. This fixes the issue where the comparator was sorting ascending, and matches the new WinUI sorting behavior.

Fixes tailscale/corp#41733

@kari-ts kari-ts force-pushed the kari/severorder branch from e3549ba to 7cb4b17 Compare May 12, 2026 23:46
@kari-ts kari-ts requested a review from nickkhyl May 12, 2026 23:53
Copy link
Copy Markdown
Member

@nickkhyl nickkhyl left a comment

Choose a reason for hiding this comment

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

Thanks!!

Comment on lines +51 to +52
// Otherwise, alphabetical by title
return Title.compareTo(other.Title)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure whether this should be Title or WarnableCode.

I think WarnableCode makes a bit more sense, since the Title can theoretically change during the issue's lifecycle.

That said, in practice, we don't currently do that. So I guess either is fine?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I wasn't sure either. Let's go with WarnableCode

This changes the comparator to sort by severity first (descending), ImpactsConnectivity as a secondary sort, and title as a final tiebreaker. This fixes the issue where the comparator was sorting ascending, and matches the new WinUI sorting behavior.

Fixes tailscale/corp#41733

Signed-off-by: kari-ts <kari@tailscale.com>
@kari-ts kari-ts force-pushed the kari/severorder branch from 7cb4b17 to 158145a Compare May 13, 2026 15:34
@kari-ts kari-ts merged commit 181808b into main May 13, 2026
4 checks passed
@kari-ts kari-ts deleted the kari/severorder branch May 13, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants