Skip to content

fix: space between review badge and PR/MR id in space labels - #8

Open
ubuntudroid wants to merge 1 commit into
krystof018:mainfrom
ubuntudroid:fix/space-before-pr-id
Open

fix: space between review badge and PR/MR id in space labels#8
ubuntudroid wants to merge 1 commit into
krystof018:mainfrom
ubuntudroid:fix/space-before-pr-id

Conversation

@ubuntudroid

@ubuntudroid ubuntudroid commented Jul 20, 2026

Copy link
Copy Markdown

What

Space labels rendered the review-state glyph glued directly onto the sigil + id, e.g. ✅#123. This inserts a separating space so it reads ✅ #123.

Why

The glyph and the number ran together, which is hard to read. The space is added only when a glyph is present, so a plain id (no review badge) stays #123 with no stray leading space.

Change is in status_for_repo (poller-ctl.sh); the colored status dot was already spaced separately in poll_once, so this is the one spot where an icon touched the id.

Test

bash test.sh — all 106 tests pass; bash -n poller-ctl.sh clean.

Merge-order note — gci_strip_ci_prefix must match this new emit format

This PR changes only the emit side in status_for_repo (poller-ctl.sh): the review badge now renders <glyph> #123 (with a space) instead of <glyph>#123. It does not touch gci_strip_ci_prefix in lib.sh, which strips the badge glyph only in the glued form:

# lib.sh — strips glued only
"$e"'!'[0-9]*|"$e"'#'[0-9]*) rest="${rest#"$e"}"; break ;;

With the spaced emit, that pattern never matches, so any label carrying a surfaced review badge (approved/conflict/changes — plus merged once #6 lands) never strips, and the whole <glyph> #123 token re-accumulates one copy per poll (observed live: ✅ #123 ✅ #123 … growing every 30s). Plain ids with no badge are unaffected, which is why it only shows up on some workspaces.

On merge, update gci_strip_ci_prefix to strip both forms — add the spaced patterns next to the glued ones:

case "$rest" in
  "$e"'!'[0-9]*|"$e"'#'[0-9]*)   rest="${rest#"$e"}";  break ;;
  "$e"' !'[0-9]*|"$e"' #'[0-9]*) rest="${rest#"$e" }"; break ;;
esac

Merge-order specifics:

🤖 Generated with Claude Code

The review-state glyph was concatenated straight onto the sigil+id, so
labels read "✅#123" instead of "✅ #123". Add a separating space, but
only when a glyph is present so a plain id stays "#123" with no stray
leading space.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ubuntudroid added a commit to ubuntudroid/herdr-git-status that referenced this pull request Jul 22, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant