Skip to content

feat: reuse store encryption prompt in profile new flow#109

Merged
rmanibus merged 1 commit into
mainfrom
feat/profile-new-store-encryption-consistency
Mar 15, 2026
Merged

feat: reuse store encryption prompt in profile new flow#109
rmanibus merged 1 commit into
mainfrom
feat/profile-new-store-encryption-consistency

Conversation

@rmanibus
Copy link
Copy Markdown
Contributor

Summary

  • Make profile new consistent with store new when creating a new store interactively.
  • Reuse existing store encryption prompting logic instead of duplicating behavior.
  • Keep encryption detection logic centralized and shared.

What Changed

  • cmd/cloudstic/cmd_profile.go
    • Track whether a store was newly created during profile new.
    • When a new store is created in interactive mode, invoke promptEncryptionConfig(...).
    • Extend promptStoreSelection(...) to return whether a store was created.
  • cmd/cloudstic/cmd_store.go
    • Add shared helper storeHasExplicitEncryption(...).
    • Reuse helper in runStoreNew and checkOrInitStore.

Why

Previously, users got encryption/keychain setup prompts when using store new, but not when creating a store from profile new, which created inconsistent UX and left newly created profile stores without guided secret setup.

Validation

  • go test ./cmd/cloudstic -count=1
  • golangci-lint run ./...

@rmanibus rmanibus added the enhancement New feature or request label Mar 15, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 8.69565% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/cloudstic/cmd_profile.go 12.50% 13 Missing and 1 partial ⚠️
cmd/cloudstic/cmd_store.go 0.00% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

@rmanibus rmanibus merged commit 9958ea7 into main Mar 15, 2026
4 of 5 checks passed
@rmanibus rmanibus deleted the feat/profile-new-store-encryption-consistency branch March 15, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant