Skip to content

Commit

Permalink
[DASH-444] Nebula - Update login flow (#5750)
Browse files Browse the repository at this point in the history
## 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 -->
  • Loading branch information
MananTank committed Dec 16, 2024
1 parent b205280 commit 7fc6191
Show file tree
Hide file tree
Showing 11 changed files with 290 additions and 264 deletions.
14 changes: 14 additions & 0 deletions apps/dashboard/src/app/login/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ export function LoginAndOnboardingPage(props: {
</header>
</div>

<LoginAndOnboardingPageContent
account={props.account}
redirectPath={props.redirectPath}
/>
</div>
);
}

export function LoginAndOnboardingPageContent(props: {
account: Account | undefined;
redirectPath: string;
}) {
return (
<div className="relative flex grow flex-col">
<main className="container z-10 flex grow flex-col justify-center gap-6 py-12">
<ClientOnly
ssr={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default async function Page(props: {
session={session}
type="new-chat"
account={account}
initialPrompt={undefined}
/>
);
}
1 change: 1 addition & 0 deletions apps/dashboard/src/app/nebula-app/(app)/chat/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default async function Page() {
session={undefined}
type="new-chat"
account={account}
initialPrompt={undefined}
/>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ import { AutoResizeTextarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
import { ArrowUpIcon, CircleStopIcon } from "lucide-react";
import { useState } from "react";
import type { ExecuteConfig } from "../api/types";

export function Chatbar(props: {
updateConfig: (config: ExecuteConfig) => void;
config: ExecuteConfig;
sendMessage: (message: string) => void;
isChatStreaming: boolean;
abortChatStream: () => void;
Expand Down
Loading

0 comments on commit 7fc6191

Please sign in to comment.