fix(s3): configure profile picker + rebuild mv wizard on the shared engine#46
Merged
Conversation
The configure wizard's first step was a free-text profile prompt that ignored existing profiles — confusing when you already have default/production set up. Replace it with a Select of existing profiles (each tagged "S3 configured" / "no S3 credentials yet") plus "+ Create new profile…", defaulting the selection to the active profile. A conditional new-name step prompts only when creating. --profile and the other flags are unaffected (a preset profile skips the picker). The new-name step's Resetter is a no-op so skipping it (existing profile) doesn't clobber the chosen profile back to the default. Adds profileChoices + tests; updates the wizard-flow docs in README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The mv interactive wizard was hand-rolled (manual "Step N of M" headers + intro banner + per-prompt hint bars). Rebuild it on the verdagostack wizard engine, exactly like `s3 configure`: progress bar + engine-rendered hint bar + exit-confirmation on Ctrl+C. Steps — source bucket → source object → dest bucket (pick or "+ Create new bucket…") → dest key — use dynamic Loaders; the source-object list depends on the chosen bucket via the store. A source fixed by an argument pre-sets and skips those steps. Source selection, confirm, bucket creation, and the move run around engine.Run, mirroring configure's save-after-wizard. Removes the now-unused hand-rolled helpers (navIdx, selectStep, moveConfirmStep, printMoveStep, buildMoveSteps, the step consts, plus selectObjectKey / pickSourceBucket in picker.go). New tests: TestBuildMoveFlow_CollectsSelections (engine drives the steps into state) and TestFinalizeMove_S3ToS3 (confirm → CopyObject + DeleteObject), replacing the old hand-rolled wizard tests. make build / make lint (0 issues, incl. CI's golangci-lint v2.5.0) / make test pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… get keys - DefaultEndpoint is now https://objects.fin-03.verda.storage (replacing the stale s3.verda.cloud placeholder) — the configure wizard's pre-filled endpoint and the client fallback when none is set. - The wizard pre-fills the endpoint (Enter to accept) and region (us-east-1), so the user typically only picks a profile and pastes the access key + secret. - configure now triggers the wizard only when a key is missing; the endpoint defaults when omitted, so `configure --access-key X --secret-key Y` is fully non-interactive. - Tell users where to create keys (dashboard: log in -> project -> Project management -> Credentials -> Object Storage Access Keys) in --help and a note printed at the start of the wizard. Test: TestConfigureFlagMode_DefaultsEndpointAndRegion. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Two related S3 interactive-wizard UX improvements.
1.
s3 configure— pick existing profile or create newThe configure wizard's first step was a free-text profile prompt that had no awareness of existing profiles — confusing when you already have
default/productionset up, and easy to write S3 keys into the wrong section.Replaced with a Select: lists existing profiles (each tagged "S3 configured" / "no S3 credentials yet") plus "+ Create new profile…" (which reveals a conditional name prompt), defaulting the selection to the active profile (
--profile/VERDA_PROFILE/verda auth use).--profile <name>still pre-sets and skips the picker.2.
s3 mv— rebuilt on the shared wizard engine (matchesconfigure)mv's interactive wizard was hand-rolled (manual "Step N of M" headers, intro banner, per-prompt hint bars). Rebuilt on the verdagostack wizard engine, exactly likeconfigure: progress bar + engine-rendered hint bar + exit-confirmation on Ctrl+C.s3 mv s3://b/key) pre-sets and skips those steps.engine.Run, mirroring configure's save-after-wizard.navIdx,selectStep,moveConfirmStep,printMoveStep,buildMoveSteps,selectObjectKey,pickSourceBucket).Notes & testing
configurewrite-vs-read profile asymmetry documented in the README; the picker defaulting to the active profile keeps them aligned.TestProfileChoices*,TestBuildMoveFlow_CollectsSelections,TestFinalizeMove_S3ToS3; updated thebuildConfigureFlowwizard tests for the Select/create-new path.make build,make test, andmake lint(0 issues) all pass — verified against CI's pinned golangci-lint v2.5.0.🤖 Generated with Claude Code