From b945baa3ddf8dd81e090514b06a35ade3d508363 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Thu, 18 Dec 2025 16:53:43 -0300 Subject: [PATCH] fix(onboarding): address `c` key press not working on onboarding (#1663) --- internal/tui/components/chat/splash/splash.go | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/internal/tui/components/chat/splash/splash.go b/internal/tui/components/chat/splash/splash.go index 6a7db9440453b8d1f7751bd5ca7eb66ecd339828..e8e372f6ea20c52731ec6539ec058770df27aab2 100644 --- a/internal/tui/components/chat/splash/splash.go +++ b/internal/tui/components/chat/splash/splash.go @@ -205,25 +205,23 @@ func (s *splashCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) { } case tea.KeyPressMsg: switch { - case key.Matches(msg, s.keyMap.Copy): - if s.showClaudeOAuth2 && s.claudeOAuth2.State == claude.OAuthStateURL { - return s, tea.Sequence( - tea.SetClipboard(s.claudeOAuth2.URL), - func() tea.Msg { - _ = clipboard.WriteAll(s.claudeOAuth2.URL) - return nil - }, - util.ReportInfo("URL copied to clipboard"), - ) - } else if s.showClaudeAuthMethodChooser { - u, cmd := s.claudeAuthMethodChooser.Update(msg) - s.claudeAuthMethodChooser = u.(*claude.AuthMethodChooser) - return s, cmd - } else if s.showClaudeOAuth2 { - u, cmd := s.claudeOAuth2.Update(msg) - s.claudeOAuth2 = u.(*claude.OAuth2) - return s, cmd - } + case key.Matches(msg, s.keyMap.Copy) && s.showClaudeOAuth2 && s.claudeOAuth2.State == claude.OAuthStateURL: + return s, tea.Sequence( + tea.SetClipboard(s.claudeOAuth2.URL), + func() tea.Msg { + _ = clipboard.WriteAll(s.claudeOAuth2.URL) + return nil + }, + util.ReportInfo("URL copied to clipboard"), + ) + case key.Matches(msg, s.keyMap.Copy) && s.showClaudeAuthMethodChooser: + u, cmd := s.claudeAuthMethodChooser.Update(msg) + s.claudeAuthMethodChooser = u.(*claude.AuthMethodChooser) + return s, cmd + case key.Matches(msg, s.keyMap.Copy) && s.showClaudeOAuth2: + u, cmd := s.claudeOAuth2.Update(msg) + s.claudeOAuth2 = u.(*claude.OAuth2) + return s, cmd case key.Matches(msg, s.keyMap.Back): if s.showClaudeAuthMethodChooser { s.claudeAuthMethodChooser.SetDefaults()