Skip to content

πŸ› fix(icons,prompt): restore icon-set parity, implement _shui_prompt, add CI - #2

Merged
kud merged 3 commits into
mainfrom
fix/prompt-icon-parity-and-ci
Jul 5, 2026
Merged

πŸ› fix(icons,prompt): restore icon-set parity, implement _shui_prompt, add CI#2
kud merged 3 commits into
mainfrom
fix/prompt-icon-parity-and-ci

Conversation

@kud

@kud kud commented Jul 5, 2026

Copy link
Copy Markdown
Owner

What

Fixes pre-existing test failures that were blocking a CI workflow, then adds CI.

Bugs fixed (red on a clean main)

  1. _shui_prompt was an unimplemented stub (_shui_prompt() { : }) β€” the user-prompt / input-prompt tests got no output. Implemented it as a labelled-prompt renderer keyed off the mode's bracket icon (SHUI_ICON_USER_BRACKET / SHUI_ICON_INPUT_BRACKET).
  2. Icon-set parity was broken β€” nerd/emoji were missing the geometric tokens (CIRCLE, SQUARE, TRIANGLE, DIAMOND, …) that none already had, and the three sets defined mismatched token names (POINTER only in none β€” though the radio component uses it; NPM/Powerline only in nerd). All three sets now define an identical token set. nerd uses plain non-PUA geometric glyphs (they render fine in a Nerd Font), emoji uses emoji, none stays empty.

Also

  • mise.toml test task now fails fast (… || exit 1) β€” the old for … done returned only the last file's exit code, so a mid-suite failure could be masked as green. This matters precisely because we're now gating CI on it.
  • New .github/workflows/ci.yml (the repo had none): installs zsh, sets up mise, runs mise run lint + mise run test on PRs and pushes to main.

Verification

All six test files pass individually (exit 0 each); mise run lint (zsh -n across all sources) clean.

kud added 3 commits July 5, 2026 02:56
… sets

- nerd.zsh: add SHUI_ICON_BULLET, SHUI_ICON_CIRCLE, SHUI_ICON_CIRCLE_EMPTY, SHUI_ICON_SQUARE, SHUI_ICON_SQUARE_EMPTY, SHUI_ICON_TRIANGLE, SHUI_ICON_DIAMOND, SHUI_ICON_POINTER using plain Unicode (no PUA needed)
- emoji.zsh: matching geometric set with emoji equivalents plus SHUI_ICON_NPM, SHUI_ICON_POINTER; Powerline tokens kept empty for parity
- none.zsh: SHUI_ICON_NPM and Powerline tokens added to maintain full parity with nerd set
- prompt.zsh: implement _shui_prompt() with mode-based icon selection (user-prompt, input-prompt, fallback) and colour-prefixed output
- ci.yml: add GitHub Actions workflow running mise lint + mise test on push/PR to main
- mise.toml: fix test runner to exit on first failure (`|| exit 1`)
All Nerd Font PUA assignments in src/icons/nerd.zsh now use the $'\UXXXXXXXX' escape form instead of raw glyph bytes. Raw glyphs are invisible in many editors, silently mangled by diffs, and non-portable across encodings. The escape form keeps the source pure ASCII and is now enforced by tests/test-icons.zsh. Updated the header comment to document the new format and add-entry convention.
grep -cP exits with status 1 when there are zero matches, so `|| echo 0`
would concatenate the real count with a second "0" line. Switch to `|| true`
and use parameter expansion `${_raw_count:-0}` to default an empty result
(e.g. BSD grep without -P) to 0.

Also tightens the nerd.zsh entry-format comment to show the required
`SHUI_ICON_<NAME>` prefix and indented example more clearly.
@kud
kud marked this pull request as ready for review July 5, 2026 02:21
@kud
kud merged commit bed67aa into main Jul 5, 2026
1 check passed
@kud
kud deleted the fix/prompt-icon-parity-and-ci branch July 5, 2026 02:21
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