feat: make ECR login TUI-first and document the TUI-first product rule - #256
Conversation
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
|
Warning Review limit reached
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
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. Comment |
There was a problem hiding this comment.
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
screenECRLoginHelperscreen with full TUI integration FeatureECRLoginHelperfeature exposed in the service catalogecrLoginResolvedMsgmessage 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
left a comment
There was a problem hiding this comment.
냉정 리뷰: 화면은 active unic context로 registry를 찾지만, 복사되는 명령은 그 context를 전달하지 않습니다.
| if err != nil { | ||
| return errMsg{err: err} | ||
| } | ||
| docker, err := awsservice.BuildECRLoginCommand(registryURI, m.cfg.Region, awsservice.ECRRuntimeDocker) |
There was a problem hiding this comment.
[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을 실행하는 흐름이 필요합니다.
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
|
Addressed: copied commands are now prefixed with |
Summary
Implements #178: unic's product posture is TUI-first, and ECR login was the one service capability still framed as CLI-first.
ccopies the Docker command,pthe Podman command,rre-resolves.unic ecr loginstays unchanged as a secondary scripting/automation helper, and README now frames it that way.Testing
go test ./...passes, including new tests for the login-resolved message/screen transition, view content, esc navigation, and the catalog entry.make buildpasses.Closes #178