Clarify remote cache bootstrap labels

This commit is contained in:
Joe Julian
2026-04-06 20:58:01 -07:00
parent 60172d8c6d
commit 3afe9871e7
2 changed files with 13 additions and 7 deletions
+3 -3
View File
@@ -3400,17 +3400,17 @@ func (u *ui) remoteOpenButtonLabel() string {
if u.selectedRemoteUsesLocalCache() { if u.selectedRemoteUsesLocalCache() {
return "Opening Cached Vault..." return "Opening Cached Vault..."
} }
return "Opening Cached Vault Setup..." return "Creating Local Cache..."
case u.remoteOpenRetryAvailable(): case u.remoteOpenRetryAvailable():
if u.selectedRemoteUsesLocalCache() { if u.selectedRemoteUsesLocalCache() {
return "Retry Cached Vault" return "Retry Cached Vault"
} }
return "Retry Cached Vault Setup" return "Retry Local Cache Setup"
default: default:
if u.selectedRemoteUsesLocalCache() { if u.selectedRemoteUsesLocalCache() {
return "Open Cached Vault" return "Open Cached Vault"
} }
return "Open And Cache Vault" return "Create Local Cache"
} }
} }
+10 -4
View File
@@ -6836,13 +6836,19 @@ func TestUIRemoteOpenButtonLabelOffersRetryAfterFailure(t *testing.T) {
u := newUIWithSession("desktop", &session.Manager{}) u := newUIWithSession("desktop", &session.Manager{})
u.lifecycleMode = "remote" u.lifecycleMode = "remote"
if got := u.remoteOpenButtonLabel(); got != "Open And Cache Vault" { if got := u.remoteOpenButtonLabel(); got != "Create Local Cache" {
t.Fatalf("remoteOpenButtonLabel() = %q, want %q", got, "Open And Cache Vault") t.Fatalf("remoteOpenButtonLabel() = %q, want %q", got, "Create Local Cache")
} }
u.state.ErrorMessage = "open remote vault failed: dial tcp timeout" u.state.ErrorMessage = "open remote vault failed: dial tcp timeout"
if got := u.remoteOpenButtonLabel(); got != "Retry Cached Vault Setup" { if got := u.remoteOpenButtonLabel(); got != "Retry Local Cache Setup" {
t.Fatalf("remoteOpenButtonLabel() after error = %q, want %q", got, "Retry Cached Vault Setup") t.Fatalf("remoteOpenButtonLabel() after error = %q, want %q", got, "Retry Local Cache Setup")
}
u.loadingMessage = "Opening..."
u.state.ErrorMessage = ""
if got := u.remoteOpenButtonLabel(); got != "Creating Local Cache..." {
t.Fatalf("remoteOpenButtonLabel() while busy = %q, want %q", got, "Creating Local Cache...")
} }
} }