Repository navigation
fix: login form freezes on paste; login command never exits - #4
Merged
Merged
Conversation
- SmartTextInput and the REPL input dropped any stdin chunk longer than one char, so pasting an email froze the login form. Accept multi-char chunks, stripping control characters. - A newline embedded in a pasted chunk now submits after inserting (Ink only sets key.return for a lone CR). - Track the latest value in a ref: paste followed immediately by Enter submitted the pre-paste value from a stale closure. - The login subcommand never exited after successful auth (LoginForm rendered null forever). New onDone prop prints the authenticated email and exits 0. - Surface the backend's 401 detail (e.g. 'Incorrect email or password') instead of the generic 'Not authenticated', and include the target URL in connection errors so a wrong serverUrl is diagnosable.
jpalanco
pushed a commit
that referenced
this pull request
Oct 24, 2026
… frame shapes' (#4) from ws-auth-subprotocol into main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the two login failures reported against the dev environment (browser flow errored, headless froze):
SmartTextInput(and the REPL input) dropped any stdin chunk longer than one character, so pastingplexicus@plexicus.aidid nothing and the form appeared hung. Multi-char chunks are now accepted with control characters stripped.key.returnfor a lone CR, so an embedded newline now means insert-then-submit.plexicus loginnever exited on success:LoginFormrenderednullforever afterdone. A newonDoneprop prints✓ Authenticated as <email>and exits 0 (only wired in the login subcommand; the in-TUI AuthGate flow is unchanged).detail(e.g.Incorrect email or password) instead of the genericNot authenticated, and connection failures include the target URL, so a staleserverUrlpointing at a down server is immediately diagnosable.Root cause of the reported browser error
Not a TUI bug:
POST /sessionsonapi.app.dev.plexicus.airejects the test credentials withIncorrect email or password— the same backend serves the web login, hence the browser error. The dev frontend does have the/auth/clipage and the/auth/cli/exchangeendpoint, so the browser flow should work once valid dev credentials exist.Test plan
bun run typecheck— zero errorsbun test— 54/54 pass