Icons: OpenIcon built in and on by default, icon("mail") draws the best glyph - #95
Merged
Merged
Conversation
…st glyph icon(name) returns the Nerd Font glyph, the Unicode symbol or the ASCII spelling of an OpenIcon icon, whichever this terminal can draw: the app's setIconMode, then OPENICON_GLYPHS / HQTUI_ICONS, then NERD_FONT=1, then the existing Unicode detection. A Nerd Font is never assumed. Aliases resolve, a missing Nerd glyph falls back to Unicode, unknown names draw nothing, and useIconPack(iconPackFrom(json)) swaps in another set. 370 icons, generated by scripts/generate-icons.ts from github.com/profullstack/openicon into the TypeScript library and the Go, Python and Rust ports, each with the same API and tests. Docs section on hqtui.com/docs#icons and in the README. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ralyodio
marked this pull request as ready for review
September 24, 2026 05:41
ralyodio
added this pull request to stack #97
September 24, 2026 07:18
cpanm --mirror-only resolves from 02packages, which now carries only 2.12, so the exact @2.11 pin fails with "Found FFI::Platypus 2.12 which doesn't satisfy == 2.11" on every branch, main included. Makefile.PL and Hqtui.pm keep 2.11 as the minimum. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ralyodio
added a commit
that referenced
this pull request
Sep 24, 2026
The version sites that no build step touches, moved together: the library and demo package.json, the CLI's VERSION, the demo's --version string, the site badge, and the workspace ranges in bun.lock. A minor rather than a patch because the public API grew: icon() and emoji() landed in #95 and #96, along with `hqtui fonts install`. The three ^0.6.2 ranges in apps/web, apps/benchmark and examples move too. A caret below 1.0.0 stops at <0.7.0, so left alone they would declare a range the library in this tree no longer satisfies. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenIcon (https://logicsrc.com/openicon) becomes hqtui's default, enabled icon pack.
Glyph choice, in order:
setIconMode()→OPENICON_GLYPHS/HQTUI_ICONS→NERD_FONT=1→ the existingdetectCapabilitiesUnicode check. A Nerd Font is never assumed, because the font cannot be detected from inside the terminal.Fallbacks: aliases resolve (
email→mail), an icon with no Nerd glyph falls back to Unicode, and an unknown name returns""rather than throwing mid-frame.Custom sets:
useIconPack(iconPackFrom(openiconJson))swaps in any other OpenIcon set.370 icons: 259 UI icons and 111 brands. The table is generated by
packages/hqtui/scripts/generate-icons.tsfrom github.com/profullstack/openicon into:src/icons-data.ts)ports/go/icons_data.go,Icon,IconIn,IconModeIn)hqtui.icon,icon_mode)hqtui::icon,icon_in,icon_mode_in)The Rust table is sorted and binary-searched. The only change to existing code is
detect_unicode, which becomespub(crate).Docs: a new Icons section at hqtui.com/docs#icons and in the package README.
Tests, run locally:
node --test337/337 andbun test packages/hqtui/test337 pass; 7 are new icon tests.go test -race ./...passes.cargo test --all-targetspasses.python -m unittest discover -s tests -t .40 OK.typecheck:demofailed locally only because this worktree'snode_moduleslinks to an older builtdistwithoutcopyMarkdown(Add Markdown copy controls for summary panes #94); CI does a fresh install.Not done:
Related: profullstack/cli-tools#81 (the
iconbuilder), profullstack/logicsrc#198 (the OpenIcon spec).🤖 Generated with Claude Code