fix(console): clear stale k8s status text on a successful reload (studio#119) - #124
Merged
Merged
Conversation
…dio#119) loadK8sNamespaces() / loadK8sContexts() only ever wrote to identityStatusEl in the catch path — nothing cleared it on success. A failed attempt against one context (e.g. the ambient current-context before the user picks a different one) left its error text on screen even after a later load against a different context succeeded, which read as "still broken" when it wasn't. Live-debugged with Brett: this is part of why the orbstack namespace-listing failure looked confusing at first. Ref #119.
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.
Summary
Item 4 of #119's runbook.
loadK8sNamespaces()/loadK8sContexts()inconsole/src/deploy.tsonly ever wrote toidentityStatusElin thecatchpath — nothing cleared it on success. A failed attempt against one context (e.g. the ambient current-context, before the user picks a different one from the dropdown) left its error text on screen even after a later load against a different context succeeded — which reads as "still broken" when it isn't.This was live-debugged with Brett as part of #119's investigation: it's part of why the orbstack namespace-listing failure looked confusing to diagnose in the moment (the real root cause turned out to be #120's rustls panic, but this staleness bug muddied the signal while narrowing it down).
Fix
Both functions now call
setStatus(identityStatusEl, "")right after a successful reload, clearing any leftover error text from a prior attempt.Verification
npm run typecheckclean,npm test106/106 passing,npm run buildsucceeds.Ref #119.
🤖 Generated with Claude Code