Themed insight detail view + discoverable insight IDs (REF-149) - #69
Merged
Conversation
…t IDs (REF-149) The --id detail view was a plain fmt.Printf dump and silently dropped additionalInfo (the EKS doc links). Rewrote it through the design system (insightDetailLines: header+status, OVERVIEW, wrapped DESCRIPTION/RECOMMENDATION, AFFECTED RESOURCES, MORE INFORMATION links, DEPRECATED APIs caller breakdown); -o plain keeps an uncolored layout and now includes additionalInfo too. Insight IDs weren't discoverable — the table showed no ID, so users couldn't know what to pass to --id. Added a short ID column (8-char prefix) + a drill-in hint, and made --id resolve a full ID, a short prefix, or a case-insensitive name substring (ResolveInsightID on the cluster service; ambiguous queries list candidates). Tests: ResolveInsightID (exact/prefix/name/ambiguous/none), insightDetailLines golden + deprecations, wrapText. Docs reference regenerated for the new --id help. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Two fixes from validating REF-137 against your real cluster.
1. The
--iddetail view now uses the design system (and shows the doc links)It was a plain
fmt.Printfdump that didn't matchdescribe/status— and it silently droppedadditionalInfo(the EKS doc links, often the most useful part: your AL2 insight had 5 of them). Now a themedinsightDetailLines:-o plainkeeps an uncolored label/value layout, now including the links.2. Insight IDs are discoverable
You asked: how would the user know the ID to pass to
--id? They couldn't — the table didn't show it. Now:drill into one: cluster upgrade-check -c <c> --id <id|name>.--idaccepts a full ID, a short ID prefix, or a case-insensitive name substring (ResolveInsightID). So you can just type--id "amazon linux"or--id bc8b2f86. Ambiguous queries list the candidates; exact ID always wins.Consistency
Mirrors the existing themed views (sections, status tokens, KV) so it reads like the rest of the tool.
Tests
ResolveInsightID— exact / prefix / name / ambiguous / none (EKS mock)insightDetailLinesgolden — recommendation + additionalInfo (sorted) + no-deprecations; plus a deprecations case with clientStatswrapText— wrapping + whitespace collapse--idhelp.go build/vet/test -race/golangci-lint/docs-drift all clean.🤖 Generated with Claude Code