Skip to content

feat: select resource region during context setup - #236

Merged
YoungJinJung merged 1 commit into
DevopsArtFactory:mainfrom
youngjinjung-linq:feature/issue-235-setup-region-picker
Aug 5, 2026
Merged

feat: select resource region during context setup#236
YoungJinJung merged 1 commit into
DevopsArtFactory:mainfrom
youngjinjung-linq:feature/issue-235-setup-region-picker

Conversation

@youngjinjung-linq

@youngjinjung-linq youngjinjung-linq commented Aug 5, 2026

Copy link
Copy Markdown

Summary

Add setup-time resource-region selection for multi-region contexts.

  • prompt for a resource region after any required SSO account and role selection
  • skip the picker for single-region contexts
  • export the selected session region without changing the persisted default
  • preserve all configured regions on generated concrete SSO contexts
  • leave the current context unchanged when region selection is cancelled

Related Issues

Closes #235

Validation

  • go vet ./...
  • make test
  • make build
  • git diff --check

Checklist

  • Scope is focused
  • Branch name follows docs/branch-naming-harness.md
  • Documentation harness reviewed (docs/documentation-harness.md)
  • README updated if user-facing behavior changed
  • Relevant docs/ pages updated if architecture, auth, config, or workflow changed
  • Tests/validation included
  • Breaking changes documented (none)

Summary by CodeRabbit

  • New Features

    • Added resource-region selection to context setup for contexts with multiple configured regions.
    • Selected regions are applied to the current session and reflected in generated AWS environment exports.
    • Added filtering and keyboard navigation for context, account, role, and region selection.
    • Single-region contexts now skip unnecessary region selection.
  • Documentation

    • Updated setup and architecture documentation to explain session region behavior and preserved default settings.

- prompt multi-region contexts after account and role resolution
- export the selected session region without changing the stored default
- preserve single-region behavior and cancellation safety
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 26adfecf-7b21-4396-abb2-f3fd29c43c70

📥 Commits

Reviewing files that changed from the base of the PR and between cf9c5f5 and cb2a69e.

📒 Files selected for processing (6)
  • README.md
  • docs/architecture.en.md
  • docs/architecture.ko.md
  • internal/auth/setup.go
  • internal/auth/setup_test.go
  • internal/cli/context.go
📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: test
🧰 Additional context used
📓 Path-based instructions (4)
**/*.go

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.go: Use lipgloss for styled TUI output — column-aligned tables with dimmed labels in Go implementation files
Implement scroll windowing with formula: visibleLines := max(m.height-N, 5) in Go TUI implementation

Files:

  • internal/cli/context.go
  • internal/auth/setup.go
  • internal/auth/setup_test.go

⚙️ CodeRabbit configuration file

**/*.go: For Go reviews, look beyond compilation and prioritize nil pointer risks,
context propagation, AWS SDK pagination, error wrapping, deterministic
sorting, and stable table/detail rendering. For new AWS service work,
verify that repository interfaces, model mapping, app integration, and
tests are updated together.

Files:

  • internal/cli/context.go
  • internal/auth/setup.go
  • internal/auth/setup_test.go
docs/**

⚙️ CodeRabbit configuration file

docs/**: Documentation must match implemented behavior. When both English and
Korean docs are updated, verify that they preserve the same meaning.

Files:

  • docs/architecture.en.md
  • docs/architecture.ko.md
README.md

📄 CodeRabbit inference engine (CLAUDE.md)

README.md: When adding, modifying, or deleting features, always update README.md in parallel with code changes
Update Currently Implemented Features table in README.md: add new services/features, update status changes (🚧→✅), remove deleted items
Update TUI Key Bindings table in README.md when key bindings are added, changed, or deleted
Update Usage section in README.md when new CLI commands or flags are added
Update Configuration section in README.md when configuration format changes

Files:

  • README.md

⚙️ CodeRabbit configuration file

README.md: Verify that README changes match actual CLI/TUI behavior and that
Currently Implemented Features, TUI Key Bindings, Usage, and
Configuration content stay aligned with code changes.

Files:

  • README.md
**/*_test.go

📄 CodeRabbit inference engine (CLAUDE.md)

Tests use mock client interfaces (see rds_test.go pattern) in Go test files

Files:

  • internal/auth/setup_test.go

⚙️ CodeRabbit configuration file

**/*_test.go: Check that tests cover API errors, mapping edge cases, and navigation
state transitions, not only happy paths. Prefer mock-based tests that do
not depend on external AWS calls.

Files:

  • internal/auth/setup_test.go
🔇 Additional comments (6)
internal/auth/setup.go (1)

52-52: LGTM!

Also applies to: 65-76, 79-118, 198-218

internal/cli/context.go (1)

108-108: LGTM!

internal/auth/setup_test.go (1)

5-6: LGTM!

Also applies to: 16-100, 130-130, 143-152, 171-177

README.md (1)

120-120: LGTM!

docs/architecture.en.md (1)

198-199: LGTM!

docs/architecture.ko.md (1)

198-199: LGTM!


Walkthrough

unic context setup now selects a session resource region for concrete and SSO contexts. Multi-region contexts use an interactive picker. The selected region updates AWS exports without changing persisted defaults. Tests and documentation cover the new behavior.

Changes

Resource region setup

Layer / File(s) Summary
Setup flow integration
internal/auth/setup.go, internal/cli/context.go
Setup resolves and applies a resource region for concrete and SSO contexts. The command description includes resource-region resolution.
Resource region picker
internal/auth/setup.go
The picker deduplicates regions, marks the default, skips prompts for single-region contexts, and supports filtering and cancellation.
Setup validation and documentation
internal/auth/setup_test.go, README.md, docs/architecture.en.md, docs/architecture.ko.md
Tests cover selection, cancellation, exports, and preserved SSO region lists. Documentation describes session-only region selection.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: youngjinjung

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required feat: prefix and clearly describes resource-region selection during context setup.
Description check ✅ Passed The description includes the required summary, issue, validation, and checklist sections with relevant details.
Linked Issues check ✅ Passed The changes implement multi-region selection, session exports, cancellation behavior, and configured-region preservation requested by issue #235.
Out of Scope Changes check ✅ Passed All code, tests, documentation, and command updates support the resource-region setup behavior described in issue #235.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@YoungJinJung
YoungJinJung merged commit 744b139 into DevopsArtFactory:main Aug 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: select resource region during context setup

2 participants