fix(cli): home screen labels the env by remembered client name (bugbot #266)#267
Merged
Conversation
…he Helm release realProbeEnv surfaces the Helm release name (e.g. "tracebloc") when a release is found, while the offline paths surface no name and fall back to the remembered client name (e.g. "acme-01"). resolveHomeModel only used remembered when the probe name was empty, so the SAME environment read "tracebloc" Online/Starting but "acme-01" Offline — a state-dependent label for one environment. Prefer the remembered client name whenever it exists; keep the probe's release name only as a last-resort fallback for a release present on a machine that never cached a client. Adds a regression test where the probe name differs from remembered (the case the fake probe never exercised). Fixes the Cursor Bugbot "Home shows Helm release as env name" finding on #266. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
shujaatTracebloc
approved these changes
Jul 14, 2026
aptracebloc
approved these changes
Jul 14, 2026
saadqbal
added a commit
that referenced
this pull request
Jul 14, 2026
…red label (#274) #267 made resolveHomeModel overwrite env.name with the remembered client name for display. But the offline-vs-no-env classifier reads `env.name != ""` to mean "the probe surfaced an environment name" — so a leftover ActiveClientName/ID with no cached namespace (provisioned=false) now masquerades as a reachable environment and renders Offline + full menu instead of the no-environment installer path. Capture the probe's own surfaced name (probeNamedEnv) BEFORE the display-name override and classify on that: `provisioned || probeNamedEnv`. A remembered display label with no namespace is no longer evidence of an environment. Adds a regression test for the leftover-name-without-namespace case. Fixes the Cursor Bugbot "Remembered name skews offline detection" finding on #266 (learned rule: commands targeting the active client must use bindActiveClientNamespace). Co-authored-by: Claude Opus 4.8 <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.
What
The bare-CLI home screen labels the secure environment differently depending on state:
tracebloc), becauserealProbeEnvsetsenvProbe{name: release.ReleaseName}.acme-01), because the offline paths surface no name andresolveHomeModelfalls back toremembered.Same environment, two labels.
resolveHomeModelonly usedrememberedwhen the probe name was empty.Fix
Prefer the remembered client name whenever it exists; keep the probe's release name only as a last-resort fallback (a release present on a machine that never cached a client). One-line change in
resolveHomeModel.Why the tests didn't catch it
The
baseDepsfake probe returned the friendly nameacme-01— never the release name — so no test made the probe name differ fromremembered. AddedTestResolveHomeModel_PrefersRememberedNameOverReleaseName, where the probe returnstraceblocwhile remembered isacme-01; it fails on the oldif env.name == ""logic and passes on the fix.Verification
gofmtclean;go test ./internal/cli/green (incl. the new regression test).Resolves the Cursor Bugbot "Home shows Helm release as env name" finding on #266. Once merged to
develop, the promote PR #266 picks it up automatically.🤖 Generated with Claude Code
Note
Low Risk
Small display-label fix in CLI home resolution with a targeted regression test; no auth, cluster, or data-path behavior changes.
Overview
The bare CLI home screen showed different secure-environment labels depending on state: Online/Starting used the cluster probe’s Helm release name (e.g.
tracebloc), while Offline used the remembered client name (e.g.acme-01) because offline paths left the probe name empty and only then fell back to remembered.resolveHomeModelnow always prefers the remembered client name when one exists, and keeps the probe’s release name only when nothing was cached—so the same provisioned machine shows one user-facing label in every state. Comments document why release vs client names diverge.Adds
TestResolveHomeModel_PrefersRememberedNameOverReleaseName, with the probe returningtraceblocand rememberedacme-01, which the previousif env.name == ""logic would not catch.Reviewed by Cursor Bugbot for commit 426659e. Bugbot is set up for automated code reviews on this repo. Configure here.