Repository navigation
Show extension indicators and keep hop details readable - #145
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 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 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.
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.

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.