import { LocalConsentDialog } from "./local-consent-dialog"; import { manualFallbackMessage, signInErrorMessage } from "./local-sign-in"; import type { LocalSignInState } from "./local-sign-in"; /** * Renders one `LocalSignInState` with no side effects. `local-login.tsx` * owns the reducer, `Api.*` calls, the poll timer, and clipboard/tab access; * this component only presents whatever state it is given. */ export function LocalLoginView( { onCancel, onConsentDecision, onCopyAndOpen, onStart, state, }: { onCancel: () => void; onConsentDecision: (accept: boolean) => void; onCopyAndOpen: () => void; onStart: () => void; state: LocalSignInState; }, ) { return (

chopin

Plan together, in the context of the code.

A shared document, a visible chat, and an agent that can read the repository without owning the decision.

Open your workspace

{state.status === "idle" && ( <>

Sign in with GitHub to choose a repository and its planning channels.

)} {state.status === "requesting" && (

Waiting for device code...

)} {state.status === "waiting" && (

Waiting for authorization...

Enter one-time code: {state.userCode} at{" "} {state.verificationUri}

{state.presentationFailure && (

{manualFallbackMessage( state.presentationFailure, state.verificationUri, state.userCode, )}

)}
)} {state.status === "consent" && ( )} {state.status === "complete" && (

Signing in...

)} {state.status === "cancelled" && ( <>

Sign-in was cancelled.

)} {state.status === "error" && ( <>

{signInErrorMessage(state.message)}

)}
); }