feat(tui): navigable device IPs + VLANs#29
Merged
Conversation
Make the device detail's IP-address (p) and VLAN (v) tabs navigable, so Enter drills into that IP/VLAN and b/Esc walks back — the same DetailRow mechanism as the prefix/VRF views. Interfaces, cables, and services stay plain text (not standalone object kinds). IpRow gains an id (skip-serialized, so the nbox device JSON contract is unchanged); VlanRow already carried one. load_device_detail attaches navigable rows to the p/v tabs from the id-bearing rows. Second of four cross-object-navigation slices (vlan, site/rack to follow).
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.
Second of four cross-object navigation slices.
Change
The device detail's IP-address (
p) and VLAN (v) tabs are now navigable — Enter opens that IP/VLAN,b/Escwalks back — using the sameDetailRowmechanism as the prefix/VRF views.IpRowgains anid,#[serde(skip_serializing)]so thenbox deviceJSON output (and its golden) is unchanged.VlanRowalready carried an id.load_device_detailattaches navigable rows to thep/vtabs from the id-bearing rows.Contract safety
The IP id is skip-serialized, so the device JSON contract + golden are untouched. CLI/MCP device output unchanged.
Test
device_ip_and_vlan_rows_are_navigable: asserts(IpAddress, id)/(Vlan, id)targets and row text. Updated thetests/support/fixtures.rsIpRowto set the newid.cargo test --all-features(748 lib tests).