fix(cli): home renders a nameless env line when no client name is cached (bugbot #266)#277
Merged
Merged
Conversation
The offline-vs-no-env classifier intentionally keeps a provisioned machine with no cached display name on a NAMED offline line (namespace known, name not). But renderHome formatted every env line with %q, so that case printed `Secure environment "" · can't reach it from here` — an empty-quoted name. Build the env label once: `Secure environment %q` when a name exists, else a bare `Secure environment`. Every state (Online/Running/Starting/Offline) now degrades to a clean nameless line. Output is byte-identical when a name is present (the locked-demo test still passes). Adds a regression test across all named states. Fixes the Cursor Bugbot "Empty env name renders badly" finding on #266. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
👋 Heads-up — Code review queue is at 38 / 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.) |
Merged
7 tasks
LukasWodka
approved these changes
Jul 14, 2026
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.
What
Cursor Bugbot on #266: "Empty env name renders badly."
The offline-vs-no-env classifier deliberately keeps a provisioned machine with no cached display name (namespace known, name not) on a named offline line. But
renderHomeformatted every env line with%q, so that case printed:Fix
Build the env label once —
Secure environment "name"when a name exists, else a bareSecure environment— and use it across all five render sites (Online / Running×2 / Starting / Offline). Output is byte-identical when a name is present, so the locked-demo snapshot test is unchanged.Verification
gofmt/vetclean;go test ./internal/cli/green (incl. the exact-copyTestRenderHome_MatchesLockedDemo).TestRenderHome_EmptyEnvNameNoEmptyQuotesasserts every named state rendersSecure environment ·and neverenvironment ""— fails before the fix.Once merged to
develop, promote PR #266 picks it up.🤖 Generated with Claude Code
Note
Low Risk
Display-only change in CLI home rendering with regression tests; no auth, detection, or I/O behavior changes.
Overview
Fixes ugly home-screen copy when a provisioned machine has no cached client display name (
envNameis empty): the secure-environment axis no longer printsSecure environment "" · ….renderHomenow builds a singleenvLabel—Secure environment "name"when a name exists, otherwise bareSecure environment— and uses it for Online, Running (both variants), Starting, and Offline. Named output is unchanged whenenvNameis set (locked demo test untouched).TestRenderHome_EmptyEnvNameNoEmptyQuotesloops those four states withenvName: ""and assertsSecure environment ·appears andenvironment ""does not.Reviewed by Cursor Bugbot for commit 16d3cd1. Bugbot is set up for automated code reviews on this repo. Configure here.