Skip to content

Releases: profullstack/hqtui

v0.3.0: styled text spans

Choose a tag to compare

@ralyodio ralyodio released this 08 Sep 14:29
0605c5a

A line can carry more than one colour.

ui.text([
  { text: "ERROR ", fg: theme.danger, bold: true },
  { text: "connection refused" },
]);

Added

  • Span, SpanLine and RichText, plus Surface.spans() for drawing them.
  • Span-aware measuring, truncation, padding and word wrap: spanWidth, truncateSpans, fitSpans, wrapSpans, wrapRich, toSpanLines, spanStyle, spanText, isRich.
  • drawText and ui.text / ui.label / ui.heading accept RichText wherever they took a string.

Compatibility

A bare string is the one-span case, so no existing call site changes and no committed frame moves. Both fixture generators regenerate byte for byte, and the six native ports stay in parity — they simply do not offer spans yet.

The span layout is held to the exact output of the string functions it mirrors: truncateSpans, fitSpans and wrapSpans produce the same columns as truncate, fit and wrap across a corpus of CJK, emoji, ZWJ sequences, combining marks and overlong tokens at eight widths.

232 tests pass under Bun and Node.

0.2.0: collapsed borders, the widget gallery and the cookbook

Choose a tag to compare

@ralyodio ralyodio released this 07 Sep 15:52
a8d31a3

Collapsed borders

createApp({ collapseBorders: true }) makes adjacent panels share an edge rather than each drawing its own, the way CSS collapses table borders. Off by default, panel level only.

--- default ---                          --- collapsed ---
╭─ CPU ────────╮╭─ Memory ─────╮         ╭─ CPU ────────┬─ Memory ─────╮
│ all █████ 62%││ used ██▏  31%│         │ all █████ 62%│ used ██▏  31%│
╰──────────────╯╰──────────────╯         ╰──────────────┴──────────────╯

The layout half is a gap of minus one at a seam between two bordered siblings, so their borders land in the same column. The render half is a union of edge bits: a top-right corner meeting a top-left is down+left+right, which is the T that makes the pair read as one frame.

Implemented six times over: TypeScript, Rust, Go, Python, Zig, and the C core that C++, Ruby, PHP and Perl draw through. The same scene renders byte for byte identically in all five native ports. With the flag off the merge path is never taken, so every existing screen renders exactly as it did.

The widget gallery

hqtui.com/widgets — every widget, its real rendered output, and the code that drew it in eleven languages. 28 widgets across the six native ports, 8 through the FFI bindings, 7 in C++, and 8 in COBOL through a bridge that does not link against anything: it writes 80-column records that a TypeScript or a Rust adapter reads, byte-identically.

The pictures are rendered headlessly at build time by the library itself, and every snippet is a region of a program CI compiles and runs.

The High Quality Terminal UI Cookbook

Eleven chapters at hqtui.com/book, free to read and free as an EPUB, with a typeset PDF for $1 in crypto on any of fifteen chains.

Also

  • solve and stack take a gap per seam in every port, which may be negative
  • Zig and the C core gained the junction glyphs they never carried
  • The markdown renderer learned pipe tables
  • demo.sh --system fixes from #51 are in this release

v0.1.12 — Native demo visual parity

Choose a tag to compare

@ralyodio ralyodio released this 07 Sep 00:42
09b1546

Go, Python and Zig now use all ten TypeScript reference screen layouts, alongside the existing Rust demo. This includes the responsive Dashboard, detailed Traffic/Sessions/Network/Services tabs and complete widget showcases.

The native suites share 120 TypeScript reference frames across four terminal sizes and three themes. Rust/Python/Zig require exact cells; Go permits one documented Braille-dot rounding difference in the Components gauge. Real telemetry remains native, and unavailable host data is not replaced with simulated rows.

Also fixes final-viewport table scrolling/selection, tail-relative log scrolling, component controls and live status information. All 15 PR checks passed, plus local real-data and terminal restoration checks.

Update and run from any directory (replace go with python, zig or rust):

curl -fsSL https://hqtui.com/demo.sh | sh -s -- --mise go
curl -fsSL https://hqtui.com/demo.sh | sh -s -- --system go

Both commands fetch latest main before launching. Native demo versions now report 0.1.12. The Go module is tagged ports/go/v0.1.12; both @profullstack/hqtui and @profullstack/hqtui-demo are verified published on npm as latest at 0.1.12. The Go module is verified available through proxy.golang.org and hqtui.com is deployed.

PyPI and crates.io publication are not configured; use the source updater or attached artifacts. C/C++ remain experimental. Live-data availability depends on host/platform/permissions; full interaction and cross-platform collection parity is not claimed.

Merged in #45 (09b1546). Original homepage logo/hero artwork is unchanged.

