Skip to content

fix(cli): home renders a nameless env line when no client name is cached (bugbot #266)#277

Merged
saadqbal merged 1 commit into
developfrom
fix/266-empty-env-name
Jul 14, 2026
Merged

fix(cli): home renders a nameless env line when no client name is cached (bugbot #266)#277
saadqbal merged 1 commit into
developfrom
fix/266-empty-env-name

Conversation

@saadqbal

@saadqbal saadqbal commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

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 renderHome formatted every env line with %q, so that case printed:

Secure environment "" · can't reach it from here — run …

Fix

Build the env label once — Secure environment "name" when a name exists, else a bare Secure 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/vet clean; go test ./internal/cli/ green (incl. the exact-copy TestRenderHome_MatchesLockedDemo).
  • New TestRenderHome_EmptyEnvNameNoEmptyQuotes asserts every named state renders Secure environment · and never environment "" — 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 (envName is empty): the secure-environment axis no longer prints Secure environment "" · ….

renderHome now builds a single envLabelSecure environment "name" when a name exists, otherwise bare Secure environment — and uses it for Online, Running (both variants), Starting, and Offline. Named output is unchanged when envName is set (locked demo test untouched).

TestRenderHome_EmptyEnvNameNoEmptyQuotes loops those four states with envName: "" and asserts Secure environment · appears and environment "" does not.

Reviewed by Cursor Bugbot for commit 16d3cd1. Bugbot is set up for automated code reviews on this repo. Configure here.

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>
@LukasWodka

Copy link
Copy Markdown
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):

  • averaging-service#181 — feat(weights): normalize-on-read — mixed cycles average instead of rejecting (SEC-03 §8 step 2) · author: @shujaatTracebloc · no reviewer assigned
  • averaging-service#182 — feat(weights): averaging writes SafeTensors (TF + PyTorch) — SEC-03 §8 step 4 · author: @shujaatTracebloc · no reviewer assigned
  • backend#1079 — feat(global_meta): edge dataset_meta exposure + attributes contract at ingest (#924 G4a) · author: @divyasinghds · no reviewer assigned
  • backend#1086 — docs(rfc): SafeTensors weight-format migration — SEC-03 Phase 1 (RFC 0004) · author: @shujaatTracebloc · no reviewer assigned
  • backend#1093 — chore(deps): bump django from 5.2.14 to 5.2.15 · author: @dependabot · no reviewer assigned
  • backend#1095 — feat(experiment): configurable preprocessing knobs incl. tabular scaler — RFC 0003 L1 + L1b (#1094) · author: @LukasWodka · no reviewer assigned
  • backend#1100 — fix(boot): pin SDK install to tracebloc==0.11.2, drop 404 dev line (#1098) · author: @LukasWodka · reviewer: @saqlainsyed007
  • backend#1105 — perf(api): query micro-fixes — notifications N+1, cached data_scientist, composite index, sampling (#975) · author: @aptracebloc · no reviewer assigned
  • cli#266 — main - > enhance CLI features and tests · author: @saadqbal · no reviewer assigned
  • cli#278 — fix(deps): toolchain go1.26.5 + x/net v0.57.0 — clear 6 reachable vulns; govulncheck CI gate · author: @LukasWodka · reviewer: @saadqbal

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

@saadqbal
saadqbal merged commit a9435f6 into develop Jul 14, 2026
21 checks passed
@saadqbal
saadqbal deleted the fix/266-empty-env-name branch July 14, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants