ui: remove the shared Banner method (no intro banner on any command)#375
Conversation
Completes the banner removal started for the data commands (#370). The `tracebloc` + rule + subtitle block is gone from the last callers — `cluster info`, `resources`, `resources set` — and the shared `ui.Printer.Banner` method is deleted so nothing can reintroduce it. (`doctor` already dropped its banner in its own redesign.) Spacing: commands whose first line is a Section (`cluster info`) keep their leading blank from Section; the Stat/message-led paths (`resources` show, the `resources set` no-op / phantom-GPU notes) get an explicit Newline so every command still opens with exactly one blank line. Also dropped a now- redundant Newline in the `resources set` dry-run path (Section supplies it). Tests: drop the Banner unit-test call + its assertion; update the cluster-info test that asserted the "cluster diagnostics" subtitle; fix stale "banner" comments (incl. the ui package doc + a data-delete test). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
👋 Heads-up — Code review queue is at 31 / 30 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
…gbot #375) After removing the intro banner, flag-driven interactive `resources set` (no --yes/--dry-run) opened with TWO blank lines: a Newline() immediately before PromptHint, which already self-leads with a newline. The dry-run path dropped its redundant Newline() (Section supplies one) but the confirm path kept the stacked pair, so the command no longer opened with a single blank line. Remove the redundant Newline() — PromptHint's own leading newline gives the one blank the PR's spacing contract promises. Adds TestSet_ConfirmOpensWithSingleBlank (drives the flag confirm path via runSet) to pin it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
bugbot run |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
1 issue from previous review remains unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6afdd70. Configure here.
…#375) The leading Newline() in runResourcesShow (before resolve, so a resolve-time redirect line also gets a blank) wasn't covered — every resources-show test drives renderResources directly, skipping it. Wire runResourcesShow to the resolveClusterTargetFn seam (matching the data commands) and add TestShow_OpensWithSingleBlank: it drives the outer function through a canned target and asserts it opens with exactly one blank — the mirror of TestSet_ConfirmOpensWithSingleBlank. Confirmed it fails if the Newline() is removed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5c24c7b. Configure here.
|
/fr-pass — verified live: no intro banner on |

What
The follow-up to #370: removes the intro banner from every remaining command and deletes the shared
ui.Printer.Bannermethod so it can't come back.The banner block —
— was a single shared method called by 7 commands. #370 removed it from the data commands; the
doctorredesign dropped it fromdoctor. This PR removes the last three callers (cluster info,resources,resources set) and deletes the method itself.Why now
Verified the follow-up is unblocked:
doctoralready de-bannered ondevelop; the resources redesign (#359) merged its new view but left the banner; PR #361 (which would have removed it) is closed; and the only open PR touching these areas (#369) is scoped todoctor.go— no collision.Spacing
Every command still opens with exactly one blank line:
cluster info— first line is aSection, which supplies its own leading blank → just remove the banner.resources(show) — first line is aStat(no leading newline) → replace the banner withNewline().resources set— the no-op and phantom-GPU messages are message-led → addNewline()to each; theSection/dry-run paths supply their own, so I also dropped a now-redundantNewline()in the dry-run path (it was double-blanking once the banner was gone).Verified live against a k3d env (
resources,cluster info,resources set --dry-runfor both the no-op and change paths) — all open with a single clean blank line.Changed
internal/ui/ui.go— deleteBanner; fix the package doc +Paracomment that referenced it.internal/cli/cluster.go,resources.go,resources_set.go— drop the banner calls (+ spacing as above).internal/ui/ui_test.go— drop theBannercall + its"tracebloc"assertion (the method no longer exists).internal/cli/cluster_info_test.go— the test asserted the"cluster diagnostics"subtitle; now asserts the Kubeconfig section (test-ctx) instead.internal/cli/data_delete_json_test.go— stale "banner" comment → "output".Test plan
go build ./...,go vet,gofmt— clean.go test ./...— all pass.Bannerremain (theinternal/submit"banner" hits are the ingestor's📊 INGESTION SUMMARYbanner — unrelated).🤖 Generated with Claude Code
Note
Low Risk
CLI presentation and test-only seams only; no auth, cluster mutation, or API behavior changes.
Overview
Removes the shared
ui.Printer.Bannerhelper and the last CLI callers (cluster info,resourcesshow,resources set), completing the de-banner work after earlier commands dropped it.Spacing:
resources showstarts withNewline()instead of a banner; no-op / phantom-GPU messages inresources setaddNewline()where needed; the confirm path drops an extraNewline()beforePromptHintso output does not double-blank; dry-run drops a redundantNewline()beforeSection.runResourcesShowuses theresolveClusterTargetFnseam for tests.Tests: Expectations move off banner subtitles (e.g. cluster info checks
test-ctx); new tests pin a single leading blank for show and set confirm after #375.Reviewed by Cursor Bugbot for commit 5c24c7b. Bugbot is set up for automated code reviews on this repo. Configure here.