Skip to content

Commit 7fc6191

Browse files
committed
[DASH-444] Nebula - Update login flow (#5750)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on refactoring and updating the chat and login components in the `nebula-app`, enhancing the handling of chat sessions, prompts, and user interactions. ### Detailed summary - Added `initialPrompt` to `ChatPageContent` and `EmptyStateChatPageContent`. - Simplified `EmptyStateChatPageContent` props. - Introduced `LoginAndOnboardingPageContent` for better login handling. - Updated `NebulaLogin` to use `NebulaLoginPage`. - Refactored message handling and session management in `ChatPageContent`. - Removed unnecessary props in `Chatbar` and `EmptyStateChatPageContent`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent b205280 commit 7fc6191

File tree

11 files changed

+290
-264
lines changed

11 files changed

+290
-264
lines changed

apps/dashboard/src/app/login/LoginPage.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,20 @@ export function LoginAndOnboardingPage(props: {
7777
</header>
7878
</div>
7979

80+
<LoginAndOnboardingPageContent
81+
account={props.account}
82+
redirectPath={props.redirectPath}
83+
/>
84+
</div>
85+
);
86+
}
87+
88+
export function LoginAndOnboardingPageContent(props: {
89+
account: Account | undefined;
90+
redirectPath: string;
91+
}) {
92+
return (
93+
<div className="relative flex grow flex-col">
8094
<main className="container z-10 flex grow flex-col justify-center gap-6 py-12">
8195
<ClientOnly
8296
ssr={

apps/dashboard/src/app/nebula-app/(app)/chat/[session_id]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default async function Page(props: {
4444
session={session}
4545
type="new-chat"
4646
account={account}
47+
initialPrompt={undefined}
4748
/>
4849
);
4950
}

apps/dashboard/src/app/nebula-app/(app)/chat/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default async function Page() {
2727
session={undefined}
2828
type="new-chat"
2929
account={account}
30+
initialPrompt={undefined}
3031
/>
3132
);
3233
}

apps/dashboard/src/app/nebula-app/(app)/components/ChatBar.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ import { AutoResizeTextarea } from "@/components/ui/textarea";
55
import { cn } from "@/lib/utils";
66
import { ArrowUpIcon, CircleStopIcon } from "lucide-react";
77
import { useState } from "react";
8-
import type { ExecuteConfig } from "../api/types";
98

109
export function Chatbar(props: {
11-
updateConfig: (config: ExecuteConfig) => void;
12-
config: ExecuteConfig;
1310
sendMessage: (message: string) => void;
1411
isChatStreaming: boolean;
1512
abortChatStream: () => void;

0 commit comments

Comments
 (0)