Fix: Chat Screen Layout Broken in New Project Creation Flow#143
Conversation
Root cause: NewProjectModal was rendered inside ProjectSelector (in header), causing the fixed inset-0 container to be constrained by the dropdown DOM tree. Changes: - NewProjectModal.tsx: Use createPortal to render chat screen at document.body level - SpecCreationChat.tsx: Change h-full to h-screen for explicit viewport height - SpecCreationChat.tsx: Add min-h-0 to messages area for proper flexbox scrolling This fixes the chat screen not displaying full-screen when creating a new project with Claude.
📝 WalkthroughWalkthroughFixed chat screen layout issues in the new project creation flow by using React portals to render the chat at document body level instead of within the header component, combined with CSS height adjustments for proper viewport coverage. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you |
…AutoForgeAI#143) - Added ix_event_run_event_type composite index to AgentEvent.__table_args__ - Added migration function _migrate_add_agent_event_run_event_type_index() for existing databases (idempotent, skips if index or table doesn't exist) - Wired migration into create_database() after Feature AutoForgeAI#142 migration - Existing index on (run_id, sequence) is preserved - 8 tests verify model definition, database schema, migration, and integration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ut-bug Fix: Chat Screen Layout Broken in New Project Creation Flow
Fixes #142
Summary
This PR fixes the chat screen layout issue that occurred when creating a new project with Claude. The SpecCreationChat component was not displaying correctly as a full-screen overlay.
Problem
When selecting "Create with Claude" in the new project creation flow (step 6), the chat interface exhibited the following issues:
Screenshots (Before Fix)
The DOM structure showed the chat was incorrectly nested inside the header's ProjectSelector dropdown.
Root Cause
The
NewProjectModalcomponent was rendered as a child ofProjectSelector, which is positioned inside the<header>element:Even though
fixed inset-0should position the element relative to the viewport, the DOM hierarchy caused the layout to break because the fixed container was constrained by its parent elements in the dropdown.Solution
1. Use React Portal for Chat View
Used
createPortalfromreact-domto render the chat screen directly atdocument.bodylevel, bypassing the DOM hierarchy entirely.2. Fix Height Inheritance in SpecCreationChat
h-fulltoh-screenfor explicit viewport height (100vh)min-h-0to the messages area to fix flexbox overflow/scrolling issuesDOM Structure After Fix
Files Changed
ui/src/components/NewProjectModal.tsxcreatePortalimport, wrapped chat view in portal to render at body levelui/src/components/SpecCreationChat.tsxh-full→h-screen, addedmin-h-0to messages areaTesting
Manual Testing Steps
./start_ui.sh)Expected Result
The chat screen should cover the entire viewport as a proper full-screen overlay, with no background content visible.
Related Issues
Type of Change
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.