TUI: Restore authentication after /logout - #14568
Conversation
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR changes the TUI authentication flow so signed-out users see an explicit welcome screen, /logout starts a fresh device-authorization flow through the web logout endpoint, and the TUI renders new signed-out/waiting auth states with render-to-lines coverage. The logout continuation validation is appropriately constrained to the configured Warp web /device URL, and no approved spec context was available for a spec-alignment pass.
Concerns
- The signed-out welcome screen renders a static
https://app.warp.dev/loginfallback, but following that URL manually does not start the TUI device-code request or polling, so users who take the displayed fallback literally can remain stuck on the welcome screen.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
|
||
| const AUTH_COPY_COLS: u16 = 48; | ||
| const AUTH_ANIMATION_COLS: u16 = 32; | ||
| const SIGN_IN_URL: &str = "https://app.warp.dev/login"; |
There was a problem hiding this comment.
/login URL is rendered as the manual fallback, but opening it directly does not start AuthManager::authorize_device or the TUI polling flow; users who copy the displayed URL can log in on the web and still remain on SignedOutWelcome. Start device authorization before showing a manual URL and render the generated browser_url, or change the copy so it does not point users to a non-functional fallback.
There was a problem hiding this comment.
going to update to not show this generic login URL but flagging that we won't be able to exactly match this mock anymore https://www.figma.com/design/yg5nbPZuGoAszHS3Rhvehu/TUI?node-id=1765-17599&m=dev
Return signed-out users to an explicit device login flow and route /logout through a validated browser continuation so the TUI can authenticate again without restarting. Co-Authored-By: Oz <oz-agent@warp.dev>
3255b81 to
60575a0
Compare
kevinyang372
left a comment
There was a problem hiding this comment.
This change makes sense to me
One UX improvement here we should do is when opening browser failed and user has to use the fallback url -- we currently only expose a manual click to open link action which could still fail if user is on a remote SSH machine. I think we should expose a copy url button (agent mode also suggests some other way like: provide an OSC-52 “copy URL” action or an OSC-8 hyperlink)
added a c to copy URL action |


Description
Restores a complete authentication path after
/logoutin the headless TUI./logout?continue=…browser URL so the prior web session is cleared first.This is the client half of the auth-return handshake; the browser implementation is in warpdotdev/warp-server#13620.
Linked Issue
None.
ready-to-specorready-to-implement.Testing
https://www.loom.com/share/2c6d09cb0d0c41658e5a97514f8f347b
./script/format --check./script/check_no_inline_test_moduleswarpClippy, andwarp_completerClippy with warnings deniedcargo nextest run -p warp_tui(906/906 tests passed)./script/runThe changed surface is the headless TUI, so manual verification used the real TUI in a full terminal rather than the GUI
./script/runpath.Agent Mode
Co-Authored-By: Oz oz-agent@warp.dev