Skip to content

fix: prevent “strings: negative Repeat count” panic when sidebar is narrow#796

Merged
dlvhdr merged 1 commit intodlvhdr:mainfrom
sideshowbarker:fix/checks-bar-panic
Mar 6, 2026
Merged

fix: prevent “strings: negative Repeat count” panic when sidebar is narrow#796
dlvhdr merged 1 commit intodlvhdr:mainfrom
sideshowbarker:fix/checks-bar-panic

Conversation

@sideshowbarker
Copy link
Contributor

@sideshowbarker sideshowbarker commented Mar 6, 2026

Bug: dash panics with “strings: negative Repeat count”

Cause: With a narrow-enough sidebar, viewChecksBar() computes a negative width for the progress-bar sections. That negative value gets passed to strings.Repeat(), which panics with “strings: negative Repeat count”.

Fix: Clamp the available width to zero, so when the sidebar is narrow, the bar just renders as empty — rather than causing a panic. Fixes #795

…arrow

Bug: dash panics with “strings: negative Repeat count”

Cause: With a narrow-enough sidebar, viewChecksBar() computes a negative
width for the progress-bar sections. That negative value gets passed to
strings.Repeat(), which panics with “strings: negative Repeat count”.

Fix: Clamp the available width to zero, so when the sidebar is narrow, the
bar just renders as empty — rather than causing a panic.

Fixes dlvhdr#795
@sideshowbarker sideshowbarker changed the title fix: prevent "strings: negative Repeat count" panic when sidebar is narrow fix: prevent “strings: negative Repeat count” panic when sidebar is narrow Mar 6, 2026
Copy link
Owner

@dlvhdr dlvhdr left a comment

Choose a reason for hiding this comment

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

thank you!

@dlvhdr dlvhdr merged commit 73f37af into dlvhdr:main Mar 6, 2026
3 checks passed
@sideshowbarker sideshowbarker deleted the fix/checks-bar-panic branch March 6, 2026 14:23
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.

[BUG] Panic - "strings: negative Repeat count"

2 participants