fix(networks): render inspect view as YAML via shared inspectview#359
Merged
Conversation
The networks view shipped its own JSON viewer that just rendered json.Indent output, while every other resource view delegates to the shared `inspectview` (services/nodes/secrets/configs/stacks/ contexts). Reroute the network 'i' action through inspectview so the user gets the same YAML-style document, ctrl+f search with n/N navigation, app-level / filter, and raw toggle. Drops ~350 lines of duplicated inspect plumbing.
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.
Fixes #356.
Summary
ikey) used a custom inline JSON viewer that just dumpedjson.Indentoutput — it was the only resource view doing this.inspectviewpackage, which parses JSON and renders a styled YAML-style document withctrl+fsearch +n/Nnavigation, app-level/filter, and raw/yaml toggle.iaction throughinspectviewtoo, so users get a properly formatted document instead of raw JSON, with the same controls already used elsewhere in the TUI.views/networks.Before:
After (via shared
inspectview):Test plan
go build ./...— cleango test ./...— all unit tests passgolangci-lint run ./... --build-tags=integration— 0 issuesion a network → confirm YAML rendering,ctrl+fsearch,/filter,rraw toggle,escback🤖 Generated with Claude Code