Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions ui/src/components/NewProjectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

import { useState } from 'react'
import { createPortal } from 'react-dom'
import { Bot, FileEdit, ArrowRight, ArrowLeft, Loader2, CheckCircle2, Folder } from 'lucide-react'
import { useCreateProject } from '../hooks/useProjects'
import { SpecCreationChat } from './SpecCreationChat'
Expand Down Expand Up @@ -200,10 +201,10 @@ export function NewProjectModal({
}
}

// Full-screen chat view
// Full-screen chat view - use portal to render at body level
if (step === 'chat') {
return (
<div className="fixed inset-0 z-50 bg-background">
return createPortal(
<div className="fixed inset-0 z-50 bg-background flex flex-col">
<SpecCreationChat
projectName={projectName.trim()}
onComplete={handleSpecComplete}
Expand All @@ -213,7 +214,8 @@ export function NewProjectModal({
initializerError={initializerError}
onRetryInitializer={handleRetryInitializer}
/>
</div>
</div>,
document.body
)
}

Expand Down
9 changes: 4 additions & 5 deletions ui/src/components/SpecCreationChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export function SpecCreationChat({
}

return (
<div className="flex flex-col h-full bg-background">
<div className="flex flex-col h-screen bg-background">
{/* Header */}
<div className="flex items-center justify-between p-4 border-b-2 border-border bg-card">
<div className="flex items-center gap-3">
Expand Down Expand Up @@ -303,7 +303,7 @@ export function SpecCreationChat({
)}

{/* Messages area */}
<div className="flex-1 overflow-y-auto py-4">
<div className="flex-1 overflow-y-auto py-4 min-h-0">
{messages.length === 0 && !isLoading && (
<div className="flex flex-col items-center justify-center h-full text-center p-8">
<Card className="p-6 max-w-md">
Expand Down Expand Up @@ -451,9 +451,8 @@ export function SpecCreationChat({

{/* Completion footer */}
{isComplete && (
<div className={`p-4 border-t-2 border-border ${
initializerStatus === 'error' ? 'bg-destructive' : 'bg-green-500'
}`}>
<div className={`p-4 border-t-2 border-border ${initializerStatus === 'error' ? 'bg-destructive' : 'bg-green-500'
}`}>
<div className="flex items-center justify-between">
<div className="flex items-center gap-2">
{initializerStatus === 'starting' ? (
Expand Down
Loading