Attached: tested Linux x86-64 Go/Zig executables, a Rust Linux x86-64 executable requiring glibc >=2.39, a Python wheel, and SHA256SUMS. Read ARTIFACTS.md for installation and platform requirements. All four artifacts passed version checks, all ten screen launches, and real/simulated terminal restoration tests.

v0.1.11

Choose a tag to compare

@ralyodio ralyodio released this 04 Sep 08:45
b1b8572

Supersedes v0.1.10, which published the library and then failed to publish the demo. Both packages ship together here. The demo carries the collection-loop fixes from #25 by Tripp Josserand-Austin (@anjaustin), landed as #30, and the build fix that let them reach npm.

The demo

Refreshes no longer stack. The interval timer fired collector.refresh() unconditionally and discarded the promise. A refresh can outrun the interval, since the tick-15 path alone allows journalctl five seconds, and every concurrent call mutated the same sample, the same previous-counter state behind every rate, and the same tick counter driving the staggered cadences, each spawning its own ps, ss, df and journalctl. One refresh runs at a time now.

--interval is bounded at both ends. Node resets any timer delay outside 1 to 2^31-1 milliseconds, and also NaN and Infinity, to one millisecond. The old floor-only clamp let --interval 1e12 run a one-millisecond loop that forked two thousand processes in three seconds, and --interval Infinity made every derived rate NaN. The parser lives in its own module so it can be tested without starting the dashboard.

Rates use the time that actually passed. Every counter delta was divided by the interval that was asked for rather than the gap since the previous refresh, so a refresh that outran its tick overstated disk throughput, network up and down, per-interface rx and tx, context switches, interrupts and forks by the skip factor. Measured now, the worst error is 0.0% where it was 100%.

Departed interfaces are pruned. The per-interface history and the previous-counter map were keyed by name and never cleaned. On a container host the veth* names churn constantly and each retained entry held two 240-element arrays. Both maps are pruned to what /proc/net/dev still lists. An interface that flaps restarts its sparkline, which is the one visible consequence.

The demo builds again under TypeScript 7. Its build tsconfig never named the Node types, so prepublishOnly compiled it with no Node globals and stopped on the first process. CI had not noticed because it typechecked the demo through a separate config that did name them, and nothing built the demo. The types now live in the base config, and the root build script builds the demo after the library so CI runs the same compile that publishing runs.

The library

No code changes. @profullstack/hqtui is republished at 0.1.11 so the two packages stay on one version, which the publish workflow requires.

Upgrading

npm install @profullstack/hqtui@0.1.11
npx @profullstack/hqtui-demo@0.1.11

v0.1.10

Choose a tag to compare

@ralyodio ralyodio released this 04 Sep 08:41
82c496c

Partial release. This tag published @profullstack/hqtui@0.1.10 but the demo publish failed in its prepublish build. @profullstack/hqtui-demo never reached 0.1.10. Use v0.1.11, which carries the same demo fixes and the build fix.

The demo's collection loop was written for a short session and misbehaved over a long uptime. This release fixes four ways it did, all found and fixed by Tripp Josserand-Austin (@anjaustin) in #25, landed as #30.

The demo

Refreshes no longer stack. The interval timer fired collector.refresh() unconditionally and discarded the promise. A refresh can outrun the interval, since the tick-15 path alone allows journalctl five seconds, and every concurrent call mutated the same sample, the same previous-counter state behind every rate, and the same tick counter driving the staggered cadences, each spawning its own ps, ss, df and journalctl. One refresh runs at a time now.

--interval is bounded at both ends. Node resets any timer delay outside 1 to 2^31-1 milliseconds, and also NaN and Infinity, to one millisecond. The old floor-only clamp let --interval 1e12 run a one-millisecond loop that forked two thousand processes in three seconds, and --interval Infinity made every derived rate NaN. The parser lives in its own module so it can be tested without starting the dashboard.

Rates use the time that actually passed. Every counter delta was divided by the interval that was asked for rather than the gap since the previous refresh, so a refresh that outran its tick overstated disk throughput, network up and down, per-interface rx and tx, context switches, interrupts and forks by the skip factor. Measured now, the worst error is 0.0% where it was 100%.

Departed interfaces are pruned. The per-interface history and the previous-counter map were keyed by name and never cleaned. On a container host the veth* names churn constantly and each retained entry held two 240-element arrays. Both maps are pruned to what /proc/net/dev still lists. An interface that flaps restarts its sparkline, which is the one visible consequence.

The library

No changes. @profullstack/hqtui is republished at 0.1.10 so the two packages stay on one version, which the publish workflow requires.

Upgrading

npm install @profullstack/hqtui@0.1.10
npx @profullstack/hqtui-demo@0.1.10

This is the first release cut through the publish workflow rather than by hand.