feat: Skip double confirmation for authorization#451
feat: Skip double confirmation for authorization#451JackZhao10086 merged 1 commit intolarksuite:mainfrom
Conversation
📝 WalkthroughWalkthroughThe change removes the "Phase 2: confirmation" step from the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR removes the Phase 2 confirmation dialog from Confidence Score: 5/5Safe to merge — the change is a clean, intentional UX simplification with one minor dead-code cleanup left behind. Only finding is a P2 orphaned cmd/auth/login_messages.go — Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User
participant F1 as Form 1 (domain + perm)
participant S as Scope Summary
participant A as Auth Flow
U->>F1: Select domains
F1->>U: Show permission level selector
U->>F1: Select permission level
F1->>S: Compute & print scope summary
Note over S: (previously: Form 2 confirm dialog here)
S->>A: Return interactiveResult directly
A->>U: Open browser / device-code flow
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@72ff2fcd2e730d7c0b95908e9d6486fb0c1bc673🧩 Skill updatenpx skills add mazhe-nerd/lark-cli#feature/easy-setup -y -g |
|
感谢你的贡献 |
The secondary confirmation step in the interactive login process has been removed (Phase 2: After the user selects the complete domain name, permission level, and scope, they no longer need to confirm "authorize" again and can directly proceed to the authorization process).
Summary
auth login交互式登录流程中的二次确认步骤(Phase 2:confirmation)。用户在选择完域名、权限级别和 scope
后,不再需要额外确认一次"是否授权",直接进入授权流程。
Changes
cmd/auth/login_interactive.go:删除 21 行代码,移除了基于huh.Confirm的确认弹窗逻辑。用户选完配置、打印摘要后直接返回结果,减少一步交互。
Motivation
简化
lark-cli auth login的首次配置体验(easy-setup),减少不必要的交互摩擦。用户在前面的步骤中已经明确选择了域名和权限范围,摘要信息也已打印,额外的确认步骤显得冗余。
Test Plan
lark-cli auth login,确认选择域名和权限后能直接完成授权,不再出现确认提示