Skip to content

feat: make ECR login TUI-first and document the TUI-first product rule - #256

Merged
YoungJinJung merged 3 commits into
mainfrom
feature/issue-178-tui-first-ecr-login
Aug 14, 2026
Merged

feat: make ECR login TUI-first and document the TUI-first product rule#256
YoungJinJung merged 3 commits into
mainfrom
feature/issue-178-tui-first-ecr-login

Conversation

@YoungJinJung

Copy link
Copy Markdown
Contributor

Summary

Implements #178: unic's product posture is TUI-first, and ECR login was the one service capability still framed as CLI-first.

  • New ECR Login Helper feature in the TUI under the ECR service: resolves the private registry URI for the active context and shows copyable Docker and Podman login commands. c copies the Docker command, p the Podman command, r re-resolves.
  • unic ecr login stays unchanged as a secondary scripting/automation helper, and README now frames it that way.
  • README gains a Product Principles section stating the TUI-first rule.
  • CONTRIBUTING's PR checklist gains a TUI-first review item so future service features default to a TUI entry point.

Testing

  • go test ./... passes, including new tests for the login-resolved message/screen transition, view content, esc navigation, and the catalog entry.
  • make build passes.

Closes #178

Add an ECR Login Helper feature to the TUI: it resolves the private
registry URI for the active context and shows copyable Docker and
Podman login commands (c/p to copy, r to refresh). The existing
`unic ecr login` CLI command stays as a secondary scripting helper and
is documented as such. README gains a Product Principles section and
the CONTRIBUTING PR checklist gains a TUI-first review item so future
service features default to a TUI entry point.

Closes #178

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFhLrnpVxivu62cC3k9NZB
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@YoungJinJung, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 36aba899-ec4b-4228-996f-ed2b1666f49d

📥 Commits

Reviewing files that changed from the base of the PR and between 808d0a6 and 34b2f15.

📒 Files selected for processing (10)
  • CONTRIBUTING.md
  • README.md
  • internal/app/app.go
  • internal/app/help.go
  • internal/app/messages.go
  • internal/app/screen_ecr.go
  • internal/app/screen_ecr_login_test.go
  • internal/domain/catalog.go
  • internal/domain/catalog_test.go
  • internal/domain/model.go

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.

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR successfully adds an ECR Login Helper feature to the TUI application. The implementation is well-structured and follows existing codebase patterns consistently.

Key additions:

  • New screenECRLoginHelper screen with full TUI integration
  • FeatureECRLoginHelper feature exposed in the service catalog
  • ecrLoginResolvedMsg message type for login command handling
  • Helper methods for Docker and Podman login command generation
  • Comprehensive test coverage for the new screen and feature
  • Documentation updates in README.md, CONTRIBUTING.md, and help screens

Code quality:

  • All changes are additive with no breaking modifications
  • Follows established patterns from existing ECR and other feature implementations
  • Proper error handling and clipboard integration
  • Tests validate screen transitions and view rendering

The implementation is ready for merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@youngjinjung-linq youngjinjung-linq left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

냉정 리뷰: 화면은 active unic context로 registry를 찾지만, 복사되는 명령은 그 context를 전달하지 않습니다.

if err != nil {
return errMsg{err: err}
}
docker, err := awsservice.BuildECRLoginCommand(registryURI, m.cfg.Region, awsservice.ECRRuntimeDocker)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] registry URI는 m.cfg의 unic context 자격증명으로 해석하지만, 생성되는 명령은 plain aws ecr get-login-password --region ...라서 실행 시 shell의 ambient AWS profile/credentials를 사용합니다. SSO/assume_role/okta_saml context에서는 다른 계정에 로그인하거나 인증 실패할 수 있어 ‘active context login’ 보장이 깨집니다. 복사 명령이 unic context의 exports를 적용하도록 만들거나, 더 단순하게 unic 자체가 ECR authorization token을 받아 login을 실행하는 흐름이 필요합니다.

YoungJin and others added 2 commits August 14, 2026 09:25
Address review: the registry URI was resolved with the unic context's
credentials, but the copied command ran with the shell's ambient AWS
credentials, so SSO/assume-role/okta contexts could log in to a
different account or fail. Copied commands are now prefixed with
eval "$(unic env <context>)" so the login uses the same context the
screen resolved the registry with.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFhLrnpVxivu62cC3k9NZB
@YoungJinJung

Copy link
Copy Markdown
Contributor Author

Addressed: copied commands are now prefixed with eval "$(unic env <context>)" && ... so the login runs under the same unic context that resolved the registry URI, instead of the shell's ambient credentials. Kept the token out of the clipboard by reusing the existing env-export flow rather than embedding an authorization token. Added a unit test for the prefix (and the no-context fallback), and README documents the behavior.

@YoungJinJung
YoungJinJung merged commit 9aa740a into main Aug 14, 2026
1 of 2 checks passed
@YoungJinJung
YoungJinJung deleted the feature/issue-178-tui-first-ecr-login branch August 14, 2026 00:26
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.

product: keep CLI helpers secondary to TUI workflows

2 participants