Skip to content

Show extension indicators and keep hop details readable - #145

Merged
lance0 merged 2 commits into
masterfrom
fix/hop-extension-display
Oct 16, 2026
Merged

lance0 merged 2 commits into
masterfrom
fix/hop-extension-display

Conversation

@lance0

@lance0 lance0 commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Hops with RFC 5837 or MPLS information now show a + beside the host, so operators can find additional details without opening every hop. The marker checks all responders, and the detail view now includes extension data from secondary responders too.

Long interface names and addresses previously pushed the MTU beyond the popup's fixed width. Detail lines now wrap on Unicode grapheme boundaries while preserving styles, and wrapped lines contribute to popup height. PgUp/PgDn and Home/End scroll overflow; Up/Down still select hops, and the navigation footer stays visible. Scroll offsets are clamped, reset on hop changes, and included in the render fingerprint.

Validation: cargo build --locked, cargo test --locked, cargo clippy --locked --all-targets -- -D warnings, cargo fmt -- --check, and rustdoc with warnings denied. Buffer-rendering tests cover long names/IPv6 addresses at multiple terminal widths, MTU visibility, short-terminal scrolling, secondary-responder MPLS details, and Unicode styles. Documentation and in-app help describe the marker and scrolling controls.

Refs #134, specifically the discovery-indicator and clipped-interface follow-ups.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Fixed-size paging leaves some detail rows unreachable on short terminals.

1 open finding
What changed in this PR

Makes ICMP extension details easier to discover and read in the terminal UI, addressing follow-ups from #134.

Changes:

  • Marks hops containing interface or MPLS information across all responders.
  • Wraps detail lines and adds scrolling with a fixed navigation footer.
  • Adds rendering tests and documents the controls.
File Description
src/​tui/​views/​main.rs Adds the extension indicator and tests.
src/​tui/​views/​hop.rs Wraps details, supports scrolling, and shows secondary-responder extensions.
src/​tui/​views/​help.rs Explains indicators and scrolling controls.
src/​tui/​app.rs Handles scrolling state, keys, and redraw detection.
README.md Documents extension discovery and navigation.
docs/​FEATURES.md Describes extension details and scrolling behavior.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/tui/app.rs
Comment on lines +997 to +1005
KeyCode::PageUp => {
ui_state.hop_detail_scroll = ui_state.hop_detail_scroll.saturating_sub(10);
}
KeyCode::PageDown => {
ui_state.hop_detail_scroll = ui_state
.hop_detail_scroll
.saturating_add(10)
.min(max_scroll);
}
PgUp/PgDn moved a fixed 10 rows, so on short terminals the rows between
pages were unreachable. Page by the popup's visible content height.
Style the new help entries like the other key bindings and keep them
above the section break.
@lance0
lance0 marked this pull request as ready for review October 16, 2026 15:47
@lance0
lance0 merged commit c8a06cb into master Oct 16, 2026
10 of 11 checks passed
@lance0
lance0 deleted the fix/hop-extension-display branch October 16, 2026 16:13
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.

2 participants