Skip to content

tui_app_server: cancel active login before Ctrl+C exit#15673

Merged
etraut-openai merged 1 commit intomainfrom
etraut/tui-app-server-login-ctrl-c-cancel
Mar 24, 2026
Merged

tui_app_server: cancel active login before Ctrl+C exit#15673
etraut-openai merged 1 commit intomainfrom
etraut/tui-app-server-login-ctrl-c-cancel

Conversation

@etraut-openai
Copy link
Collaborator

@etraut-openai etraut-openai commented Mar 24, 2026

Summary

Fixes slow Ctrl+C exit from the ChatGPT browser-login screen in tui_app_server.

Root cause

Onboarding-level Ctrl+C quit bypassed the auth widget's cancel path. That let the active ChatGPT login keep running, and in-process app-server shutdown then waited on the stale login attempt before finishing.

Changes

  • Extract a shared cancel_active_attempt() path in the auth widget
  • Use that path from onboarding-level Ctrl+C before exiting the TUI
  • Add focused tests for canceling browser-login and device-code attempts
  • Add app-server shutdown cleanup that explicitly drops any active login before draining background work

@fcoury
Copy link
Contributor

fcoury commented Mar 24, 2026

@etraut-openai approved

@etraut-openai etraut-openai merged commit c023e9d into main Mar 24, 2026
36 checks passed
@etraut-openai etraut-openai deleted the etraut/tui-app-server-login-ctrl-c-cancel branch March 24, 2026 21:11
@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants