Conversation
📝 WalkthroughWalkthroughConsolidates stack/provider inputs into a Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as Client CLI
participant SL as SessionLoader
participant SM as StacksManager
participant DS as DataSource (local/remote)
CLI->>SL: Build GetStackOpts (Default := global.Stack)
SL->>SM: GetStack(ctx, GetStackOpts)
alt Default specified
SM->>SM: resolve getSpecifiedStack(Default.Name)
SM->>DS: fetch stack data (local/remote)
DS-->>SM: stack parameters
SM-->>SL: Parameters (merged)
else Interactive
SM->>SM: getStackInteractively(opts.SelectStackOptions)
SM-->>SL: Selected Parameters
end
SL-->>CLI: return resolved stack Parameters
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.5.0)level=warning msg="[linters_context] running gomodguard failed: unable to read module file go.mod: current working directory must have a go.mod file: if you are not using go modules it is suggested to disable this linter" Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/pkg/session/session.go`:
- Around line 70-75: When sl.sm is nil in SessionLoader.loadStack, the code
currently unconditionally overwrites sl.opts.Fallback.Name with
stacks.DefaultBeta; change this so you only set fallback.Name =
stacks.DefaultBeta when the existing fallback.Name is empty. Locate
SessionLoader.loadStack and the fallback variable derived from sl.opts.Fallback,
and add a conditional check (e.g., if fallback.Name == "" or equivalent) before
assigning stacks.DefaultBeta, so a user-specified stack name is preserved when
the manager can't be created.
🧹 Nitpick comments (1)
src/pkg/stacks/manager.go (1)
286-291: Track the TODO for selector prefill.The TODO indicates missing UX behavior (prefill from fallback). Please convert to a tracked issue or implement when feasible.
edwardrf
left a comment
There was a problem hiding this comment.
I don't quite like the name fallback, but I don't have a better idea.
use default options from command line, if set
86abce4 to
02fa089
Compare
Description
Since we removed all occurrences of
global.Stackwithsession.Stack, we ignore the flags (apart from--provider), resulting in accidentally downgrading Portal from HA to affordable.This PR uses the
global.Stackas the fallback stack.Linked Issues
Checklist
Summary by CodeRabbit
Bug Fixes
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.