Repository navigation
Polish the TUI: one visual language across views - #164
Merged
Merged
Conversation
… scale The default theme now uses the terminal's own foreground (Reset) and DarkGray for dim text, so it reads on light terminals; the selection bar maps those to White/Gray. RGB themes whose dim text fell under 4.5:1 on their intended background are lifted (matrix, nord, dracula, cyber, gruvbox, catppuccin, tokyo_night, solarized). Loss uses one scale everywhere: zero is dim, any loss plain text, >=5% warning, >=20% error, never green. Hops that never replied draw their Recent crosses dim.
Counts and RTTs are right-aligned under right-aligned headers with no
per-column units, all RTTs use one decimal, and loss is always {:.1}%
(never 100% next to 0.0%). Loss shows a dim dash until the hop has a
completed outcome. Rate limiting no longer glues onto the number
(79%RL): the loss keeps its normal format and a dim RL tag follows it.
The narrow-width budget keeps Host readable: ASN yields before Host
drops below 18 cells, Sent goes before Last, spare width is split
~60/40 between Host and ASN, and ASN is omitted with lookups off. A
static replay hides Last and Recent, which describe nothing there.
ttl leads in the header color, then the target in text with its name dim (an IP target falls back to the destination hop's reverse DNS). Flags follow as small badges in warning/success colors, PAUSED reversed, without brackets. Probe count, interval, local -> gateway and the RTT unit sit dim and right-aligned, and give way first on narrow borders so flags stay whole. The table frame uses rounded corners to match the popups.
A shared hint_line helper renders key hints the same way everywhere: key bold in the shortcut color, label dim, two spaces between pairs, dropping whole pairs from the end by priority until the line fits. It replaces the hard-coded '·' and '|' hint strings. Transient status messages (exports, theme changes) sit right-aligned on the same row instead of replacing every hint, and the status bar no longer repeats the update banner.
Hop detail, help, settings, the target list and Add Target now use one popup helper: cleared, rounded border in the theme's border color, the title bold in the header color, one column of horizontal padding, and key hints on the bottom border in the shared hint style (replacing the per-popup footer strings). wrap_lines breaks at the last space that fits and continues under the line's own leading indent instead of splitting words and dropping the indent; words longer than the width still break between graphemes.
Section headings (Latency, Jitter, Routing Symmetry, TTL Behavior, Interface, MPLS, ...) are bold in the header color, or warning when they report an anomaly. Values sit in one grid of fixed-width labels and right-aligned values with one decimal and the unit once per value, matching the table. Only anomalies are colored: normal sample counts are no longer green, Diff is an integer, interface names are unquoted in text color, and the IX name is no longer in the key-hint color. The title reads 'Hop 10 · host · AS2516 KDDI'. The sparkline now takes exactly the width left beside its range labels (164 ▁▂▁█ 485 ms), so the newest samples are never clipped, and scales to the p5..p95 range so one spike cannot flatten it. The unused RttSparkline widget is removed.
Help is grouped under General, Targets, Navigation, Display (and Replay when replaying) with a 10-cell key column, so keys such as 'p Space' or 'S-Tab N' never run into their descriptions. A Legend explains the host markers (E ! ~ ^ +), the RL tag and Recent symbols, and the title flags (RL? ASYM NAT TTL! MTU max_ttl). 'u Dismiss update banner' is listed only while a banner is showing.
The target list shows one aligned row per target (number, address, name, hops, loss, RTT at the destination) with a full-width selection bar; an IP target falls back to the destination hop's name. Add Target draws a visible underlined field with a reversed cursor cell and a dim 'Hostname or IP address' placeholder. The update banner uses theme colors instead of hard-coded black on yellow. The replay bar reads '▶ 0:45 / 4:23 · 5×' without event counts. Settings highlights the focused value in the header color, keeping the shortcut color for keys, and drops the indent the popup padding now provides.
A loaded file has nothing probing, so p and o do nothing there; the status bar now lists only keys that act on a static replay.
When --no-update-check, DO_NOT_TRACK/TTL_NO_UPDATE_CHECK or the build locks the update check off, its Settings row reads e.g. '[off] set by --no-update-check' in dim text instead of offering a toggle that does nothing.
lance0
marked this pull request as ready for review
October 16, 2026 17:34
lance0
added a commit
that referenced
this pull request
Oct 16, 2026
Indicators are now unbracketed title badges (NAT, RL?, ASYM, TTL!, MTU, max_ttl=N, PAUSED) and a dim RL tag after the loss value; INSTALL, KNOWN_ISSUES and the doc index use the new names. KNOWN_ISSUES records that --pmtud is rejected with -p udp/tcp, that replies behind destination NAT are only kept for a single target, and moves instance cross-talk and silent-hop RL flags to Resolved. CHANGELOG gains entries for #163, #164 and #162.
This was referenced Oct 16, 2026
lance0
added a commit
that referenced
this pull request
Oct 16, 2026
* Fix doc claims that drifted from the code - SCRIPTING: jq recipes used fields that do not exist in the JSON export (is_destination, loss_percent, avg_ms, nat_detected) and indexed the responders object by position. Rewritten against the real schema, with a field table, and the exit-code section no longer implies that exit 0 means the destination was reached. - FEATURES: the PeeringDB cache refresh key is Ctrl+R, not r; replay speed range is 0.1x-1000x (also > and <); --flows examples now use UDP/TCP, since ICMP ignores flows; --pmtud only probes in ICMP mode and conflicts with --size; --resolve-all keeps both address families; the config file lives under ~/Library/Application Support on macOS. Adds a Detection Indicators section, a Config File section, overlay keys, and a CLI reference that matches --help (adds --no-update-check, --completions, ranges and mode conflicts). - ARCHITECTURE: module tree, struct locations and field types (ProbeId.seq is u8, Hop lives in session.rs, flow_paths not flow_stats). - SECURITY: supported versions now 0.23.x. - ROADMAP: add the current-release line. * Move install, troubleshooting and limitations out of the README The README becomes a short front door: pitch, quick start, a "What it finds" list linking to the feature reference, a compact install list, platform support, and a task-based documentation table. - docs/INSTALL.md (new): every install channel, permissions (Linux setcap, macOS/BSD sudo, containers), shell completions, Windows/WSL2, download verification (moved from FEATURES.md), and troubleshooting. Lists the aarch64 musl release archive the table was missing. - KNOWN_ISSUES.md: now the single home for limitations (merged from the README). Drops stale entries now resolved in code: the 500us BSD inter-probe delay, NetBSD IPv4 PMTUD, and TCP ignoring --rate. Removes the ping_group_range claim, which ttl does not use. - COMPARISON.md: points to INSTALL.md for WSL2 setup instead of repeating it, and lists Windows as WSL2-only. - Every removed README heading keeps its anchor as an <a id> placeholder, so existing links to #installation, #permissions-linux, #troubleshooting, the use-case sections and others still resolve. * Add a documentation index docs/README.md lists every page by area with a one-line scope. CONTRIBUTING points new-feature docs at FEATURES.md and the index rather than the README, lists FreeBSD/NetBSD as experimental tracing platforms, and uses the same clippy command as CI. * Match docs to the merged TUI polish and correlation fixes Indicators are now unbracketed title badges (NAT, RL?, ASYM, TTL!, MTU, max_ttl=N, PAUSED) and a dim RL tag after the loss value; INSTALL, KNOWN_ISSUES and the doc index use the new names. KNOWN_ISSUES records that --pmtud is rejected with -p udp/tcp, that replies behind destination NAT are only kept for a single target, and moves instance cross-talk and silent-hop RL flags to Resolved. CHANGELOG gains entries for #163, #164 and #162.
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.
One visual language across the TUI: the table, title, status bar and every popup now share the same colors, alignment, frame and hint style.
What changed
Colors and themes
Reset) andDarkGrayfor dim text, so it reads on light terminals; the selection bar maps those to White/Gray.* * *, dim loss, dim Recent crosses.Table
{:.1}%; headers carry no per-column units (Loss Sent Last Avg Min Max StDev Jitter), the unit appears once in the title.–until the hop has a completed probe.RLtag after the loss instead of79%RL.Title, status bar, popups
ttlbold, target in text with its name dim (an IP target falls back to the destination hop's reverse DNS), flags as badges (PAUSEDreversed,RL?,ASYM,NAT,TTL!,MTU …,max_ttl=N), with probe count, interval, local -> gateway dim on the right. Details give way first when narrow.hint_linehelper for the status bar and every popup footer: key bold in the shortcut color, label dim, whole pairs dropped by priority. Transient messages sit right-aligned beside the hints.popupframe for hop detail, help, settings, target list and Add Target: rounded border, bold title, horizontal padding, hints on the bottom border. The main table uses rounded corners too.Views
Hop 10 · host · AS2516 KDDI. The sparkline takes exactly the width beside its range labels (newest samples are no longer clipped) and scales to p5..p95.uis listed only while an update banner shows.▶ 0:45 / 4:23 · 5×.RttSparklinewidget is removed.The dirty-skip fingerprint covers the new target-list RTT field; the small-terminal behavior (whole-column drops, visible selection, paging by visible height) and input handling are unchanged and their tests still pass.
Testing
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test,cargo docwith-D warnings,cargo +1.88 check --all-targets.