From 71a0d75886908d24f24d6873b6ff81adcbfbea0c Mon Sep 17 00:00:00 2001 From: Joe Julian Date: Mon, 6 Apr 2026 17:19:04 -0700 Subject: [PATCH] Align remote setup copy with vault bindings --- main.go | 18 +++++++++++++++--- main_test.go | 30 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index a630f6e..2e3d315 100644 --- a/main.go +++ b/main.go @@ -2109,6 +2109,10 @@ func (u *ui) remotePreferencesRetentionSummary() string { return "KeePassGO keeps up to six recent connections. Store remote credentials in the vault if this connection should persist across devices or reinstalls." } +func (u *ui) remotePreferencesPersistenceSummary() string { + return "After a successful remote open, KeePassGO can keep a local cache vault and store the shared remote target plus this user's credential entry in the vault itself." +} + func (u *ui) availableRemoteProfiles() []vault.RemoteProfile { profiles, err := u.state.RemoteProfiles() if err != nil { @@ -2280,6 +2284,14 @@ func (u *ui) saveCurrentRemoteBindingAction() error { return nil } +func (u *ui) saveCurrentRemoteBindingHeading() string { + return "Bind this local vault to the current remote target" +} + +func (u *ui) saveCurrentRemoteBindingButtonLabel() string { + return "Save Remote In Vault" +} + func (u *ui) materializeCurrentRemoteCache() error { cachePath := strings.TrimSpace(u.vaultPath.Text()) if cachePath == "" { @@ -4377,7 +4389,7 @@ func (u *ui) remotePrefsDialogContent(gtx layout.Context) layout.Dimensions { }, layout.Spacer{Height: unit.Dp(8)}.Layout, func(gtx layout.Context) layout.Dimensions { - return approvalFact(u.theme, "When Sign-in Saves", "Username and password or app token are only stored after a successful remote open when Remember sign-in is enabled.", "")(gtx) + return approvalFact(u.theme, "How Persistence Works", u.remotePreferencesPersistenceSummary(), "")(gtx) }, layout.Spacer{Height: unit.Dp(14)}.Layout, func(gtx layout.Context) layout.Dimensions { @@ -4972,13 +4984,13 @@ func (u *ui) syncMenu(gtx layout.Context) layout.Dimensions { rows = append(rows, layout.Rigid(layout.Spacer{Height: unit.Dp(10)}.Layout), layout.Rigid(func(gtx layout.Context) layout.Dimensions { - lbl := material.Label(u.theme, unit.Sp(11), "Store the current remote sign-in in this vault") + lbl := material.Label(u.theme, unit.Sp(11), u.saveCurrentRemoteBindingHeading()) lbl.Color = mutedColor return lbl.Layout(gtx) }), layout.Rigid(layout.Spacer{Height: unit.Dp(6)}.Layout), layout.Rigid(func(gtx layout.Context) layout.Dimensions { - return tonedButton(gtx, u.theme, &u.saveCurrentRemoteBinding, "Save Current Remote In Vault") + return tonedButton(gtx, u.theme, &u.saveCurrentRemoteBinding, u.saveCurrentRemoteBindingButtonLabel()) }), ) } diff --git a/main_test.go b/main_test.go index 1795626..95d3257 100644 --- a/main_test.go +++ b/main_test.go @@ -5511,6 +5511,16 @@ func TestUIRemotePreferencesHelpExplainsLocationOnlyRetention(t *testing.T) { } } +func TestUIRemotePreferencesPersistenceSummaryExplainsVaultBindingFlow(t *testing.T) { + t.Parallel() + + u := newUIWithSession("desktop", &session.Manager{}) + + if got := u.remotePreferencesPersistenceSummary(); got != "After a successful remote open, KeePassGO can keep a local cache vault and store the shared remote target plus this user's credential entry in the vault itself." { + t.Fatalf("remotePreferencesPersistenceSummary() = %q, want local-first vault-binding guidance", got) + } +} + func TestUIRemotePreferencesHelpDialogToggle(t *testing.T) { t.Parallel() @@ -5568,6 +5578,26 @@ func TestUIRemoteLifecycleMessageUsesLocalCacheLanguageForBoundRemote(t *testing } } +func TestUISaveCurrentRemoteBindingHeadingExplainsVaultBinding(t *testing.T) { + t.Parallel() + + u := newUIWithSession("desktop", &session.Manager{}) + + if got := u.saveCurrentRemoteBindingHeading(); got != "Bind this local vault to the current remote target" { + t.Fatalf("saveCurrentRemoteBindingHeading() = %q, want vault binding guidance", got) + } +} + +func TestUISaveCurrentRemoteBindingButtonLabelUsesSyncLanguage(t *testing.T) { + t.Parallel() + + u := newUIWithSession("desktop", &session.Manager{}) + + if got := u.saveCurrentRemoteBindingButtonLabel(); got != "Save Remote In Vault" { + t.Fatalf("saveCurrentRemoteBindingButtonLabel() = %q, want sync-target language", got) + } +} + func TestUIRemoteOpenButtonLabelUsesLocalCacheLanguageForBoundRemote(t *testing.T) { t.Parallel()