Skip to content

Fix status histogram label inconsistency and 4-digit count overlap#15

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/improve-status-histogram
Draft

Fix status histogram label inconsistency and 4-digit count overlap#15
Copilot wants to merge 4 commits intomainfrom
copilot/improve-status-histogram

Conversation

Copy link

Copilot AI commented Feb 16, 2026

Status histogram had two issues: labels like "run" flickered between "runnable" and "running" across frames, and 4+ digit counts overlapped on bars.

Changes

  • Use full status names as labels: Bar labels now display complete status text (e.g., "running", "runnable", "IO wait") instead of truncated abbreviations. This naturally ensures labels remain consistent across frames.

  • Relocated counts to legend: Format changed from bar overlay to "running: 321120" in legend panel. Prevents overlap and provides full context.

  • Removed bar number rendering: Deleted NumStyles configuration to eliminate on-bar count display entirely.

  • Increased bar width: Changed from 3 to 5 to better accommodate full status names.

// Before: dynamic prefix-based collision resolution
newLabel := t[:3]
if slices.Contains(labels, newLabel) {
    newLabel = fmt.Sprintf("%s%d", t[:2], uniqueID)
}

// After: use full status names directly
labels[idx] = t
legend = fmt.Sprintf("%s%s: %.0f\n", legend, t, typeCount[t])

This simpler approach solves both issues without needing abbreviation mappings or collision handling logic.

Original prompt

This section details on the original issue you should resolve

<issue_title>Better status histogram</issue_title>
<issue_description>The numbers written in the histogram overlap each other when going into 4 digits.

The labels of the status histogram change a lot:

  1. run is 'running' in the first frame
  2. run is 'runnable' in the next frame
Image Image

This could be improved by having a simple map of the common terms to abbreviations.

And for the 4-digit thing, what about moving the numbers to the legend?</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 16, 2026 18:48
Co-authored-by: becheran <22472855+becheran@users.noreply.github.com>
Co-authored-by: becheran <22472855+becheran@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix overlapping labels in status histogram Fix status histogram label inconsistency and 4-digit count overlap Feb 16, 2026
Copilot AI requested a review from becheran February 16, 2026 18:51
Copy link
Owner

@becheran becheran left a comment

Choose a reason for hiding this comment

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

Don't like the idea of abreviations. Find another solution

ui.barchartLegend.Text = legend
}

func min(a, b int) int {
Copy link
Owner

Choose a reason for hiding this comment

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

Go 1.21, min and max are available as builtins and you do not need to write them at all.

Copy link
Author

Choose a reason for hiding this comment

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

The min function has been removed in commit 2b9f941 as part of the simplified approach that no longer uses abbreviations.

Co-authored-by: becheran <22472855+becheran@users.noreply.github.com>
Copy link
Author

Copilot AI commented Feb 22, 2026

Don't like the idea of abreviations. Find another solution

Changed approach in commit 2b9f941. Now using full status names as bar labels instead of abbreviations. The legend shows counts like "running: 321120" which solves both the label inconsistency and 4-digit overlap issues without any abbreviations.

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.

Better status histogram

2 participants